SonyBravia2011Profile.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. #pragma warning disable CS1591
  2. using MediaBrowser.Model.Dlna;
  3. namespace Emby.Dlna.Profiles
  4. {
  5. [System.Xml.Serialization.XmlRoot("Profile")]
  6. public class SonyBravia2011Profile : DefaultProfile
  7. {
  8. public SonyBravia2011Profile()
  9. {
  10. Name = "Sony Bravia (2011)";
  11. Identification = new DeviceIdentification
  12. {
  13. FriendlyName = @"KDL-\d{2}([A-Z]X\d2\d|CX400).*",
  14. Manufacturer = "Sony",
  15. Headers = new[]
  16. {
  17. new HttpHeaderInfo
  18. {
  19. Name = "X-AV-Client-Info",
  20. Value = @".*KDL-\d{2}([A-Z]X\d2\d|CX400).*",
  21. Match = HeaderMatchType.Regex
  22. }
  23. }
  24. };
  25. AddXmlRootAttribute("xmlns:av", "urn:schemas-sony-com:av");
  26. AlbumArtPn = "JPEG_TN";
  27. ModelName = "Windows Media Player Sharing";
  28. ModelNumber = "3.0";
  29. ModelUrl = "http://www.microsoft.com/";
  30. Manufacturer = "Microsoft Corporation";
  31. ManufacturerUrl = "http://www.microsoft.com/";
  32. SonyAggregationFlags = "10";
  33. EnableSingleAlbumArtLimit = true;
  34. EnableAlbumArtInDidl = true;
  35. TranscodingProfiles = new[]
  36. {
  37. new TranscodingProfile
  38. {
  39. Container = "mp3",
  40. AudioCodec = "mp3",
  41. Type = DlnaProfileType.Audio
  42. },
  43. new TranscodingProfile
  44. {
  45. Container = "ts",
  46. VideoCodec = "h264",
  47. AudioCodec = "ac3",
  48. Type = DlnaProfileType.Video,
  49. EnableMpegtsM2TsMode = true
  50. },
  51. new TranscodingProfile
  52. {
  53. Container = "jpeg",
  54. Type = DlnaProfileType.Photo
  55. }
  56. };
  57. DirectPlayProfiles = new[]
  58. {
  59. new DirectPlayProfile
  60. {
  61. Container = "ts,mpegts",
  62. VideoCodec = "h264",
  63. AudioCodec = "ac3,aac,mp3",
  64. Type = DlnaProfileType.Video
  65. },
  66. new DirectPlayProfile
  67. {
  68. Container = "ts,mpegts",
  69. VideoCodec = "mpeg2video",
  70. AudioCodec = "mp3",
  71. Type = DlnaProfileType.Video
  72. },
  73. new DirectPlayProfile
  74. {
  75. Container = "mp4,m4v",
  76. VideoCodec = "h264,mpeg4",
  77. AudioCodec = "ac3,aac,mp3",
  78. Type = DlnaProfileType.Video
  79. },
  80. new DirectPlayProfile
  81. {
  82. Container = "mpeg",
  83. VideoCodec = "mpeg2video,mpeg1video",
  84. AudioCodec = "mp3",
  85. Type = DlnaProfileType.Video
  86. },
  87. new DirectPlayProfile
  88. {
  89. Container = "asf",
  90. VideoCodec = "wmv2,wmv3,vc1",
  91. AudioCodec = "wmav2,wmapro,wmavoice",
  92. Type = DlnaProfileType.Video
  93. },
  94. new DirectPlayProfile
  95. {
  96. Container = "mp3",
  97. AudioCodec = "mp3",
  98. Type = DlnaProfileType.Audio
  99. },
  100. new DirectPlayProfile
  101. {
  102. Container = "asf",
  103. AudioCodec = "wmav2,wmapro,wmavoice",
  104. Type = DlnaProfileType.Audio
  105. }
  106. };
  107. ContainerProfiles = new[]
  108. {
  109. new ContainerProfile
  110. {
  111. Type = DlnaProfileType.Photo,
  112. Conditions = new []
  113. {
  114. new ProfileCondition
  115. {
  116. Condition = ProfileConditionType.LessThanEqual,
  117. Property = ProfileConditionValue.Width,
  118. Value = "1920"
  119. },
  120. new ProfileCondition
  121. {
  122. Condition = ProfileConditionType.LessThanEqual,
  123. Property = ProfileConditionValue.Height,
  124. Value = "1080"
  125. }
  126. }
  127. }
  128. };
  129. ResponseProfiles = new[]
  130. {
  131. new ResponseProfile
  132. {
  133. Container = "ts,mpegts",
  134. VideoCodec="h264",
  135. AudioCodec="ac3,aac,mp3",
  136. MimeType = "video/vnd.dlna.mpeg-tts",
  137. OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",
  138. Type = DlnaProfileType.Video,
  139. Conditions = new []
  140. {
  141. new ProfileCondition
  142. {
  143. Condition = ProfileConditionType.Equals,
  144. Property = ProfileConditionValue.PacketLength,
  145. Value = "192"
  146. },
  147. new ProfileCondition
  148. {
  149. Condition = ProfileConditionType.Equals,
  150. Property = ProfileConditionValue.VideoTimestamp,
  151. Value = "Valid"
  152. }
  153. }
  154. },
  155. new ResponseProfile
  156. {
  157. Container = "ts,mpegts",
  158. VideoCodec="h264",
  159. AudioCodec="ac3,aac,mp3",
  160. MimeType = "video/mpeg",
  161. OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",
  162. Type = DlnaProfileType.Video,
  163. Conditions = new []
  164. {
  165. new ProfileCondition
  166. {
  167. Condition = ProfileConditionType.Equals,
  168. Property = ProfileConditionValue.PacketLength,
  169. Value = "188"
  170. }
  171. }
  172. },
  173. new ResponseProfile
  174. {
  175. Container = "ts,mpegts",
  176. VideoCodec="h264",
  177. AudioCodec="ac3,aac,mp3",
  178. MimeType = "video/vnd.dlna.mpeg-tts",
  179. OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",
  180. Type = DlnaProfileType.Video
  181. },
  182. new ResponseProfile
  183. {
  184. Container = "ts,mpegts",
  185. VideoCodec="mpeg2video",
  186. MimeType = "video/vnd.dlna.mpeg-tts",
  187. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  188. Type = DlnaProfileType.Video
  189. },
  190. new ResponseProfile
  191. {
  192. Container = "mpeg",
  193. VideoCodec="mpeg1video,mpeg2video",
  194. MimeType = "video/mpeg",
  195. OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",
  196. Type = DlnaProfileType.Video
  197. },
  198. new ResponseProfile
  199. {
  200. Container = "m4v",
  201. Type = DlnaProfileType.Video,
  202. MimeType = "video/mp4"
  203. }
  204. };
  205. CodecProfiles = new[]
  206. {
  207. new CodecProfile
  208. {
  209. Type = CodecType.Video,
  210. Codec = "h264",
  211. Conditions = new []
  212. {
  213. new ProfileCondition
  214. {
  215. Condition = ProfileConditionType.LessThanEqual,
  216. Property = ProfileConditionValue.Width,
  217. Value = "1920"
  218. },
  219. new ProfileCondition
  220. {
  221. Condition = ProfileConditionType.LessThanEqual,
  222. Property = ProfileConditionValue.Height,
  223. Value = "1080"
  224. },
  225. new ProfileCondition
  226. {
  227. Condition = ProfileConditionType.LessThanEqual,
  228. Property = ProfileConditionValue.VideoFramerate,
  229. Value = "30"
  230. },
  231. new ProfileCondition
  232. {
  233. Condition = ProfileConditionType.LessThanEqual,
  234. Property = ProfileConditionValue.VideoBitrate,
  235. Value = "20000000"
  236. },
  237. new ProfileCondition
  238. {
  239. Condition = ProfileConditionType.LessThanEqual,
  240. Property = ProfileConditionValue.VideoLevel,
  241. Value = "41"
  242. }
  243. }
  244. },
  245. new CodecProfile
  246. {
  247. Type = CodecType.Video,
  248. Codec = "mpeg2video",
  249. Conditions = new []
  250. {
  251. new ProfileCondition
  252. {
  253. Condition = ProfileConditionType.LessThanEqual,
  254. Property = ProfileConditionValue.Width,
  255. Value = "1920"
  256. },
  257. new ProfileCondition
  258. {
  259. Condition = ProfileConditionType.LessThanEqual,
  260. Property = ProfileConditionValue.Height,
  261. Value = "1080"
  262. },
  263. new ProfileCondition
  264. {
  265. Condition = ProfileConditionType.LessThanEqual,
  266. Property = ProfileConditionValue.VideoFramerate,
  267. Value = "30"
  268. },
  269. new ProfileCondition
  270. {
  271. Condition = ProfileConditionType.LessThanEqual,
  272. Property = ProfileConditionValue.VideoBitrate,
  273. Value = "20000000"
  274. }
  275. }
  276. },
  277. new CodecProfile
  278. {
  279. Type = CodecType.Video,
  280. Conditions = new []
  281. {
  282. new ProfileCondition
  283. {
  284. Condition = ProfileConditionType.LessThanEqual,
  285. Property = ProfileConditionValue.Width,
  286. Value = "1920"
  287. },
  288. new ProfileCondition
  289. {
  290. Condition = ProfileConditionType.LessThanEqual,
  291. Property = ProfileConditionValue.Height,
  292. Value = "1080"
  293. },
  294. new ProfileCondition
  295. {
  296. Condition = ProfileConditionType.LessThanEqual,
  297. Property = ProfileConditionValue.VideoFramerate,
  298. Value = "30"
  299. }
  300. }
  301. },
  302. new CodecProfile
  303. {
  304. Type = CodecType.VideoAudio,
  305. Codec = "ac3",
  306. Conditions = new []
  307. {
  308. new ProfileCondition
  309. {
  310. Condition = ProfileConditionType.LessThanEqual,
  311. Property = ProfileConditionValue.AudioChannels,
  312. Value = "6"
  313. }
  314. }
  315. },
  316. new CodecProfile
  317. {
  318. Type = CodecType.VideoAudio,
  319. Codec = "aac",
  320. Conditions = new[]
  321. {
  322. new ProfileCondition
  323. {
  324. Condition = ProfileConditionType.LessThanEqual,
  325. Property = ProfileConditionValue.AudioChannels,
  326. Value = "2"
  327. },
  328. new ProfileCondition
  329. {
  330. Condition = ProfileConditionType.NotEquals,
  331. Property = ProfileConditionValue.AudioProfile,
  332. Value = "he-aac"
  333. }
  334. }
  335. },
  336. new CodecProfile
  337. {
  338. Type = CodecType.VideoAudio,
  339. Codec = "mp3,mp2",
  340. Conditions = new []
  341. {
  342. new ProfileCondition
  343. {
  344. Condition = ProfileConditionType.LessThanEqual,
  345. Property = ProfileConditionValue.AudioChannels,
  346. Value = "2"
  347. }
  348. }
  349. }
  350. };
  351. SubtitleProfiles = new[]
  352. {
  353. new SubtitleProfile
  354. {
  355. Format = "srt",
  356. Method = SubtitleDeliveryMethod.Embed
  357. }
  358. };
  359. }
  360. }
  361. }