DishHopperJoeyProfile.cs 8.1 KB

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