SonyBravia2012Profile.cs 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. using MediaBrowser.Controller.Dlna;
  2. namespace MediaBrowser.Dlna.Profiles
  3. {
  4. public class SonyBravia2012Profile : DefaultProfile
  5. {
  6. public SonyBravia2012Profile()
  7. {
  8. Name = "Sony Bravia (2012)";
  9. Identification = new DeviceIdentification
  10. {
  11. FriendlyName = @"KDL-\d{2}[A-Z]X\d5(\d|G).*",
  12. Manufacturer = "Sony",
  13. Headers = new[]
  14. {
  15. new HttpHeaderInfo
  16. {
  17. Name = "X-AV-Client-Info",
  18. Value = @".*KDL-\d{2}[A-Z]X\d5(\d|G).*",
  19. Match = HeaderMatchType.Regex
  20. }
  21. }
  22. };
  23. ModelName = "Windows Media Player Sharing";
  24. ModelNumber = "3.0";
  25. ModelUrl = "http://www.microsoft.com/";
  26. Manufacturer = "Microsoft Corporation";
  27. ManufacturerUrl = "http://www.microsoft.com/";
  28. SonyAggregationFlags = "10";
  29. TranscodingProfiles = new[]
  30. {
  31. new TranscodingProfile
  32. {
  33. Container = "mp3",
  34. AudioCodec = "mp3",
  35. Type = DlnaProfileType.Audio
  36. },
  37. new TranscodingProfile
  38. {
  39. Container = "ts",
  40. VideoCodec = "h264",
  41. AudioCodec = "ac3,aac",
  42. Type = DlnaProfileType.Video,
  43. EnableMpegtsM2TsMode = true
  44. },
  45. new TranscodingProfile
  46. {
  47. Container = "jpeg",
  48. Type = DlnaProfileType.Photo
  49. }
  50. };
  51. DirectPlayProfiles = new[]
  52. {
  53. new DirectPlayProfile
  54. {
  55. Container = "ts",
  56. VideoCodec = "h264",
  57. AudioCodec = "ac3,aac,mp3",
  58. Type = DlnaProfileType.Video
  59. },
  60. new DirectPlayProfile
  61. {
  62. Container = "ts",
  63. VideoCodec = "mpeg2video",
  64. AudioCodec = "mp3,mp2",
  65. Type = DlnaProfileType.Video
  66. },
  67. new DirectPlayProfile
  68. {
  69. Container = "mp4",
  70. VideoCodec = "h264,mpeg4",
  71. AudioCodec = "ac3,aac,mp3,mp2",
  72. Type = DlnaProfileType.Video
  73. },
  74. new DirectPlayProfile
  75. {
  76. Container = "avi",
  77. VideoCodec = "mpeg4",
  78. AudioCodec = "ac3,mp3",
  79. Type = DlnaProfileType.Video
  80. },
  81. new DirectPlayProfile
  82. {
  83. Container = "mpeg",
  84. VideoCodec = "mpeg2video,mpeg1video",
  85. AudioCodec = "mp3,mp2",
  86. Type = DlnaProfileType.Video
  87. },
  88. new DirectPlayProfile
  89. {
  90. Container = "asf",
  91. VideoCodec = "wmv2,wmv3,vc1",
  92. AudioCodec = "wmav2,wmapro,wmavoice",
  93. Type = DlnaProfileType.Video
  94. },
  95. new DirectPlayProfile
  96. {
  97. Container = "mp3",
  98. AudioCodec = "mp3",
  99. Type = DlnaProfileType.Audio
  100. },
  101. new DirectPlayProfile
  102. {
  103. Container = "asf",
  104. AudioCodec = "wmav2,wmapro,wmavoice",
  105. Type = DlnaProfileType.Audio
  106. },
  107. new DirectPlayProfile
  108. {
  109. Container = "jpeg",
  110. Type = DlnaProfileType.Photo
  111. }
  112. };
  113. MediaProfiles = new[]
  114. {
  115. new MediaProfile
  116. {
  117. Container = "ts",
  118. VideoCodec="h264",
  119. AudioCodec="ac3,aac,mp3",
  120. MimeType = "video/vnd.dlna.mpeg-tts",
  121. OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",
  122. Type = DlnaProfileType.Video
  123. },
  124. new MediaProfile
  125. {
  126. Container = "ts",
  127. VideoCodec="h264",
  128. AudioCodec="ac3,aac,mp3",
  129. MimeType = "video/mpeg",
  130. OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",
  131. Type = DlnaProfileType.Video
  132. },
  133. new MediaProfile
  134. {
  135. Container = "ts",
  136. VideoCodec="h264",
  137. AudioCodec="ac3,aac,mp3",
  138. MimeType = "video/vnd.dlna.mpeg-tts",
  139. OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",
  140. Type = DlnaProfileType.Video
  141. },
  142. new MediaProfile
  143. {
  144. Container = "ts",
  145. VideoCodec="mpeg2video",
  146. MimeType = "video/vnd.dlna.mpeg-tts",
  147. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  148. Type = DlnaProfileType.Video
  149. },
  150. new MediaProfile
  151. {
  152. Container = "mpeg",
  153. VideoCodec="mpeg1video,mpeg2video",
  154. MimeType = "video/mpeg",
  155. OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",
  156. Type = DlnaProfileType.Video
  157. }
  158. };
  159. ContainerProfiles = new[]
  160. {
  161. new ContainerProfile
  162. {
  163. Type = DlnaProfileType.Photo,
  164. Conditions = new []
  165. {
  166. new ProfileCondition
  167. {
  168. Condition = ProfileConditionType.LessThanEqual,
  169. Property = ProfileConditionValue.Width,
  170. Value = "1920"
  171. },
  172. new ProfileCondition
  173. {
  174. Condition = ProfileConditionType.LessThanEqual,
  175. Property = ProfileConditionValue.Height,
  176. Value = "1080"
  177. }
  178. }
  179. }
  180. };
  181. CodecProfiles = new[]
  182. {
  183. new CodecProfile
  184. {
  185. Type = CodecType.VideoCodec,
  186. Conditions = new[]
  187. {
  188. new ProfileCondition
  189. {
  190. Condition = ProfileConditionType.LessThanEqual,
  191. Property = ProfileConditionValue.Width,
  192. Value = "1920"
  193. },
  194. new ProfileCondition
  195. {
  196. Condition = ProfileConditionType.LessThanEqual,
  197. Property = ProfileConditionValue.Height,
  198. Value = "1080"
  199. }
  200. }
  201. },
  202. new CodecProfile
  203. {
  204. Type = CodecType.VideoAudioCodec,
  205. Codec = "ac3",
  206. Conditions = new[]
  207. {
  208. new ProfileCondition
  209. {
  210. Condition = ProfileConditionType.LessThanEqual,
  211. Property = ProfileConditionValue.AudioChannels,
  212. Value = "6"
  213. }
  214. }
  215. }
  216. };
  217. }
  218. }
  219. }