2
0

SonyBravia2012Profile.cs 10 KB

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