SamsungSmartTvProfile.cs 12 KB

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