SamsungSmartTvProfile.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. using System.Xml.Serialization;
  2. using MediaBrowser.Controller.Dlna;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [XmlRoot("Profile")]
  6. public class SamsungSmartTvProfile : DefaultProfile
  7. {
  8. public SamsungSmartTvProfile()
  9. {
  10. Name = "Samsung Smart TV";
  11. EnableAlbumArtInDidl = true;
  12. Identification = new DeviceIdentification
  13. {
  14. ModelUrl = "samsung.com"
  15. };
  16. TranscodingProfiles = new[]
  17. {
  18. new TranscodingProfile
  19. {
  20. Container = "mp3",
  21. AudioCodec = "mp3",
  22. Type = DlnaProfileType.Audio
  23. },
  24. new TranscodingProfile
  25. {
  26. Container = "ts",
  27. AudioCodec = "ac3",
  28. VideoCodec = "h264",
  29. Type = DlnaProfileType.Video
  30. },
  31. new TranscodingProfile
  32. {
  33. Container = "jpeg",
  34. Type = DlnaProfileType.Photo
  35. }
  36. };
  37. DirectPlayProfiles = new[]
  38. {
  39. new DirectPlayProfile
  40. {
  41. Container = "asf",
  42. VideoCodec = "h264,mpeg4,mjpeg",
  43. AudioCodec = "mp3,ac3,wmav2,wmapro,wmavoice",
  44. Type = DlnaProfileType.Video
  45. },
  46. new DirectPlayProfile
  47. {
  48. Container = "avi",
  49. VideoCodec = "h264,mpeg4,mjpeg",
  50. AudioCodec = "mp3,ac3,dca",
  51. Type = DlnaProfileType.Video
  52. },
  53. new DirectPlayProfile
  54. {
  55. Container = "mkv",
  56. VideoCodec = "h264,mpeg4,mjpeg4",
  57. AudioCodec = "mp3,ac3,dca,aac",
  58. Type = DlnaProfileType.Video
  59. },
  60. new DirectPlayProfile
  61. {
  62. Container = "mp4",
  63. VideoCodec = "h264,mpeg4",
  64. AudioCodec = "mp3,aac",
  65. Type = DlnaProfileType.Video
  66. },
  67. new DirectPlayProfile
  68. {
  69. Container = "3gpp",
  70. VideoCodec = "h264,mpeg4",
  71. AudioCodec = "aac,he-aac",
  72. Type = DlnaProfileType.Video
  73. },
  74. new DirectPlayProfile
  75. {
  76. Container = "mpg,mpeg",
  77. VideoCodec = "mpeg1video,mpeg2video,h264",
  78. AudioCodec = "ac3,mp2,mp3,aac",
  79. Type = DlnaProfileType.Video
  80. },
  81. new DirectPlayProfile
  82. {
  83. Container = "vro,vob",
  84. VideoCodec = "mpeg1video,mpeg2video",
  85. AudioCodec = "ac3,mp2,mp3",
  86. Type = DlnaProfileType.Video
  87. },
  88. new DirectPlayProfile
  89. {
  90. Container = "ts",
  91. VideoCodec = "mpeg2video,h264,vc1",
  92. AudioCodec = "ac3,aac,mp3,eac3",
  93. Type = DlnaProfileType.Video
  94. },
  95. new DirectPlayProfile
  96. {
  97. Container = "asf",
  98. VideoCodec = "wmv2,wmv3",
  99. AudioCodec = "wmav2,wmavoice",
  100. Type = DlnaProfileType.Video
  101. },
  102. new DirectPlayProfile
  103. {
  104. Container = "mp3",
  105. AudioCodec = "mp3",
  106. Type = DlnaProfileType.Audio
  107. },
  108. new DirectPlayProfile
  109. {
  110. Container = "jpeg",
  111. Type = DlnaProfileType.Photo
  112. }
  113. };
  114. ContainerProfiles = new[]
  115. {
  116. new ContainerProfile
  117. {
  118. Type = DlnaProfileType.Photo,
  119. Conditions = new []
  120. {
  121. new ProfileCondition
  122. {
  123. Condition = ProfileConditionType.LessThanEqual,
  124. Property = ProfileConditionValue.Width,
  125. Value = "1920"
  126. },
  127. new ProfileCondition
  128. {
  129. Condition = ProfileConditionType.LessThanEqual,
  130. Property = ProfileConditionValue.Height,
  131. Value = "1080"
  132. }
  133. }
  134. }
  135. };
  136. CodecProfiles = new[]
  137. {
  138. new CodecProfile
  139. {
  140. Type = CodecType.Video,
  141. Codec = "mpeg2video",
  142. Conditions = new[]
  143. {
  144. new ProfileCondition
  145. {
  146. Condition = ProfileConditionType.LessThanEqual,
  147. Property = ProfileConditionValue.Width,
  148. Value = "1920"
  149. },
  150. new ProfileCondition
  151. {
  152. Condition = ProfileConditionType.LessThanEqual,
  153. Property = ProfileConditionValue.Height,
  154. Value = "1080"
  155. },
  156. new ProfileCondition
  157. {
  158. Condition = ProfileConditionType.LessThanEqual,
  159. Property = ProfileConditionValue.VideoFramerate,
  160. Value = "30"
  161. },
  162. new ProfileCondition
  163. {
  164. Condition = ProfileConditionType.LessThanEqual,
  165. Property = ProfileConditionValue.VideoBitrate,
  166. Value = "30720000"
  167. }
  168. }
  169. },
  170. new CodecProfile
  171. {
  172. Type = CodecType.Video,
  173. Codec = "mpeg4",
  174. Conditions = new[]
  175. {
  176. new ProfileCondition
  177. {
  178. Condition = ProfileConditionType.LessThanEqual,
  179. Property = ProfileConditionValue.Width,
  180. Value = "1920"
  181. },
  182. new ProfileCondition
  183. {
  184. Condition = ProfileConditionType.LessThanEqual,
  185. Property = ProfileConditionValue.Height,
  186. Value = "1080"
  187. },
  188. new ProfileCondition
  189. {
  190. Condition = ProfileConditionType.LessThanEqual,
  191. Property = ProfileConditionValue.VideoFramerate,
  192. Value = "30"
  193. },
  194. new ProfileCondition
  195. {
  196. Condition = ProfileConditionType.LessThanEqual,
  197. Property = ProfileConditionValue.VideoBitrate,
  198. Value = "8192000"
  199. }
  200. }
  201. },
  202. new CodecProfile
  203. {
  204. Type = CodecType.Video,
  205. Codec = "h264",
  206. Conditions = new[]
  207. {
  208. new ProfileCondition
  209. {
  210. Condition = ProfileConditionType.LessThanEqual,
  211. Property = ProfileConditionValue.Width,
  212. Value = "1920"
  213. },
  214. new ProfileCondition
  215. {
  216. Condition = ProfileConditionType.LessThanEqual,
  217. Property = ProfileConditionValue.Height,
  218. Value = "1080"
  219. },
  220. new ProfileCondition
  221. {
  222. Condition = ProfileConditionType.LessThanEqual,
  223. Property = ProfileConditionValue.VideoFramerate,
  224. Value = "30"
  225. },
  226. new ProfileCondition
  227. {
  228. Condition = ProfileConditionType.LessThanEqual,
  229. Property = ProfileConditionValue.VideoBitrate,
  230. Value = "37500000"
  231. },
  232. new ProfileCondition
  233. {
  234. Condition = ProfileConditionType.LessThanEqual,
  235. Property = ProfileConditionValue.VideoLevel,
  236. Value = "41"
  237. }
  238. }
  239. },
  240. new CodecProfile
  241. {
  242. Type = CodecType.Video,
  243. Codec = "wmv2,wmv3,vc1",
  244. Conditions = new[]
  245. {
  246. new ProfileCondition
  247. {
  248. Condition = ProfileConditionType.LessThanEqual,
  249. Property = ProfileConditionValue.Width,
  250. Value = "1920"
  251. },
  252. new ProfileCondition
  253. {
  254. Condition = ProfileConditionType.LessThanEqual,
  255. Property = ProfileConditionValue.Height,
  256. Value = "1080"
  257. },
  258. new ProfileCondition
  259. {
  260. Condition = ProfileConditionType.LessThanEqual,
  261. Property = ProfileConditionValue.VideoFramerate,
  262. Value = "30"
  263. },
  264. new ProfileCondition
  265. {
  266. Condition = ProfileConditionType.LessThanEqual,
  267. Property = ProfileConditionValue.VideoBitrate,
  268. Value = "25600000"
  269. }
  270. }
  271. },
  272. new CodecProfile
  273. {
  274. Type = CodecType.VideoAudio,
  275. Codec = "ac3,wmav2,dca,aac,mp3",
  276. Conditions = new[]
  277. {
  278. new ProfileCondition
  279. {
  280. Condition = ProfileConditionType.LessThanEqual,
  281. Property = ProfileConditionValue.AudioChannels,
  282. Value = "6"
  283. }
  284. }
  285. }
  286. };
  287. MediaProfiles = new[]
  288. {
  289. new MediaProfile
  290. {
  291. Container = "avi",
  292. MimeType = "video/x-msvideo",
  293. Type = DlnaProfileType.Video
  294. },
  295. new MediaProfile
  296. {
  297. Container = "mkv",
  298. MimeType = "video/x-mkv",
  299. Type = DlnaProfileType.Video
  300. }
  301. };
  302. }
  303. }
  304. }