SonyBravia2010Profile.cs 13 KB

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