SonyPs3Profile.cs 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. using MediaBrowser.Controller.Dlna;
  2. namespace MediaBrowser.Dlna.Profiles
  3. {
  4. public class SonyPs3Profile : DefaultProfile
  5. {
  6. public SonyPs3Profile()
  7. {
  8. Name = "Sony PlayStation 3";
  9. Identification = new DeviceIdentification
  10. {
  11. FriendlyName = "PLAYSTATION 3",
  12. Headers = new[]
  13. {
  14. new HttpHeaderInfo
  15. {
  16. Name = "User-Agent",
  17. Value = @"PLAYSTATION 3",
  18. Match = HeaderMatchType.Substring
  19. },
  20. new HttpHeaderInfo
  21. {
  22. Name = "X-AV-Client-Info",
  23. Value = @"PLAYSTATION 3",
  24. Match = HeaderMatchType.Substring
  25. }
  26. }
  27. };
  28. SonyAggregationFlags = "10";
  29. XDlnaDoc = "DMS-1.50";
  30. TranscodingProfiles = new[]
  31. {
  32. new TranscodingProfile
  33. {
  34. Container = "mp3",
  35. AudioCodec = "mp3",
  36. Type = DlnaProfileType.Audio
  37. },
  38. new TranscodingProfile
  39. {
  40. Container = "ts",
  41. VideoCodec = "h264",
  42. AudioCodec = "mp3",
  43. Type = DlnaProfileType.Video
  44. },
  45. new TranscodingProfile
  46. {
  47. Container = "jpeg",
  48. Type = DlnaProfileType.Photo
  49. }
  50. };
  51. ContainerProfiles = new[]
  52. {
  53. new ContainerProfile
  54. {
  55. Type = DlnaProfileType.Photo,
  56. Conditions = new []
  57. {
  58. new ProfileCondition
  59. {
  60. Condition = ProfileConditionType.LessThanEqual,
  61. Property = ProfileConditionValue.Width,
  62. Value = "1920"
  63. },
  64. new ProfileCondition
  65. {
  66. Condition = ProfileConditionType.LessThanEqual,
  67. Property = ProfileConditionValue.Height,
  68. Value = "1080"
  69. }
  70. }
  71. }
  72. };
  73. CodecProfiles = new[]
  74. {
  75. new CodecProfile
  76. {
  77. Type = CodecType.VideoCodec,
  78. Codec = "h264",
  79. Conditions = new []
  80. {
  81. new ProfileCondition
  82. {
  83. Condition = ProfileConditionType.LessThanEqual,
  84. Property = ProfileConditionValue.Width,
  85. Value = "1920"
  86. },
  87. new ProfileCondition
  88. {
  89. Condition = ProfileConditionType.LessThanEqual,
  90. Property = ProfileConditionValue.Height,
  91. Value = "1080"
  92. },
  93. new ProfileCondition
  94. {
  95. Condition = ProfileConditionType.LessThanEqual,
  96. Property = ProfileConditionValue.VideoFramerate,
  97. Value = "30",
  98. IsRequired = false
  99. },
  100. new ProfileCondition
  101. {
  102. Condition = ProfileConditionType.LessThanEqual,
  103. Property = ProfileConditionValue.VideoBitrate,
  104. Value = "15360000",
  105. IsRequired = false
  106. },
  107. new ProfileCondition
  108. {
  109. Condition = ProfileConditionType.LessThanEqual,
  110. Property = ProfileConditionValue.VideoLevel,
  111. Value = "41",
  112. IsRequired = false
  113. }
  114. }
  115. },
  116. new CodecProfile
  117. {
  118. Type = CodecType.VideoAudioCodec,
  119. Codec = "ac3",
  120. Conditions = new []
  121. {
  122. new ProfileCondition
  123. {
  124. Condition = ProfileConditionType.LessThanEqual,
  125. Property = ProfileConditionValue.AudioChannels,
  126. Value = "6",
  127. IsRequired = false
  128. },
  129. new ProfileCondition
  130. {
  131. Condition = ProfileConditionType.LessThanEqual,
  132. Property = ProfileConditionValue.AudioBitrate,
  133. Value = "640000",
  134. IsRequired = false
  135. }
  136. }
  137. },
  138. new CodecProfile
  139. {
  140. Type = CodecType.VideoAudioCodec,
  141. Codec = "wmapro",
  142. Conditions = new []
  143. {
  144. new ProfileCondition
  145. {
  146. Condition = ProfileConditionType.LessThanEqual,
  147. Property = ProfileConditionValue.AudioChannels,
  148. Value = "2"
  149. }
  150. }
  151. },
  152. new CodecProfile
  153. {
  154. Type = CodecType.VideoAudioCodec,
  155. Codec = "aac",
  156. Conditions = new []
  157. {
  158. new ProfileCondition
  159. {
  160. Condition = ProfileConditionType.NotEquals,
  161. Property = ProfileConditionValue.AudioProfile,
  162. Value = "he-aac",
  163. IsRequired = false
  164. }
  165. }
  166. },
  167. new CodecProfile
  168. {
  169. Type = CodecType.VideoAudioCodec,
  170. Codec = "aac",
  171. Conditions = new []
  172. {
  173. new ProfileCondition
  174. {
  175. Condition = ProfileConditionType.LessThanEqual,
  176. Property = ProfileConditionValue.AudioChannels,
  177. Value = "2"
  178. },
  179. new ProfileCondition
  180. {
  181. Condition = ProfileConditionType.NotEquals,
  182. Property = ProfileConditionValue.AudioProfile,
  183. Value = "he-aac"
  184. }
  185. }
  186. }
  187. };
  188. MediaProfiles = new[]
  189. {
  190. new MediaProfile
  191. {
  192. Container = "mp4,mov",
  193. AudioCodec="aac",
  194. MimeType = "video/mp4",
  195. Type = DlnaProfileType.Video
  196. },
  197. new MediaProfile
  198. {
  199. Container = "avi",
  200. MimeType = "video/divx",
  201. OrgPn="AVI",
  202. Type = DlnaProfileType.Video
  203. },
  204. new MediaProfile
  205. {
  206. Container = "wav",
  207. MimeType = "audio/wav",
  208. Type = DlnaProfileType.Audio
  209. }
  210. };
  211. }
  212. }
  213. }