WindowsPhoneProfile.cs 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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. Container = "mp4",
  22. VideoCodec = "h264",
  23. AudioCodec = "aac",
  24. Type = DlnaProfileType.Video,
  25. VideoProfile = "Baseline"
  26. }
  27. };
  28. DirectPlayProfiles = new[]
  29. {
  30. new DirectPlayProfile
  31. {
  32. Container = "mp4,mov",
  33. VideoCodec = "h264",
  34. AudioCodec = "aac,mp3",
  35. Type = DlnaProfileType.Video
  36. },
  37. new DirectPlayProfile
  38. {
  39. Container = "mp4,avi",
  40. VideoCodec = "mpeg4,msmpeg4",
  41. AudioCodec = "aac,mp3",
  42. Type = DlnaProfileType.Video
  43. },
  44. new DirectPlayProfile
  45. {
  46. Container = "asf",
  47. VideoCodec = "wmv2,wmv3,vc1",
  48. AudioCodec = "wmav2,wmapro,wmavoice",
  49. Type = DlnaProfileType.Video
  50. },
  51. new DirectPlayProfile
  52. {
  53. Container = "asf",
  54. AudioCodec = "wmav2,wmapro,wmavoice",
  55. Type = DlnaProfileType.Audio
  56. },
  57. new DirectPlayProfile
  58. {
  59. Container = "mp4,aac",
  60. AudioCodec = "aac",
  61. Type = DlnaProfileType.Audio
  62. },
  63. new DirectPlayProfile
  64. {
  65. Container = "mp3",
  66. AudioCodec = "mp3",
  67. Type = DlnaProfileType.Audio
  68. },
  69. new DirectPlayProfile
  70. {
  71. Container = "jpeg,png,gif,bmp",
  72. Type = DlnaProfileType.Photo
  73. }
  74. };
  75. CodecProfiles = new[]
  76. {
  77. new CodecProfile
  78. {
  79. Type = CodecType.Video,
  80. Codec="h264",
  81. Conditions = new []
  82. {
  83. new ProfileCondition
  84. {
  85. Condition = ProfileConditionType.LessThanEqual,
  86. Property = ProfileConditionValue.Width,
  87. Value = "800"
  88. },
  89. new ProfileCondition
  90. {
  91. Condition = ProfileConditionType.LessThanEqual,
  92. Property = ProfileConditionValue.Height,
  93. Value = "480"
  94. },
  95. new ProfileCondition
  96. {
  97. Condition = ProfileConditionType.LessThanEqual,
  98. Property = ProfileConditionValue.VideoBitrate,
  99. Value = "1000000",
  100. IsRequired = false
  101. },
  102. new ProfileCondition
  103. {
  104. Condition = ProfileConditionType.LessThanEqual,
  105. Property = ProfileConditionValue.VideoFramerate,
  106. Value = "24",
  107. IsRequired = false
  108. },
  109. new ProfileCondition
  110. {
  111. Condition = ProfileConditionType.LessThanEqual,
  112. Property = ProfileConditionValue.VideoLevel,
  113. Value = "3"
  114. }
  115. }
  116. },
  117. new CodecProfile
  118. {
  119. Type = CodecType.Video,
  120. Conditions = new []
  121. {
  122. new ProfileCondition
  123. {
  124. Condition = ProfileConditionType.LessThanEqual,
  125. Property = ProfileConditionValue.Width,
  126. Value = "800"
  127. },
  128. new ProfileCondition
  129. {
  130. Condition = ProfileConditionType.LessThanEqual,
  131. Property = ProfileConditionValue.Height,
  132. Value = "480"
  133. },
  134. new ProfileCondition
  135. {
  136. Condition = ProfileConditionType.LessThanEqual,
  137. Property = ProfileConditionValue.VideoBitrate,
  138. Value = "1000000",
  139. IsRequired = false
  140. },
  141. new ProfileCondition
  142. {
  143. Condition = ProfileConditionType.LessThanEqual,
  144. Property = ProfileConditionValue.VideoFramerate,
  145. Value = "24",
  146. IsRequired = false
  147. }
  148. }
  149. },
  150. new CodecProfile
  151. {
  152. Type = CodecType.VideoAudio,
  153. Conditions = new []
  154. {
  155. new ProfileCondition
  156. {
  157. Condition = ProfileConditionType.LessThanEqual,
  158. Property = ProfileConditionValue.AudioBitrate,
  159. Value = "128000"
  160. },
  161. new ProfileCondition
  162. {
  163. Condition = ProfileConditionType.LessThanEqual,
  164. Property = ProfileConditionValue.AudioChannels,
  165. Value = "2"
  166. }
  167. }
  168. },
  169. new CodecProfile
  170. {
  171. Type = CodecType.Audio,
  172. Conditions = new []
  173. {
  174. new ProfileCondition
  175. {
  176. Condition = ProfileConditionType.LessThanEqual,
  177. Property = ProfileConditionValue.AudioBitrate,
  178. Value = "128000"
  179. }
  180. }
  181. }
  182. };
  183. }
  184. }
  185. }