SamsungSmartTvProfile.cs 13 KB

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