SonyBravia2014Profile.cs 11 KB

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