SonyPs3Profile.cs 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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 SonyPs3Profile : DefaultProfile
  7. {
  8. public SonyPs3Profile()
  9. {
  10. Name = "Sony PlayStation 3";
  11. Identification = new DeviceIdentification
  12. {
  13. FriendlyName = "PLAYSTATION 3",
  14. Headers = new[]
  15. {
  16. new HttpHeaderInfo
  17. {
  18. Name = "User-Agent",
  19. Value = @"PLAYSTATION 3",
  20. Match = HeaderMatchType.Substring
  21. },
  22. new HttpHeaderInfo
  23. {
  24. Name = "X-AV-Client-Info",
  25. Value = @"PLAYSTATION 3",
  26. Match = HeaderMatchType.Substring
  27. }
  28. }
  29. };
  30. AlbumArtPn = "JPEG_TN";
  31. SonyAggregationFlags = "10";
  32. EnableSingleAlbumArtLimit = true;
  33. DirectPlayProfiles = new[]
  34. {
  35. new DirectPlayProfile
  36. {
  37. Container = "avi",
  38. Type = DlnaProfileType.Video,
  39. VideoCodec = "mpeg4",
  40. AudioCodec = "mp2,mp3"
  41. },
  42. new DirectPlayProfile
  43. {
  44. Container = "ts,mpegts",
  45. Type = DlnaProfileType.Video,
  46. VideoCodec = "mpeg1video,mpeg2video,h264",
  47. AudioCodec = "ac3,mp2,mp3,aac"
  48. },
  49. new DirectPlayProfile
  50. {
  51. Container = "mpeg",
  52. Type = DlnaProfileType.Video,
  53. VideoCodec = "mpeg1video,mpeg2video",
  54. AudioCodec = "mp2"
  55. },
  56. new DirectPlayProfile
  57. {
  58. Container = "mp4",
  59. Type = DlnaProfileType.Video,
  60. VideoCodec = "h264,mpeg4",
  61. AudioCodec = "aac,ac3"
  62. },
  63. new DirectPlayProfile
  64. {
  65. Container = "aac,mp3,wav",
  66. Type = DlnaProfileType.Audio
  67. },
  68. new DirectPlayProfile
  69. {
  70. Container = "jpeg,png,gif,bmp,tiff",
  71. Type = DlnaProfileType.Photo
  72. }
  73. };
  74. TranscodingProfiles = new[]
  75. {
  76. new TranscodingProfile
  77. {
  78. Container = "mp3",
  79. AudioCodec = "mp3",
  80. Type = DlnaProfileType.Audio
  81. },
  82. new TranscodingProfile
  83. {
  84. Container = "ts",
  85. VideoCodec = "h264",
  86. AudioCodec = "ac3,aac,mp3",
  87. Type = DlnaProfileType.Video
  88. },
  89. new TranscodingProfile
  90. {
  91. Container = "jpeg",
  92. Type = DlnaProfileType.Photo
  93. }
  94. };
  95. ContainerProfiles = new[]
  96. {
  97. new ContainerProfile
  98. {
  99. Type = DlnaProfileType.Photo,
  100. Conditions = new[]
  101. {
  102. new ProfileCondition
  103. {
  104. Condition = ProfileConditionType.LessThanEqual,
  105. Property = ProfileConditionValue.Width,
  106. Value = "1920"
  107. },
  108. new ProfileCondition
  109. {
  110. Condition = ProfileConditionType.LessThanEqual,
  111. Property = ProfileConditionValue.Height,
  112. Value = "1080"
  113. }
  114. }
  115. }
  116. };
  117. CodecProfiles = new[]
  118. {
  119. new CodecProfile
  120. {
  121. Type = CodecType.Video,
  122. Codec = "h264",
  123. Conditions = new[]
  124. {
  125. new ProfileCondition
  126. {
  127. Condition = ProfileConditionType.LessThanEqual,
  128. Property = ProfileConditionValue.Width,
  129. Value = "1920"
  130. },
  131. new ProfileCondition
  132. {
  133. Condition = ProfileConditionType.LessThanEqual,
  134. Property = ProfileConditionValue.Height,
  135. Value = "1080"
  136. },
  137. new ProfileCondition
  138. {
  139. Condition = ProfileConditionType.LessThanEqual,
  140. Property = ProfileConditionValue.VideoFramerate,
  141. Value = "30",
  142. IsRequired = false
  143. },
  144. new ProfileCondition
  145. {
  146. Condition = ProfileConditionType.LessThanEqual,
  147. Property = ProfileConditionValue.VideoBitrate,
  148. Value = "15360000",
  149. IsRequired = false
  150. },
  151. new ProfileCondition
  152. {
  153. Condition = ProfileConditionType.LessThanEqual,
  154. Property = ProfileConditionValue.VideoLevel,
  155. Value = "41",
  156. IsRequired = false
  157. }
  158. }
  159. },
  160. new CodecProfile
  161. {
  162. Type = CodecType.VideoAudio,
  163. Codec = "ac3",
  164. Conditions = new[]
  165. {
  166. new ProfileCondition
  167. {
  168. Condition = ProfileConditionType.LessThanEqual,
  169. Property = ProfileConditionValue.AudioChannels,
  170. Value = "6",
  171. IsRequired = false
  172. },
  173. new ProfileCondition
  174. {
  175. Condition = ProfileConditionType.LessThanEqual,
  176. Property = ProfileConditionValue.AudioBitrate,
  177. Value = "640000",
  178. IsRequired = false
  179. }
  180. }
  181. },
  182. new CodecProfile
  183. {
  184. Type = CodecType.VideoAudio,
  185. Codec = "wmapro",
  186. Conditions = new[]
  187. {
  188. new ProfileCondition
  189. {
  190. Condition = ProfileConditionType.LessThanEqual,
  191. Property = ProfileConditionValue.AudioChannels,
  192. Value = "2"
  193. }
  194. }
  195. },
  196. new CodecProfile
  197. {
  198. Type = CodecType.VideoAudio,
  199. Codec = "aac",
  200. Conditions = new[]
  201. {
  202. new ProfileCondition
  203. {
  204. Condition = ProfileConditionType.NotEquals,
  205. Property = ProfileConditionValue.AudioProfile,
  206. Value = "he-aac",
  207. IsRequired = false
  208. }
  209. }
  210. }
  211. };
  212. ResponseProfiles = new[]
  213. {
  214. new ResponseProfile
  215. {
  216. Container = "mp4,mov",
  217. AudioCodec = "aac",
  218. MimeType = "video/mp4",
  219. Type = DlnaProfileType.Video
  220. },
  221. new ResponseProfile
  222. {
  223. Container = "avi",
  224. MimeType = "video/divx",
  225. OrgPn = "AVI",
  226. Type = DlnaProfileType.Video
  227. },
  228. new ResponseProfile
  229. {
  230. Container = "wav",
  231. MimeType = "audio/wav",
  232. Type = DlnaProfileType.Audio
  233. }
  234. };
  235. SubtitleProfiles = new[]
  236. {
  237. new SubtitleProfile
  238. {
  239. Format = "srt",
  240. Method = SubtitleDeliveryMethod.Embed
  241. }
  242. };
  243. }
  244. }
  245. }