SonyBravia2013Profile.cs 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. using System.Xml.Serialization;
  2. using MediaBrowser.Controller.Dlna;
  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. 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. Type = DlnaProfileType.Audio
  37. },
  38. new TranscodingProfile
  39. {
  40. Container = "ts",
  41. VideoCodec = "h264",
  42. AudioCodec = "ac3,aac",
  43. Type = DlnaProfileType.Video,
  44. EnableMpegtsM2TsMode = true
  45. },
  46. new TranscodingProfile
  47. {
  48. Container = "jpeg",
  49. Type = DlnaProfileType.Photo
  50. }
  51. };
  52. DirectPlayProfiles = new[]
  53. {
  54. new DirectPlayProfile
  55. {
  56. Container = "ts",
  57. VideoCodec = "h264",
  58. AudioCodec = "ac3,eac3,aac,mp3",
  59. Type = DlnaProfileType.Video
  60. },
  61. new DirectPlayProfile
  62. {
  63. Container = "ts",
  64. VideoCodec = "mpeg2video",
  65. AudioCodec = "mp3,mp2",
  66. Type = DlnaProfileType.Video
  67. },
  68. new DirectPlayProfile
  69. {
  70. Container = "mp4",
  71. VideoCodec = "h264,mpeg4",
  72. AudioCodec = "ac3,eac3,aac,mp3,mp2",
  73. Type = DlnaProfileType.Video
  74. },
  75. new DirectPlayProfile
  76. {
  77. Container = "mov",
  78. VideoCodec = "h264,mpeg4,mjpeg",
  79. AudioCodec = "ac3,eac3,aac,mp3,mp2",
  80. Type = DlnaProfileType.Video
  81. },
  82. new DirectPlayProfile
  83. {
  84. Container = "mkv",
  85. VideoCodec = "h264,mpeg4,vp8",
  86. AudioCodec = "ac3,eac3,aac,mp3,mp2,pcm,vorbis",
  87. Type = DlnaProfileType.Video
  88. },
  89. new DirectPlayProfile
  90. {
  91. Container = "avi",
  92. VideoCodec = "mpeg4",
  93. AudioCodec = "ac3,eac3,mp3",
  94. Type = DlnaProfileType.Video
  95. },
  96. new DirectPlayProfile
  97. {
  98. Container = "avi",
  99. VideoCodec = "mjpeg",
  100. AudioCodec = "pcm",
  101. Type = DlnaProfileType.Video
  102. },
  103. new DirectPlayProfile
  104. {
  105. Container = "mpeg",
  106. VideoCodec = "mpeg2video,mpeg1video",
  107. AudioCodec = "mp3,mp2",
  108. Type = DlnaProfileType.Video
  109. },
  110. new DirectPlayProfile
  111. {
  112. Container = "asf",
  113. VideoCodec = "wmv2,wmv3,vc1",
  114. AudioCodec = "wmav2,wmapro,wmavoice",
  115. Type = DlnaProfileType.Video
  116. },
  117. new DirectPlayProfile
  118. {
  119. Container = "mp3",
  120. AudioCodec = "mp3",
  121. Type = DlnaProfileType.Audio
  122. },
  123. new DirectPlayProfile
  124. {
  125. Container = "mp4",
  126. AudioCodec = "aac",
  127. Type = DlnaProfileType.Audio
  128. },
  129. new DirectPlayProfile
  130. {
  131. Container = "wav",
  132. AudioCodec = "pcm",
  133. Type = DlnaProfileType.Audio
  134. },
  135. new DirectPlayProfile
  136. {
  137. Container = "asf",
  138. AudioCodec = "wmav2,wmapro,wmavoice",
  139. Type = DlnaProfileType.Audio
  140. },
  141. new DirectPlayProfile
  142. {
  143. Container = "jpeg",
  144. Type = DlnaProfileType.Photo
  145. }
  146. };
  147. ContainerProfiles = new[]
  148. {
  149. new ContainerProfile
  150. {
  151. Type = DlnaProfileType.Photo,
  152. Conditions = new []
  153. {
  154. new ProfileCondition
  155. {
  156. Condition = ProfileConditionType.LessThanEqual,
  157. Property = ProfileConditionValue.Width,
  158. Value = "1920"
  159. },
  160. new ProfileCondition
  161. {
  162. Condition = ProfileConditionType.LessThanEqual,
  163. Property = ProfileConditionValue.Height,
  164. Value = "1080"
  165. }
  166. }
  167. }
  168. };
  169. MediaProfiles = new[]
  170. {
  171. new MediaProfile
  172. {
  173. Container = "ts",
  174. VideoCodec="h264",
  175. AudioCodec="ac3,aac,mp3",
  176. MimeType = "video/vnd.dlna.mpeg-tts",
  177. OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",
  178. Type = DlnaProfileType.Video
  179. },
  180. new MediaProfile
  181. {
  182. Container = "ts",
  183. VideoCodec="h264",
  184. AudioCodec="ac3,aac,mp3",
  185. MimeType = "video/mpeg",
  186. OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",
  187. Type = DlnaProfileType.Video
  188. },
  189. new MediaProfile
  190. {
  191. Container = "ts",
  192. VideoCodec="h264",
  193. AudioCodec="ac3,aac,mp3",
  194. MimeType = "video/vnd.dlna.mpeg-tts",
  195. OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",
  196. Type = DlnaProfileType.Video
  197. },
  198. new MediaProfile
  199. {
  200. Container = "ts",
  201. VideoCodec="mpeg2video",
  202. MimeType = "video/vnd.dlna.mpeg-tts",
  203. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  204. Type = DlnaProfileType.Video
  205. },
  206. new MediaProfile
  207. {
  208. Container = "mpeg",
  209. VideoCodec="mpeg1video,mpeg2video",
  210. MimeType = "video/mpeg",
  211. OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",
  212. Type = DlnaProfileType.Video
  213. }
  214. };
  215. CodecProfiles = new[]
  216. {
  217. new CodecProfile
  218. {
  219. Type = CodecType.Video,
  220. Conditions = new []
  221. {
  222. new ProfileCondition
  223. {
  224. Condition = ProfileConditionType.LessThanEqual,
  225. Property = ProfileConditionValue.Width,
  226. Value = "1920"
  227. },
  228. new ProfileCondition
  229. {
  230. Condition = ProfileConditionType.LessThanEqual,
  231. Property = ProfileConditionValue.Height,
  232. Value = "1080"
  233. }
  234. }
  235. }
  236. };
  237. }
  238. }
  239. }