WindowsMediaCenterProfile.cs 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. using System.Xml.Serialization;
  2. using MediaBrowser.Model.Dlna;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [XmlRoot("Profile")]
  6. public class WindowsMediaCenterProfile : DefaultProfile
  7. {
  8. public WindowsMediaCenterProfile()
  9. {
  10. Name = "Windows Media Center";
  11. TranscodingProfiles = new[]
  12. {
  13. new TranscodingProfile
  14. {
  15. Container = "mp3",
  16. AudioCodec = "mp3",
  17. Type = DlnaProfileType.Audio
  18. },
  19. new TranscodingProfile
  20. {
  21. Container = "asf",
  22. VideoCodec = "msmpeg4",
  23. AudioCodec = "wmav2",
  24. Type = DlnaProfileType.Video
  25. }
  26. };
  27. DirectPlayProfiles = new[]
  28. {
  29. new DirectPlayProfile
  30. {
  31. Container = "avi",
  32. VideoCodec = "mpeg4",
  33. AudioCodec = "ac3,mp3",
  34. Type = DlnaProfileType.Video
  35. },
  36. new DirectPlayProfile
  37. {
  38. Container = "avi",
  39. VideoCodec = "h264",
  40. AudioCodec = "aac",
  41. Type = DlnaProfileType.Video
  42. },
  43. new DirectPlayProfile
  44. {
  45. Container = "mp4,mov",
  46. VideoCodec = "h264,mpeg4",
  47. AudioCodec = "aac,ac3",
  48. Type = DlnaProfileType.Video
  49. },
  50. new DirectPlayProfile
  51. {
  52. Container = "asf",
  53. VideoCodec = "wmv2,wmv3,vc1",
  54. AudioCodec = "wmav2,wmapro",
  55. Type = DlnaProfileType.Video
  56. },
  57. new DirectPlayProfile
  58. {
  59. Container = "asf",
  60. AudioCodec = "wmav2,wmapro,wmavoice",
  61. Type = DlnaProfileType.Audio
  62. },
  63. new DirectPlayProfile
  64. {
  65. Container = "mp3",
  66. AudioCodec = "mp3",
  67. Type = DlnaProfileType.Audio
  68. },
  69. new DirectPlayProfile
  70. {
  71. Container = "jpeg",
  72. Type = DlnaProfileType.Photo
  73. }
  74. };
  75. ResponseProfiles = new[]
  76. {
  77. new ResponseProfile
  78. {
  79. Container = "avi",
  80. MimeType = "video/avi",
  81. Type = DlnaProfileType.Video
  82. }
  83. };
  84. ContainerProfiles = new[]
  85. {
  86. new ContainerProfile
  87. {
  88. Type = DlnaProfileType.Video,
  89. Container = "mp4,mov",
  90. Conditions = new []
  91. {
  92. new ProfileCondition
  93. {
  94. Condition = ProfileConditionType.Equals,
  95. Property = ProfileConditionValue.Has64BitOffsets,
  96. Value = "false",
  97. IsRequired = false
  98. }
  99. }
  100. }
  101. };
  102. CodecProfiles = new[]
  103. {
  104. new CodecProfile
  105. {
  106. Type = CodecType.Video,
  107. Codec = "mpeg4",
  108. Conditions = new []
  109. {
  110. new ProfileCondition
  111. {
  112. Condition = ProfileConditionType.LessThanEqual,
  113. Property = ProfileConditionValue.Width,
  114. Value = "1280"
  115. },
  116. new ProfileCondition
  117. {
  118. Condition = ProfileConditionType.LessThanEqual,
  119. Property = ProfileConditionValue.Height,
  120. Value = "720"
  121. },
  122. new ProfileCondition
  123. {
  124. Condition = ProfileConditionType.LessThanEqual,
  125. Property = ProfileConditionValue.VideoFramerate,
  126. Value = "30",
  127. IsRequired = false
  128. },
  129. new ProfileCondition
  130. {
  131. Condition = ProfileConditionType.LessThanEqual,
  132. Property = ProfileConditionValue.VideoBitrate,
  133. Value = "5120000",
  134. IsRequired = false
  135. }
  136. }
  137. },
  138. new CodecProfile
  139. {
  140. Type = CodecType.Video,
  141. Codec = "h264",
  142. Conditions = new []
  143. {
  144. new ProfileCondition
  145. {
  146. Condition = ProfileConditionType.LessThanEqual,
  147. Property = ProfileConditionValue.Width,
  148. Value = "1920"
  149. },
  150. new ProfileCondition
  151. {
  152. Condition = ProfileConditionType.LessThanEqual,
  153. Property = ProfileConditionValue.Height,
  154. Value = "1080"
  155. },
  156. new ProfileCondition
  157. {
  158. Condition = ProfileConditionType.LessThanEqual,
  159. Property = ProfileConditionValue.VideoLevel,
  160. Value = "41",
  161. IsRequired = false
  162. },
  163. new ProfileCondition
  164. {
  165. Condition = ProfileConditionType.LessThanEqual,
  166. Property = ProfileConditionValue.VideoBitrate,
  167. Value = "10240000",
  168. IsRequired = false
  169. }
  170. }
  171. },
  172. new CodecProfile
  173. {
  174. Type = CodecType.Video,
  175. Codec = "wmv2,wmv3,vc1",
  176. Conditions = new []
  177. {
  178. new ProfileCondition
  179. {
  180. Condition = ProfileConditionType.LessThanEqual,
  181. Property = ProfileConditionValue.Width,
  182. Value = "1920"
  183. },
  184. new ProfileCondition
  185. {
  186. Condition = ProfileConditionType.LessThanEqual,
  187. Property = ProfileConditionValue.Height,
  188. Value = "1080"
  189. },
  190. new ProfileCondition
  191. {
  192. Condition = ProfileConditionType.LessThanEqual,
  193. Property = ProfileConditionValue.VideoFramerate,
  194. Value = "30",
  195. IsRequired = false
  196. },
  197. new ProfileCondition
  198. {
  199. Condition = ProfileConditionType.LessThanEqual,
  200. Property = ProfileConditionValue.VideoBitrate,
  201. Value = "15360000",
  202. IsRequired = false
  203. }
  204. }
  205. },
  206. new CodecProfile
  207. {
  208. Type = CodecType.VideoAudio,
  209. Codec = "ac3,wmav2,wmapro",
  210. Conditions = new []
  211. {
  212. new ProfileCondition
  213. {
  214. Condition = ProfileConditionType.LessThanEqual,
  215. Property = ProfileConditionValue.AudioChannels,
  216. Value = "6",
  217. IsRequired = false
  218. }
  219. }
  220. },
  221. new CodecProfile
  222. {
  223. Type = CodecType.VideoAudio,
  224. Codec = "aac",
  225. Conditions = new []
  226. {
  227. new ProfileCondition
  228. {
  229. Condition = ProfileConditionType.LessThanEqual,
  230. Property = ProfileConditionValue.AudioChannels,
  231. Value = "2",
  232. IsRequired = false
  233. },
  234. new ProfileCondition
  235. {
  236. Condition = ProfileConditionType.Equals,
  237. Property = ProfileConditionValue.AudioProfile,
  238. Value = "lc",
  239. IsRequired = false
  240. }
  241. }
  242. }
  243. };
  244. }
  245. }
  246. }