DishHopperJoeyProfile.cs 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. using MediaBrowser.Model.Dlna;
  2. namespace Emby.Dlna.Profiles
  3. {
  4. [System.Xml.Serialization.XmlRoot("Profile")]
  5. public class DishHopperJoeyProfile : DefaultProfile
  6. {
  7. public DishHopperJoeyProfile()
  8. {
  9. Name = "Dish Hopper-Joey";
  10. ProtocolInfo = "http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*";
  11. Identification = new DeviceIdentification
  12. {
  13. Manufacturer = "Echostar Technologies LLC",
  14. ManufacturerUrl = "http://www.echostar.com",
  15. Headers = new[]
  16. {
  17. new HttpHeaderInfo
  18. {
  19. Match = HeaderMatchType.Substring,
  20. Name = "User-Agent",
  21. Value ="Zip_"
  22. }
  23. }
  24. };
  25. TranscodingProfiles = new[]
  26. {
  27. new TranscodingProfile
  28. {
  29. Container = "mp3",
  30. AudioCodec = "mp3",
  31. Type = DlnaProfileType.Audio
  32. },
  33. new TranscodingProfile
  34. {
  35. Container = "mp4",
  36. Type = DlnaProfileType.Video,
  37. AudioCodec = "aac",
  38. VideoCodec = "h264"
  39. },
  40. new TranscodingProfile
  41. {
  42. Container = "jpeg",
  43. Type = DlnaProfileType.Photo
  44. }
  45. };
  46. DirectPlayProfiles = new[]
  47. {
  48. new DirectPlayProfile
  49. {
  50. Container = "mp4,mkv,mpeg,ts",
  51. VideoCodec = "h264,mpeg2video",
  52. AudioCodec = "mp3,ac3,aac,he-aac,pcm",
  53. Type = DlnaProfileType.Video
  54. },
  55. new DirectPlayProfile
  56. {
  57. Container = "mp3,alac,flac",
  58. Type = DlnaProfileType.Audio
  59. },
  60. new DirectPlayProfile
  61. {
  62. Container = "jpeg",
  63. Type = DlnaProfileType.Photo
  64. }
  65. };
  66. CodecProfiles = new[]
  67. {
  68. new CodecProfile
  69. {
  70. Type = CodecType.Video,
  71. Codec = "h264",
  72. Conditions = new []
  73. {
  74. new ProfileCondition
  75. {
  76. Condition = ProfileConditionType.LessThanEqual,
  77. Property = ProfileConditionValue.Width,
  78. Value = "1920",
  79. IsRequired = true
  80. },
  81. new ProfileCondition
  82. {
  83. Condition = ProfileConditionType.LessThanEqual,
  84. Property = ProfileConditionValue.Height,
  85. Value = "1080",
  86. IsRequired = true
  87. },
  88. new ProfileCondition
  89. {
  90. Condition = ProfileConditionType.LessThanEqual,
  91. Property = ProfileConditionValue.VideoFramerate,
  92. Value = "30",
  93. IsRequired = true
  94. },
  95. new ProfileCondition
  96. {
  97. Condition = ProfileConditionType.LessThanEqual,
  98. Property = ProfileConditionValue.VideoBitrate,
  99. Value = "20000000",
  100. IsRequired = true
  101. },
  102. new ProfileCondition
  103. {
  104. Condition = ProfileConditionType.LessThanEqual,
  105. Property = ProfileConditionValue.VideoLevel,
  106. Value = "41",
  107. IsRequired = true
  108. }
  109. }
  110. },
  111. new CodecProfile
  112. {
  113. Type = CodecType.Video,
  114. Conditions = new []
  115. {
  116. new ProfileCondition
  117. {
  118. Condition = ProfileConditionType.LessThanEqual,
  119. Property = ProfileConditionValue.Width,
  120. Value = "1920",
  121. IsRequired = true
  122. },
  123. new ProfileCondition
  124. {
  125. Condition = ProfileConditionType.LessThanEqual,
  126. Property = ProfileConditionValue.Height,
  127. Value = "1080",
  128. IsRequired = true
  129. },
  130. new ProfileCondition
  131. {
  132. Condition = ProfileConditionType.LessThanEqual,
  133. Property = ProfileConditionValue.VideoFramerate,
  134. Value = "30",
  135. IsRequired = true
  136. },
  137. new ProfileCondition
  138. {
  139. Condition = ProfileConditionType.LessThanEqual,
  140. Property = ProfileConditionValue.VideoBitrate,
  141. Value = "20000000",
  142. IsRequired = true
  143. }
  144. }
  145. },
  146. new CodecProfile
  147. {
  148. Type = CodecType.VideoAudio,
  149. Codec = "ac3,he-aac",
  150. Conditions = new []
  151. {
  152. new ProfileCondition
  153. {
  154. Condition = ProfileConditionType.LessThanEqual,
  155. Property = ProfileConditionValue.AudioChannels,
  156. Value = "6",
  157. IsRequired = true
  158. }
  159. }
  160. },
  161. new CodecProfile
  162. {
  163. Type = CodecType.VideoAudio,
  164. Codec = "aac",
  165. Conditions = new []
  166. {
  167. new ProfileCondition
  168. {
  169. Condition = ProfileConditionType.LessThanEqual,
  170. Property = ProfileConditionValue.AudioChannels,
  171. Value = "2",
  172. IsRequired = true
  173. }
  174. }
  175. },
  176. new CodecProfile
  177. {
  178. Type = CodecType.VideoAudio,
  179. Conditions = new []
  180. {
  181. // The device does not have any audio switching capabilities
  182. new ProfileCondition
  183. {
  184. Condition = ProfileConditionType.Equals,
  185. Property = ProfileConditionValue.IsSecondaryAudio,
  186. Value = "false"
  187. }
  188. }
  189. }
  190. };
  191. ResponseProfiles = new[]
  192. {
  193. new ResponseProfile
  194. {
  195. Container = "mkv,ts,mpegts",
  196. Type = DlnaProfileType.Video,
  197. MimeType = "video/mp4"
  198. }
  199. };
  200. SubtitleProfiles = new[]
  201. {
  202. new SubtitleProfile
  203. {
  204. Format = "srt",
  205. Method = SubtitleDeliveryMethod.Embed
  206. }
  207. };
  208. }
  209. }
  210. }