SamsungSmartTvProfile.cs 12 KB

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