WindowsPhoneProfile.cs 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. using MediaBrowser.Model.Dlna;
  2. using System.Xml.Serialization;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [XmlRoot("Profile")]
  6. public class WindowsPhoneProfile : DefaultProfile
  7. {
  8. public WindowsPhoneProfile()
  9. {
  10. Name = "Windows Phone";
  11. TranscodingProfiles = new[]
  12. {
  13. new TranscodingProfile
  14. {
  15. Container = "mp3",
  16. AudioCodec = "mp3",
  17. Type = DlnaProfileType.Audio
  18. },
  19. new TranscodingProfile
  20. {
  21. Protocol = "hls",
  22. Container = "ts",
  23. VideoCodec = "h264",
  24. AudioCodec = "aac",
  25. Type = DlnaProfileType.Video,
  26. VideoProfile = "Baseline"
  27. },
  28. new TranscodingProfile
  29. {
  30. Container = "mp4",
  31. VideoCodec = "h264",
  32. AudioCodec = "aac",
  33. Type = DlnaProfileType.Video,
  34. VideoProfile = "Baseline"
  35. }
  36. };
  37. DirectPlayProfiles = new[]
  38. {
  39. new DirectPlayProfile
  40. {
  41. Container = "mp4,mov",
  42. VideoCodec = "h264",
  43. AudioCodec = "aac,mp3",
  44. Type = DlnaProfileType.Video
  45. },
  46. new DirectPlayProfile
  47. {
  48. Container = "mp4,avi",
  49. VideoCodec = "mpeg4,msmpeg4",
  50. AudioCodec = "aac,mp3",
  51. Type = DlnaProfileType.Video
  52. },
  53. new DirectPlayProfile
  54. {
  55. Container = "asf",
  56. VideoCodec = "wmv2,wmv3,vc1",
  57. AudioCodec = "wmav2,wmapro,wmavoice",
  58. Type = DlnaProfileType.Video
  59. },
  60. new DirectPlayProfile
  61. {
  62. Container = "asf",
  63. AudioCodec = "wmav2,wmapro,wmavoice",
  64. Type = DlnaProfileType.Audio
  65. },
  66. new DirectPlayProfile
  67. {
  68. Container = "mp4,aac",
  69. AudioCodec = "aac",
  70. Type = DlnaProfileType.Audio
  71. },
  72. new DirectPlayProfile
  73. {
  74. Container = "mp3",
  75. AudioCodec = "mp3",
  76. Type = DlnaProfileType.Audio
  77. },
  78. new DirectPlayProfile
  79. {
  80. Container = "jpeg,png,gif,bmp",
  81. Type = DlnaProfileType.Photo
  82. }
  83. };
  84. CodecProfiles = new[]
  85. {
  86. new CodecProfile
  87. {
  88. Type = CodecType.Video,
  89. Codec="h264",
  90. Conditions = new []
  91. {
  92. new ProfileCondition
  93. {
  94. Condition = ProfileConditionType.LessThanEqual,
  95. Property = ProfileConditionValue.Width,
  96. Value = "800"
  97. },
  98. new ProfileCondition
  99. {
  100. Condition = ProfileConditionType.LessThanEqual,
  101. Property = ProfileConditionValue.Height,
  102. Value = "480"
  103. },
  104. new ProfileCondition
  105. {
  106. Condition = ProfileConditionType.LessThanEqual,
  107. Property = ProfileConditionValue.VideoBitrate,
  108. Value = "1000000",
  109. IsRequired = false
  110. },
  111. new ProfileCondition
  112. {
  113. Condition = ProfileConditionType.LessThanEqual,
  114. Property = ProfileConditionValue.VideoFramerate,
  115. Value = "24",
  116. IsRequired = false
  117. },
  118. new ProfileCondition
  119. {
  120. Condition = ProfileConditionType.LessThanEqual,
  121. Property = ProfileConditionValue.VideoLevel,
  122. Value = "3"
  123. }
  124. }
  125. },
  126. new CodecProfile
  127. {
  128. Type = CodecType.Video,
  129. Conditions = new []
  130. {
  131. new ProfileCondition
  132. {
  133. Condition = ProfileConditionType.LessThanEqual,
  134. Property = ProfileConditionValue.Width,
  135. Value = "800"
  136. },
  137. new ProfileCondition
  138. {
  139. Condition = ProfileConditionType.LessThanEqual,
  140. Property = ProfileConditionValue.Height,
  141. Value = "480"
  142. },
  143. new ProfileCondition
  144. {
  145. Condition = ProfileConditionType.LessThanEqual,
  146. Property = ProfileConditionValue.VideoBitrate,
  147. Value = "1000000",
  148. IsRequired = false
  149. },
  150. new ProfileCondition
  151. {
  152. Condition = ProfileConditionType.LessThanEqual,
  153. Property = ProfileConditionValue.VideoFramerate,
  154. Value = "24",
  155. IsRequired = false
  156. }
  157. }
  158. },
  159. new CodecProfile
  160. {
  161. Type = CodecType.VideoAudio,
  162. Conditions = new []
  163. {
  164. new ProfileCondition
  165. {
  166. Condition = ProfileConditionType.LessThanEqual,
  167. Property = ProfileConditionValue.AudioBitrate,
  168. Value = "128000"
  169. },
  170. new ProfileCondition
  171. {
  172. Condition = ProfileConditionType.LessThanEqual,
  173. Property = ProfileConditionValue.AudioChannels,
  174. Value = "2"
  175. }
  176. }
  177. },
  178. new CodecProfile
  179. {
  180. Type = CodecType.Audio,
  181. Conditions = new []
  182. {
  183. new ProfileCondition
  184. {
  185. Condition = ProfileConditionType.LessThanEqual,
  186. Property = ProfileConditionValue.AudioBitrate,
  187. Value = "128000"
  188. }
  189. }
  190. }
  191. };
  192. }
  193. }
  194. }