SonyBravia2012Profile.cs 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. using System.Xml.Serialization;
  2. using MediaBrowser.Controller.Dlna;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [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. 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 = "avi",
  79. VideoCodec = "mpeg4",
  80. AudioCodec = "ac3,mp3",
  81. Type = DlnaProfileType.Video
  82. },
  83. new DirectPlayProfile
  84. {
  85. Container = "mpeg",
  86. VideoCodec = "mpeg2video,mpeg1video",
  87. AudioCodec = "mp3,mp2",
  88. Type = DlnaProfileType.Video
  89. },
  90. new DirectPlayProfile
  91. {
  92. Container = "asf",
  93. VideoCodec = "wmv2,wmv3,vc1",
  94. AudioCodec = "wmav2,wmapro,wmavoice",
  95. Type = DlnaProfileType.Video
  96. },
  97. new DirectPlayProfile
  98. {
  99. Container = "mp3",
  100. AudioCodec = "mp3",
  101. Type = DlnaProfileType.Audio
  102. },
  103. new DirectPlayProfile
  104. {
  105. Container = "asf",
  106. AudioCodec = "wmav2,wmapro,wmavoice",
  107. Type = DlnaProfileType.Audio
  108. },
  109. new DirectPlayProfile
  110. {
  111. Container = "jpeg",
  112. Type = DlnaProfileType.Photo
  113. }
  114. };
  115. MediaProfiles = new[]
  116. {
  117. new MediaProfile
  118. {
  119. Container = "ts",
  120. VideoCodec="h264",
  121. AudioCodec="ac3,aac,mp3",
  122. MimeType = "video/vnd.dlna.mpeg-tts",
  123. OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",
  124. Type = DlnaProfileType.Video
  125. },
  126. new MediaProfile
  127. {
  128. Container = "ts",
  129. VideoCodec="h264",
  130. AudioCodec="ac3,aac,mp3",
  131. MimeType = "video/mpeg",
  132. OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",
  133. Type = DlnaProfileType.Video
  134. },
  135. new MediaProfile
  136. {
  137. Container = "ts",
  138. VideoCodec="h264",
  139. AudioCodec="ac3,aac,mp3",
  140. MimeType = "video/vnd.dlna.mpeg-tts",
  141. OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",
  142. Type = DlnaProfileType.Video
  143. },
  144. new MediaProfile
  145. {
  146. Container = "ts",
  147. VideoCodec="mpeg2video",
  148. MimeType = "video/vnd.dlna.mpeg-tts",
  149. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  150. Type = DlnaProfileType.Video
  151. },
  152. new MediaProfile
  153. {
  154. Container = "mpeg",
  155. VideoCodec="mpeg1video,mpeg2video",
  156. MimeType = "video/mpeg",
  157. OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",
  158. Type = DlnaProfileType.Video
  159. }
  160. };
  161. ContainerProfiles = new[]
  162. {
  163. new ContainerProfile
  164. {
  165. Type = DlnaProfileType.Photo,
  166. Conditions = new []
  167. {
  168. new ProfileCondition
  169. {
  170. Condition = ProfileConditionType.LessThanEqual,
  171. Property = ProfileConditionValue.Width,
  172. Value = "1920"
  173. },
  174. new ProfileCondition
  175. {
  176. Condition = ProfileConditionType.LessThanEqual,
  177. Property = ProfileConditionValue.Height,
  178. Value = "1080"
  179. }
  180. }
  181. }
  182. };
  183. CodecProfiles = new[]
  184. {
  185. new CodecProfile
  186. {
  187. Type = CodecType.Video,
  188. Conditions = new[]
  189. {
  190. new ProfileCondition
  191. {
  192. Condition = ProfileConditionType.LessThanEqual,
  193. Property = ProfileConditionValue.Width,
  194. Value = "1920"
  195. },
  196. new ProfileCondition
  197. {
  198. Condition = ProfileConditionType.LessThanEqual,
  199. Property = ProfileConditionValue.Height,
  200. Value = "1080"
  201. }
  202. }
  203. },
  204. new CodecProfile
  205. {
  206. Type = CodecType.VideoAudio,
  207. Codec = "ac3",
  208. Conditions = new[]
  209. {
  210. new ProfileCondition
  211. {
  212. Condition = ProfileConditionType.LessThanEqual,
  213. Property = ProfileConditionValue.AudioChannels,
  214. Value = "6"
  215. }
  216. }
  217. }
  218. };
  219. }
  220. }
  221. }