XboxOneProfile.cs 9.0 KB

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