SonyBravia2010Profile.cs 13 KB

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