SonyBravia2013Profile.cs 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. using MediaBrowser.Controller.Dlna;
  2. namespace MediaBrowser.Dlna.Profiles
  3. {
  4. public class SonyBravia2013Profile : DefaultProfile
  5. {
  6. public SonyBravia2013Profile()
  7. {
  8. Name = "Sony Bravia (2013)";
  9. Identification = new DeviceIdentification
  10. {
  11. FriendlyName = @"KDL-\d{2}[WR][5689]\d{2}A.*",
  12. Manufacturer = "Sony",
  13. Headers = new[]
  14. {
  15. new HttpHeaderInfo
  16. {
  17. Name = "X-AV-Client-Info",
  18. Value = @".*KDL-\d{2}[WR][5689]\d{2}A.*",
  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. Type = DlnaProfileType.Audio
  35. },
  36. new TranscodingProfile
  37. {
  38. Container = "ts",
  39. VideoCodec = "h264",
  40. AudioCodec = "ac3,aac",
  41. Type = DlnaProfileType.Video,
  42. EnableMpegtsM2TsMode = true
  43. },
  44. new TranscodingProfile
  45. {
  46. Container = "jpeg",
  47. Type = DlnaProfileType.Photo
  48. }
  49. };
  50. DirectPlayProfiles = new[]
  51. {
  52. new DirectPlayProfile
  53. {
  54. Container = "ts",
  55. VideoCodec = "h264",
  56. AudioCodec = "ac3,eac3,aac,mp3",
  57. Type = DlnaProfileType.Video
  58. },
  59. new DirectPlayProfile
  60. {
  61. Container = "ts",
  62. VideoCodec = "mpeg2video",
  63. AudioCodec = "mp3,mp2",
  64. Type = DlnaProfileType.Video
  65. },
  66. new DirectPlayProfile
  67. {
  68. Container = "mp4",
  69. VideoCodec = "h264,mpeg4",
  70. AudioCodec = "ac3,eac3,aac,mp3,mp2",
  71. Type = DlnaProfileType.Video
  72. },
  73. new DirectPlayProfile
  74. {
  75. Container = "mov",
  76. VideoCodec = "h264,mpeg4,mjpeg",
  77. AudioCodec = "ac3,eac3,aac,mp3,mp2",
  78. Type = DlnaProfileType.Video
  79. },
  80. new DirectPlayProfile
  81. {
  82. Container = "mkv",
  83. VideoCodec = "h264,mpeg4,vp8",
  84. AudioCodec = "ac3,eac3,aac,mp3,mp2,pcm,vorbis",
  85. Type = DlnaProfileType.Video
  86. },
  87. new DirectPlayProfile
  88. {
  89. Container = "avi",
  90. VideoCodec = "mpeg4",
  91. AudioCodec = "ac3,eac3,mp3",
  92. Type = DlnaProfileType.Video
  93. },
  94. new DirectPlayProfile
  95. {
  96. Container = "avi",
  97. VideoCodec = "mjpeg",
  98. AudioCodec = "pcm",
  99. Type = DlnaProfileType.Video
  100. },
  101. new DirectPlayProfile
  102. {
  103. Container = "mpeg",
  104. VideoCodec = "mpeg2video,mpeg1video",
  105. AudioCodec = "mp3,mp2",
  106. Type = DlnaProfileType.Video
  107. },
  108. new DirectPlayProfile
  109. {
  110. Container = "asf",
  111. VideoCodec = "wmv2,wmv3,vc1",
  112. AudioCodec = "wmav2,wmapro,wmavoice",
  113. Type = DlnaProfileType.Video
  114. },
  115. new DirectPlayProfile
  116. {
  117. Container = "mp3",
  118. AudioCodec = "mp3",
  119. Type = DlnaProfileType.Audio
  120. },
  121. new DirectPlayProfile
  122. {
  123. Container = "mp4",
  124. AudioCodec = "aac",
  125. Type = DlnaProfileType.Audio
  126. },
  127. new DirectPlayProfile
  128. {
  129. Container = "wav",
  130. AudioCodec = "pcm",
  131. Type = DlnaProfileType.Audio
  132. },
  133. new DirectPlayProfile
  134. {
  135. Container = "asf",
  136. AudioCodec = "wmav2,wmapro,wmavoice",
  137. Type = DlnaProfileType.Audio
  138. },
  139. new DirectPlayProfile
  140. {
  141. Container = "jpeg",
  142. Type = DlnaProfileType.Photo
  143. }
  144. };
  145. ContainerProfiles = new[]
  146. {
  147. new ContainerProfile
  148. {
  149. Type = DlnaProfileType.Photo,
  150. Conditions = new []
  151. {
  152. new ProfileCondition
  153. {
  154. Condition = ProfileConditionType.LessThanEqual,
  155. Property = ProfileConditionValue.Width,
  156. Value = "1920"
  157. },
  158. new ProfileCondition
  159. {
  160. Condition = ProfileConditionType.LessThanEqual,
  161. Property = ProfileConditionValue.Height,
  162. Value = "1080"
  163. }
  164. }
  165. }
  166. };
  167. MediaProfiles = new[]
  168. {
  169. new MediaProfile
  170. {
  171. Container = "avi",
  172. MimeType = "video/avi",
  173. Type = DlnaProfileType.Video
  174. },
  175. new MediaProfile
  176. {
  177. Container = "mp4",
  178. MimeType = "video/mp4",
  179. Type = DlnaProfileType.Video
  180. },
  181. new MediaProfile
  182. {
  183. Container = "ts",
  184. MimeType = "video/mpeg",
  185. Type = DlnaProfileType.Video
  186. },
  187. new MediaProfile
  188. {
  189. Container = "wma",
  190. MimeType = "video/x-ms-wma",
  191. Type = DlnaProfileType.Audio
  192. }
  193. };
  194. CodecProfiles = new[]
  195. {
  196. new CodecProfile
  197. {
  198. Type = CodecType.VideoCodec,
  199. Conditions = new []
  200. {
  201. new ProfileCondition
  202. {
  203. Condition = ProfileConditionType.LessThanEqual,
  204. Property = ProfileConditionValue.Width,
  205. Value = "1920"
  206. },
  207. new ProfileCondition
  208. {
  209. Condition = ProfileConditionType.LessThanEqual,
  210. Property = ProfileConditionValue.Height,
  211. Value = "1080"
  212. }
  213. }
  214. }
  215. };
  216. }
  217. }
  218. }