SonyBravia2011Profile.cs 10 KB

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