DishHopperJoeyProfile.cs 8.1 KB

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