SonyBravia2012Profile.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. using MediaBrowser.Model.Dlna;
  2. namespace Emby.Dlna.Profiles
  3. {
  4. [System.Xml.Serialization.XmlRoot("Profile")]
  5. public class SonyBravia2012Profile : DefaultProfile
  6. {
  7. public SonyBravia2012Profile()
  8. {
  9. Name = "Sony Bravia (2012)";
  10. Identification = new DeviceIdentification
  11. {
  12. FriendlyName = @"KDL-\d{2}[A-Z]X\d5(\d|G).*",
  13. Manufacturer = "Sony",
  14. Headers = new[]
  15. {
  16. new HttpHeaderInfo
  17. {
  18. Name = "X-AV-Client-Info",
  19. Value = @".*KDL-\d{2}[A-Z]X\d5(\d|G).*",
  20. Match = HeaderMatchType.Regex
  21. }
  22. }
  23. };
  24. AddXmlRootAttribute("xmlns:av", "urn:schemas-sony-com:av");
  25. AlbumArtPn = "JPEG_TN";
  26. ModelName = "Windows Media Player Sharing";
  27. ModelNumber = "3.0";
  28. ModelUrl = "http://www.microsoft.com/";
  29. Manufacturer = "Microsoft Corporation";
  30. ManufacturerUrl = "http://www.microsoft.com/";
  31. SonyAggregationFlags = "10";
  32. EnableSingleAlbumArtLimit = true;
  33. EnableAlbumArtInDidl = true;
  34. TranscodingProfiles = new[]
  35. {
  36. new TranscodingProfile
  37. {
  38. Container = "mp3",
  39. AudioCodec = "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,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,aac,mp3,mp2",
  77. Type = DlnaProfileType.Video
  78. },
  79. new DirectPlayProfile
  80. {
  81. Container = "avi",
  82. VideoCodec = "mpeg4",
  83. AudioCodec = "ac3,mp3",
  84. Type = DlnaProfileType.Video
  85. },
  86. new DirectPlayProfile
  87. {
  88. Container = "mpeg",
  89. VideoCodec = "mpeg2video,mpeg1video",
  90. AudioCodec = "mp3,mp2",
  91. Type = DlnaProfileType.Video
  92. },
  93. new DirectPlayProfile
  94. {
  95. Container = "asf",
  96. VideoCodec = "wmv2,wmv3,vc1",
  97. AudioCodec = "wmav2,wmapro,wmavoice",
  98. Type = DlnaProfileType.Video
  99. },
  100. new DirectPlayProfile
  101. {
  102. Container = "mp3",
  103. AudioCodec = "mp3",
  104. Type = DlnaProfileType.Audio
  105. },
  106. new DirectPlayProfile
  107. {
  108. Container = "asf",
  109. AudioCodec = "wmav2,wmapro,wmavoice",
  110. Type = DlnaProfileType.Audio
  111. },
  112. new DirectPlayProfile
  113. {
  114. Container = "jpeg",
  115. Type = DlnaProfileType.Photo
  116. }
  117. };
  118. ResponseProfiles = new[]
  119. {
  120. new ResponseProfile
  121. {
  122. Container = "ts,mpegts",
  123. VideoCodec="h264",
  124. AudioCodec="ac3,aac,mp3",
  125. MimeType = "video/vnd.dlna.mpeg-tts",
  126. OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",
  127. Type = DlnaProfileType.Video,
  128. Conditions = new []
  129. {
  130. new ProfileCondition
  131. {
  132. Condition = ProfileConditionType.Equals,
  133. Property = ProfileConditionValue.PacketLength,
  134. Value = "192"
  135. },
  136. new ProfileCondition
  137. {
  138. Condition = ProfileConditionType.Equals,
  139. Property = ProfileConditionValue.VideoTimestamp,
  140. Value = "Valid"
  141. }
  142. }
  143. },
  144. new ResponseProfile
  145. {
  146. Container = "ts,mpegts",
  147. VideoCodec="h264",
  148. AudioCodec="ac3,aac,mp3",
  149. MimeType = "video/mpeg",
  150. OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",
  151. Type = DlnaProfileType.Video,
  152. Conditions = new []
  153. {
  154. new ProfileCondition
  155. {
  156. Condition = ProfileConditionType.Equals,
  157. Property = ProfileConditionValue.PacketLength,
  158. Value = "188"
  159. }
  160. }
  161. },
  162. new ResponseProfile
  163. {
  164. Container = "ts,mpegts",
  165. VideoCodec="h264",
  166. AudioCodec="ac3,aac,mp3",
  167. MimeType = "video/vnd.dlna.mpeg-tts",
  168. OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",
  169. Type = DlnaProfileType.Video
  170. },
  171. new ResponseProfile
  172. {
  173. Container = "ts,mpegts",
  174. VideoCodec="mpeg2video",
  175. MimeType = "video/vnd.dlna.mpeg-tts",
  176. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  177. Type = DlnaProfileType.Video
  178. },
  179. new ResponseProfile
  180. {
  181. Container = "mpeg",
  182. VideoCodec="mpeg1video,mpeg2video",
  183. MimeType = "video/mpeg",
  184. OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",
  185. Type = DlnaProfileType.Video
  186. },
  187. new ResponseProfile
  188. {
  189. Container = "m4v",
  190. Type = DlnaProfileType.Video,
  191. MimeType = "video/mp4"
  192. }
  193. };
  194. ContainerProfiles = new[]
  195. {
  196. new ContainerProfile
  197. {
  198. Type = DlnaProfileType.Photo,
  199. Conditions = new []
  200. {
  201. new ProfileCondition
  202. {
  203. Condition = ProfileConditionType.LessThanEqual,
  204. Property = ProfileConditionValue.Width,
  205. Value = "1920"
  206. },
  207. new ProfileCondition
  208. {
  209. Condition = ProfileConditionType.LessThanEqual,
  210. Property = ProfileConditionValue.Height,
  211. Value = "1080"
  212. }
  213. }
  214. }
  215. };
  216. CodecProfiles = new[]
  217. {
  218. new CodecProfile
  219. {
  220. Type = CodecType.Video,
  221. Conditions = new[]
  222. {
  223. new ProfileCondition
  224. {
  225. Condition = ProfileConditionType.LessThanEqual,
  226. Property = ProfileConditionValue.Width,
  227. Value = "1920"
  228. },
  229. new ProfileCondition
  230. {
  231. Condition = ProfileConditionType.LessThanEqual,
  232. Property = ProfileConditionValue.Height,
  233. Value = "1080"
  234. },
  235. new ProfileCondition
  236. {
  237. Condition = ProfileConditionType.LessThanEqual,
  238. Property = ProfileConditionValue.VideoFramerate,
  239. Value = "30"
  240. }
  241. }
  242. },
  243. new CodecProfile
  244. {
  245. Type = CodecType.VideoAudio,
  246. Codec = "ac3",
  247. Conditions = new[]
  248. {
  249. new ProfileCondition
  250. {
  251. Condition = ProfileConditionType.LessThanEqual,
  252. Property = ProfileConditionValue.AudioChannels,
  253. Value = "6"
  254. }
  255. }
  256. },
  257. new CodecProfile
  258. {
  259. Type = CodecType.VideoAudio,
  260. Codec = "mp3,mp2",
  261. Conditions = new []
  262. {
  263. new ProfileCondition
  264. {
  265. Condition = ProfileConditionType.LessThanEqual,
  266. Property = ProfileConditionValue.AudioChannels,
  267. Value = "2"
  268. }
  269. }
  270. }
  271. };
  272. SubtitleProfiles = new[]
  273. {
  274. new SubtitleProfile
  275. {
  276. Format = "srt",
  277. Method = SubtitleDeliveryMethod.Embed
  278. }
  279. };
  280. }
  281. }
  282. }