PopcornHourProfile.cs 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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 PopcornHourProfile : DefaultProfile
  8. {
  9. public PopcornHourProfile()
  10. {
  11. Name = "Popcorn Hour";
  12. TranscodingProfiles = new[]
  13. {
  14. new TranscodingProfile
  15. {
  16. Container = "mp3",
  17. AudioCodec = "mp3",
  18. Type = DlnaProfileType.Audio
  19. },
  20. new TranscodingProfile
  21. {
  22. Container = "mp4",
  23. Type = DlnaProfileType.Video,
  24. AudioCodec = "aac",
  25. VideoCodec = "h264"
  26. },
  27. new TranscodingProfile
  28. {
  29. Container = "jpeg",
  30. Type = DlnaProfileType.Photo
  31. }
  32. };
  33. DirectPlayProfiles = new[]
  34. {
  35. new DirectPlayProfile
  36. {
  37. Container = "mp4,mov,m4v",
  38. Type = DlnaProfileType.Video,
  39. VideoCodec = "h264,mpeg4",
  40. AudioCodec = "aac"
  41. },
  42. new DirectPlayProfile
  43. {
  44. Container = "ts,mpegts",
  45. Type = DlnaProfileType.Video,
  46. VideoCodec = "h264",
  47. AudioCodec = "aac,ac3,eac3,mp3,mp2,pcm"
  48. },
  49. new DirectPlayProfile
  50. {
  51. Container = "asf,wmv",
  52. Type = DlnaProfileType.Video,
  53. VideoCodec = "wmv3,vc1",
  54. AudioCodec = "wmav2,wmapro"
  55. },
  56. new DirectPlayProfile
  57. {
  58. Container = "avi",
  59. Type = DlnaProfileType.Video,
  60. VideoCodec = "mpeg4,msmpeg4",
  61. AudioCodec = "mp3,ac3,eac3,mp2,pcm"
  62. },
  63. new DirectPlayProfile
  64. {
  65. Container = "mkv",
  66. Type = DlnaProfileType.Video,
  67. VideoCodec = "h264",
  68. AudioCodec = "aac,mp3,ac3,eac3,mp2,pcm"
  69. },
  70. new DirectPlayProfile
  71. {
  72. Container = "aac,mp3,flac,ogg,wma,wav",
  73. Type = DlnaProfileType.Audio
  74. },
  75. new DirectPlayProfile
  76. {
  77. Container = "jpeg,gif,bmp,png",
  78. Type = DlnaProfileType.Photo
  79. }
  80. };
  81. CodecProfiles = new[]
  82. {
  83. new CodecProfile
  84. {
  85. Type = CodecType.Video,
  86. Codec="h264",
  87. Conditions = new []
  88. {
  89. new ProfileCondition(ProfileConditionType.EqualsAny, ProfileConditionValue.VideoProfile, "baseline|constrained baseline"),
  90. new ProfileCondition
  91. {
  92. Condition = ProfileConditionType.LessThanEqual,
  93. Property = ProfileConditionValue.Width,
  94. Value = "1920"
  95. },
  96. new ProfileCondition
  97. {
  98. Condition = ProfileConditionType.LessThanEqual,
  99. Property = ProfileConditionValue.Height,
  100. Value = "1080"
  101. },
  102. new ProfileCondition
  103. {
  104. Condition = ProfileConditionType.NotEquals,
  105. Property = ProfileConditionValue.IsAnamorphic,
  106. Value = "true",
  107. IsRequired = false
  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. },
  122. new ProfileCondition
  123. {
  124. Condition = ProfileConditionType.LessThanEqual,
  125. Property = ProfileConditionValue.Height,
  126. Value = "1080"
  127. },
  128. new ProfileCondition
  129. {
  130. Condition = ProfileConditionType.NotEquals,
  131. Property = ProfileConditionValue.IsAnamorphic,
  132. Value = "true",
  133. IsRequired = false
  134. }
  135. }
  136. },
  137. new CodecProfile
  138. {
  139. Type = CodecType.VideoAudio,
  140. Codec = "aac",
  141. Conditions = new []
  142. {
  143. new ProfileCondition
  144. {
  145. Condition = ProfileConditionType.LessThanEqual,
  146. Property = ProfileConditionValue.AudioChannels,
  147. Value = "2",
  148. IsRequired = false
  149. }
  150. }
  151. },
  152. new CodecProfile
  153. {
  154. Type = CodecType.Audio,
  155. Codec = "aac",
  156. Conditions = new []
  157. {
  158. new ProfileCondition
  159. {
  160. Condition = ProfileConditionType.LessThanEqual,
  161. Property = ProfileConditionValue.AudioChannels,
  162. Value = "2",
  163. IsRequired = false
  164. }
  165. }
  166. },
  167. new CodecProfile
  168. {
  169. Type = CodecType.Audio,
  170. Codec = "mp3",
  171. Conditions = new []
  172. {
  173. new ProfileCondition
  174. {
  175. Condition = ProfileConditionType.LessThanEqual,
  176. Property = ProfileConditionValue.AudioChannels,
  177. Value = "2",
  178. IsRequired = false
  179. },
  180. new ProfileCondition
  181. {
  182. Condition = ProfileConditionType.LessThanEqual,
  183. Property = ProfileConditionValue.AudioBitrate,
  184. Value = "320000",
  185. IsRequired = false
  186. }
  187. }
  188. }
  189. };
  190. ResponseProfiles = new ResponseProfile[]
  191. {
  192. new ResponseProfile
  193. {
  194. Container = "m4v",
  195. Type = DlnaProfileType.Video,
  196. MimeType = "video/mp4"
  197. }
  198. };
  199. SubtitleProfiles = new[]
  200. {
  201. new SubtitleProfile
  202. {
  203. Format = "srt",
  204. Method = SubtitleDeliveryMethod.Embed
  205. }
  206. };
  207. }
  208. }
  209. }