DishHopperJoeyProfile.cs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. using MediaBrowser.Model.Dlna;
  2. using System.Xml.Serialization;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [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/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 ="XiP"
  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",
  59. AudioCodec = "mp3",
  60. Type = DlnaProfileType.Audio
  61. },
  62. new DirectPlayProfile
  63. {
  64. Container = "alac",
  65. AudioCodec = "alac",
  66. Type = DlnaProfileType.Audio
  67. },
  68. new DirectPlayProfile
  69. {
  70. Container = "flac",
  71. AudioCodec = "flac",
  72. Type = DlnaProfileType.Audio
  73. },
  74. new DirectPlayProfile
  75. {
  76. Container = "jpeg",
  77. Type = DlnaProfileType.Photo
  78. }
  79. };
  80. CodecProfiles = new[]
  81. {
  82. new CodecProfile
  83. {
  84. Type = CodecType.Video,
  85. Codec = "h264",
  86. Conditions = new []
  87. {
  88. new ProfileCondition
  89. {
  90. Condition = ProfileConditionType.LessThanEqual,
  91. Property = ProfileConditionValue.Width,
  92. Value = "1920",
  93. IsRequired = true
  94. },
  95. new ProfileCondition
  96. {
  97. Condition = ProfileConditionType.LessThanEqual,
  98. Property = ProfileConditionValue.Height,
  99. Value = "1080",
  100. IsRequired = true
  101. },
  102. new ProfileCondition
  103. {
  104. Condition = ProfileConditionType.LessThanEqual,
  105. Property = ProfileConditionValue.VideoFramerate,
  106. Value = "30",
  107. IsRequired = true
  108. },
  109. new ProfileCondition
  110. {
  111. Condition = ProfileConditionType.LessThanEqual,
  112. Property = ProfileConditionValue.VideoBitrate,
  113. Value = "20000000",
  114. IsRequired = true
  115. },
  116. new ProfileCondition
  117. {
  118. Condition = ProfileConditionType.LessThanEqual,
  119. Property = ProfileConditionValue.VideoLevel,
  120. Value = "41",
  121. IsRequired = true
  122. }
  123. }
  124. },
  125. new CodecProfile
  126. {
  127. Type = CodecType.Video,
  128. Conditions = new []
  129. {
  130. new ProfileCondition
  131. {
  132. Condition = ProfileConditionType.LessThanEqual,
  133. Property = ProfileConditionValue.Width,
  134. Value = "1920",
  135. IsRequired = true
  136. },
  137. new ProfileCondition
  138. {
  139. Condition = ProfileConditionType.LessThanEqual,
  140. Property = ProfileConditionValue.Height,
  141. Value = "1080",
  142. IsRequired = true
  143. },
  144. new ProfileCondition
  145. {
  146. Condition = ProfileConditionType.LessThanEqual,
  147. Property = ProfileConditionValue.VideoFramerate,
  148. Value = "30",
  149. IsRequired = true
  150. },
  151. new ProfileCondition
  152. {
  153. Condition = ProfileConditionType.LessThanEqual,
  154. Property = ProfileConditionValue.VideoBitrate,
  155. Value = "20000000",
  156. IsRequired = true
  157. }
  158. }
  159. },
  160. new CodecProfile
  161. {
  162. Type = CodecType.VideoAudio,
  163. Codec = "ac3,he-aac",
  164. Conditions = new []
  165. {
  166. new ProfileCondition
  167. {
  168. Condition = ProfileConditionType.LessThanEqual,
  169. Property = ProfileConditionValue.AudioChannels,
  170. Value = "6",
  171. IsRequired = true
  172. }
  173. }
  174. },
  175. new CodecProfile
  176. {
  177. Type = CodecType.VideoAudio,
  178. Codec = "aac",
  179. Conditions = new []
  180. {
  181. new ProfileCondition
  182. {
  183. Condition = ProfileConditionType.LessThanEqual,
  184. Property = ProfileConditionValue.AudioChannels,
  185. Value = "2",
  186. IsRequired = true
  187. }
  188. }
  189. }
  190. };
  191. ResponseProfiles = new[]
  192. {
  193. new ResponseProfile
  194. {
  195. Container = "mkv,ts",
  196. Type = DlnaProfileType.Video,
  197. MimeType = "video/mp4"
  198. }
  199. };
  200. }
  201. }
  202. }