WdtvLiveProfile.cs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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 WdtvLiveProfile : DefaultProfile
  7. {
  8. public WdtvLiveProfile()
  9. {
  10. Name = "WDTV Live";
  11. TimelineOffsetSeconds = 5;
  12. IgnoreTranscodeByteRangeRequests = true;
  13. Identification = new DeviceIdentification
  14. {
  15. ModelName = "WD TV",
  16. Headers = new[]
  17. {
  18. new HttpHeaderInfo {Name = "User-Agent", Value = "alphanetworks", Match = HeaderMatchType.Substring},
  19. new HttpHeaderInfo
  20. {
  21. Name = "User-Agent",
  22. Value = "ALPHA Networks",
  23. Match = HeaderMatchType.Substring
  24. }
  25. }
  26. };
  27. TranscodingProfiles = new[]
  28. {
  29. new TranscodingProfile
  30. {
  31. Container = "mp3",
  32. Type = DlnaProfileType.Audio,
  33. AudioCodec = "mp3"
  34. },
  35. new TranscodingProfile
  36. {
  37. Container = "ts",
  38. Type = DlnaProfileType.Video,
  39. VideoCodec = "h264",
  40. AudioCodec = "aac"
  41. },
  42. new TranscodingProfile
  43. {
  44. Container = "jpeg",
  45. Type = DlnaProfileType.Photo
  46. }
  47. };
  48. DirectPlayProfiles = new[]
  49. {
  50. new DirectPlayProfile
  51. {
  52. Container = "avi",
  53. Type = DlnaProfileType.Video,
  54. VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1",
  55. AudioCodec = "ac3,eac3,dca,mp2,mp3,pcm,dts"
  56. },
  57. new DirectPlayProfile
  58. {
  59. Container = "mpeg",
  60. Type = DlnaProfileType.Video,
  61. VideoCodec = "mpeg1video,mpeg2video",
  62. AudioCodec = "ac3,eac3,dca,mp2,mp3,pcm,dts"
  63. },
  64. new DirectPlayProfile
  65. {
  66. Container = "mkv",
  67. Type = DlnaProfileType.Video,
  68. VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1",
  69. AudioCodec = "ac3,eac3,dca,aac,mp2,mp3,pcm,dts"
  70. },
  71. new DirectPlayProfile
  72. {
  73. Container = "ts,m2ts,mpegts",
  74. Type = DlnaProfileType.Video,
  75. VideoCodec = "mpeg1video,mpeg2video,h264,vc1",
  76. AudioCodec = "ac3,eac3,dca,mp2,mp3,aac,dts"
  77. },
  78. new DirectPlayProfile
  79. {
  80. Container = "mp4,mov,m4v",
  81. Type = DlnaProfileType.Video,
  82. VideoCodec = "h264,mpeg4",
  83. AudioCodec = "ac3,eac3,aac,mp2,mp3,dca,dts"
  84. },
  85. new DirectPlayProfile
  86. {
  87. Container = "asf",
  88. Type = DlnaProfileType.Video,
  89. VideoCodec = "vc1",
  90. AudioCodec = "wmav2,wmapro"
  91. },
  92. new DirectPlayProfile
  93. {
  94. Container = "asf",
  95. Type = DlnaProfileType.Video,
  96. VideoCodec = "mpeg2video",
  97. AudioCodec = "mp2,ac3"
  98. },
  99. new DirectPlayProfile
  100. {
  101. Container = "mp3",
  102. AudioCodec = "mp2,mp3",
  103. Type = DlnaProfileType.Audio
  104. },
  105. new DirectPlayProfile
  106. {
  107. Container = "mp4",
  108. AudioCodec = "mp4",
  109. Type = DlnaProfileType.Audio
  110. },
  111. new DirectPlayProfile
  112. {
  113. Container = "flac",
  114. Type = DlnaProfileType.Audio
  115. },
  116. new DirectPlayProfile
  117. {
  118. Container = "asf",
  119. AudioCodec = "wmav2,wmapro,wmavoice",
  120. Type = DlnaProfileType.Audio
  121. },
  122. new DirectPlayProfile
  123. {
  124. Container = "ogg",
  125. AudioCodec = "vorbis",
  126. Type = DlnaProfileType.Audio
  127. },
  128. new DirectPlayProfile
  129. {
  130. Type = DlnaProfileType.Photo,
  131. Container = "jpeg,png,gif,bmp,tiff"
  132. }
  133. };
  134. ResponseProfiles = new[]
  135. {
  136. new ResponseProfile
  137. {
  138. Container = "ts,mpegts",
  139. OrgPn = "MPEG_TS_SD_NA",
  140. Type = DlnaProfileType.Video
  141. }
  142. };
  143. ContainerProfiles = new[]
  144. {
  145. new ContainerProfile
  146. {
  147. Type = DlnaProfileType.Photo,
  148. Conditions = new []
  149. {
  150. new ProfileCondition
  151. {
  152. Condition = ProfileConditionType.LessThanEqual,
  153. Property = ProfileConditionValue.Width,
  154. Value = "1920"
  155. },
  156. new ProfileCondition
  157. {
  158. Condition = ProfileConditionType.LessThanEqual,
  159. Property = ProfileConditionValue.Height,
  160. Value = "1080"
  161. }
  162. }
  163. }
  164. };
  165. CodecProfiles = new[]
  166. {
  167. new CodecProfile
  168. {
  169. Type = CodecType.Video,
  170. Codec = "h264",
  171. Conditions = new []
  172. {
  173. new ProfileCondition
  174. {
  175. Condition = ProfileConditionType.LessThanEqual,
  176. Property = ProfileConditionValue.Width,
  177. Value = "1920"
  178. },
  179. new ProfileCondition
  180. {
  181. Condition = ProfileConditionType.LessThanEqual,
  182. Property = ProfileConditionValue.Height,
  183. Value = "1080"
  184. },
  185. new ProfileCondition
  186. {
  187. Condition = ProfileConditionType.LessThanEqual,
  188. Property = ProfileConditionValue.VideoLevel,
  189. Value = "41"
  190. }
  191. }
  192. },
  193. new CodecProfile
  194. {
  195. Type = CodecType.VideoAudio,
  196. Codec = "aac",
  197. Conditions = new []
  198. {
  199. new ProfileCondition
  200. {
  201. Condition = ProfileConditionType.LessThanEqual,
  202. Property = ProfileConditionValue.AudioChannels,
  203. Value = "2"
  204. }
  205. }
  206. }
  207. };
  208. SubtitleProfiles = new[]
  209. {
  210. new SubtitleProfile
  211. {
  212. Format = "srt",
  213. Method = SubtitleDeliveryMethod.External
  214. },
  215. new SubtitleProfile
  216. {
  217. Format = "srt",
  218. Method = SubtitleDeliveryMethod.Embed
  219. },
  220. new SubtitleProfile
  221. {
  222. Format = "sub",
  223. Method = SubtitleDeliveryMethod.Embed
  224. },
  225. new SubtitleProfile
  226. {
  227. Format = "subrip",
  228. Method = SubtitleDeliveryMethod.Embed
  229. },
  230. new SubtitleProfile
  231. {
  232. Format = "idx",
  233. Method = SubtitleDeliveryMethod.Embed
  234. }
  235. };
  236. }
  237. }
  238. }