SonyBravia2013Profile.cs 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. using MediaBrowser.Model.Dlna;
  2. using System.Xml.Serialization;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [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. XmlRootAttributes = new[]
  26. {
  27. new XmlAttribute
  28. {
  29. Name = "xmlns:av",
  30. Value = "urn:schemas-sony-com:av"
  31. }
  32. };
  33. ModelName = "Windows Media Player Sharing";
  34. ModelNumber = "3.0";
  35. ModelUrl = "http://www.microsoft.com/";
  36. Manufacturer = "Microsoft Corporation";
  37. ManufacturerUrl = "http://www.microsoft.com/";
  38. SonyAggregationFlags = "10";
  39. TranscodingProfiles = new[]
  40. {
  41. new TranscodingProfile
  42. {
  43. Container = "mp3",
  44. Type = DlnaProfileType.Audio
  45. },
  46. new TranscodingProfile
  47. {
  48. Container = "ts",
  49. VideoCodec = "h264",
  50. AudioCodec = "ac3,aac",
  51. Type = DlnaProfileType.Video,
  52. EnableMpegtsM2TsMode = true
  53. },
  54. new TranscodingProfile
  55. {
  56. Container = "jpeg",
  57. Type = DlnaProfileType.Photo
  58. }
  59. };
  60. DirectPlayProfiles = new[]
  61. {
  62. new DirectPlayProfile
  63. {
  64. Container = "ts",
  65. VideoCodec = "h264",
  66. AudioCodec = "ac3,eac3,aac,mp3",
  67. Type = DlnaProfileType.Video
  68. },
  69. new DirectPlayProfile
  70. {
  71. Container = "ts",
  72. VideoCodec = "mpeg2video",
  73. AudioCodec = "mp3,mp2",
  74. Type = DlnaProfileType.Video
  75. },
  76. new DirectPlayProfile
  77. {
  78. Container = "mp4",
  79. VideoCodec = "h264,mpeg4",
  80. AudioCodec = "ac3,eac3,aac,mp3,mp2",
  81. Type = DlnaProfileType.Video
  82. },
  83. new DirectPlayProfile
  84. {
  85. Container = "mov",
  86. VideoCodec = "h264,mpeg4,mjpeg",
  87. AudioCodec = "ac3,eac3,aac,mp3,mp2",
  88. Type = DlnaProfileType.Video
  89. },
  90. new DirectPlayProfile
  91. {
  92. Container = "mkv",
  93. VideoCodec = "h264,mpeg4,vp8",
  94. AudioCodec = "ac3,eac3,aac,mp3,mp2,pcm,vorbis",
  95. Type = DlnaProfileType.Video
  96. },
  97. new DirectPlayProfile
  98. {
  99. Container = "avi",
  100. VideoCodec = "mpeg4",
  101. AudioCodec = "ac3,eac3,mp3",
  102. Type = DlnaProfileType.Video
  103. },
  104. new DirectPlayProfile
  105. {
  106. Container = "avi",
  107. VideoCodec = "mjpeg",
  108. AudioCodec = "pcm",
  109. Type = DlnaProfileType.Video
  110. },
  111. new DirectPlayProfile
  112. {
  113. Container = "mpeg",
  114. VideoCodec = "mpeg2video,mpeg1video",
  115. AudioCodec = "mp3,mp2",
  116. Type = DlnaProfileType.Video
  117. },
  118. new DirectPlayProfile
  119. {
  120. Container = "asf",
  121. VideoCodec = "wmv2,wmv3,vc1",
  122. AudioCodec = "wmav2,wmapro,wmavoice",
  123. Type = DlnaProfileType.Video
  124. },
  125. new DirectPlayProfile
  126. {
  127. Container = "mp3",
  128. AudioCodec = "mp3",
  129. Type = DlnaProfileType.Audio
  130. },
  131. new DirectPlayProfile
  132. {
  133. Container = "mp4",
  134. AudioCodec = "aac",
  135. Type = DlnaProfileType.Audio
  136. },
  137. new DirectPlayProfile
  138. {
  139. Container = "wav",
  140. AudioCodec = "pcm",
  141. Type = DlnaProfileType.Audio
  142. },
  143. new DirectPlayProfile
  144. {
  145. Container = "asf",
  146. AudioCodec = "wmav2,wmapro,wmavoice",
  147. Type = DlnaProfileType.Audio
  148. },
  149. new DirectPlayProfile
  150. {
  151. Container = "jpeg",
  152. Type = DlnaProfileType.Photo
  153. }
  154. };
  155. ContainerProfiles = new[]
  156. {
  157. new ContainerProfile
  158. {
  159. Type = DlnaProfileType.Photo,
  160. Conditions = new []
  161. {
  162. new ProfileCondition
  163. {
  164. Condition = ProfileConditionType.LessThanEqual,
  165. Property = ProfileConditionValue.Width,
  166. Value = "1920"
  167. },
  168. new ProfileCondition
  169. {
  170. Condition = ProfileConditionType.LessThanEqual,
  171. Property = ProfileConditionValue.Height,
  172. Value = "1080"
  173. }
  174. }
  175. }
  176. };
  177. ResponseProfiles = new[]
  178. {
  179. new ResponseProfile
  180. {
  181. Container = "ts",
  182. VideoCodec="h264",
  183. AudioCodec="ac3,aac,mp3",
  184. MimeType = "video/vnd.dlna.mpeg-tts",
  185. OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",
  186. Type = DlnaProfileType.Video,
  187. Conditions = new []
  188. {
  189. new ProfileCondition
  190. {
  191. Condition = ProfileConditionType.Equals,
  192. Property = ProfileConditionValue.PacketLength,
  193. Value = "192"
  194. },
  195. new ProfileCondition
  196. {
  197. Condition = ProfileConditionType.Equals,
  198. Property = ProfileConditionValue.VideoTimestamp,
  199. Value = "Valid"
  200. }
  201. }
  202. },
  203. new ResponseProfile
  204. {
  205. Container = "ts",
  206. VideoCodec="h264",
  207. AudioCodec="ac3,aac,mp3",
  208. MimeType = "video/mpeg",
  209. OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",
  210. Type = DlnaProfileType.Video,
  211. Conditions = new []
  212. {
  213. new ProfileCondition
  214. {
  215. Condition = ProfileConditionType.Equals,
  216. Property = ProfileConditionValue.PacketLength,
  217. Value = "188"
  218. }
  219. }
  220. },
  221. new ResponseProfile
  222. {
  223. Container = "ts",
  224. VideoCodec="h264",
  225. AudioCodec="ac3,aac,mp3",
  226. MimeType = "video/vnd.dlna.mpeg-tts",
  227. OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",
  228. Type = DlnaProfileType.Video
  229. },
  230. new ResponseProfile
  231. {
  232. Container = "ts",
  233. VideoCodec="mpeg2video",
  234. MimeType = "video/vnd.dlna.mpeg-tts",
  235. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  236. Type = DlnaProfileType.Video
  237. },
  238. new ResponseProfile
  239. {
  240. Container = "mpeg",
  241. VideoCodec="mpeg1video,mpeg2video",
  242. MimeType = "video/mpeg",
  243. OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",
  244. Type = DlnaProfileType.Video
  245. }
  246. };
  247. CodecProfiles = new[]
  248. {
  249. new CodecProfile
  250. {
  251. Type = CodecType.Video,
  252. Conditions = new []
  253. {
  254. new ProfileCondition
  255. {
  256. Condition = ProfileConditionType.LessThanEqual,
  257. Property = ProfileConditionValue.Width,
  258. Value = "1920"
  259. },
  260. new ProfileCondition
  261. {
  262. Condition = ProfileConditionType.LessThanEqual,
  263. Property = ProfileConditionValue.Height,
  264. Value = "1080"
  265. }
  266. }
  267. }
  268. };
  269. }
  270. }
  271. }