PopcornHourProfile.cs 7.6 KB

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