SonyBravia2013Profile.cs 11 KB

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