SonyPs3Profile.cs 8.8 KB

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