SonyBlurayPlayerProfile.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. using MediaBrowser.Model.Dlna;
  2. using System.Xml.Serialization;
  3. using MediaBrowser.Model.Dlna.Profiles;
  4. namespace MediaBrowser.Dlna.Profiles
  5. {
  6. [XmlRoot("Profile")]
  7. public class SonyBlurayPlayerProfile : DefaultProfile
  8. {
  9. public SonyBlurayPlayerProfile()
  10. {
  11. Name = "Sony Blu-ray Player";
  12. Identification = new DeviceIdentification
  13. {
  14. FriendlyName = @"Blu-ray Disc Player",
  15. Manufacturer = "Sony",
  16. Headers = new[]
  17. {
  18. new HttpHeaderInfo
  19. {
  20. Name = "X-AV-Client-Info",
  21. Value = @"(Blu-ray Disc Player|Home Theater System|Home Theatre System|Media Player)",
  22. Match = HeaderMatchType.Regex
  23. },
  24. new HttpHeaderInfo
  25. {
  26. Name = "X-AV-Physical-Unit-Info",
  27. Value = @"(Blu-ray Disc Player|Home Theater System|Home Theatre System|Media Player)",
  28. Match = HeaderMatchType.Regex
  29. }
  30. }
  31. };
  32. XmlRootAttributes = new[]
  33. {
  34. new XmlAttribute
  35. {
  36. Name = "xmlns:av",
  37. Value = "urn:schemas-sony-com:av"
  38. }
  39. };
  40. ModelName = "Windows Media Player Sharing";
  41. ModelNumber = "3.0";
  42. Manufacturer = "Microsoft Corporation";
  43. ProtocolInfo = "http-get:*:video/divx:DLNA.ORG_PN=MATROSKA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/flac:DLNA.ORG_PN=FLAC;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/ogg:DLNA.ORG_PN=OGG;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/png:DLNA.ORG_PN=PNG_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/gif:DLNA.ORG_PN=GIF_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_JP_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-msvideo:DLNA.ORG_PN=AVI;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-flv:DLNA.ORG_PN=FLV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-dvr:DLNA.ORG_PN=DVR_MS;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/wtv:DLNA.ORG_PN=WTV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/ogg:DLNA.ORG_PN=OGV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.rn-realvideo:DLNA.ORG_PN=REAL_VIDEO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L1_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L2_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L3_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_H263_3GPP_P0_L10_AMR;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_H263_MP4_P0_L10_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000";
  44. TranscodingProfiles = new[]
  45. {
  46. new TranscodingProfile
  47. {
  48. Container = "mp3",
  49. AudioCodec = "mp3",
  50. Type = DlnaProfileType.Audio
  51. },
  52. new TranscodingProfile
  53. {
  54. Container = "ts",
  55. VideoCodec = "mpeg2video",
  56. AudioCodec = "ac3",
  57. Type = DlnaProfileType.Video
  58. },
  59. new TranscodingProfile
  60. {
  61. Container = "jpeg",
  62. Type = DlnaProfileType.Photo
  63. }
  64. };
  65. DirectPlayProfiles = new[]
  66. {
  67. new DirectPlayProfile
  68. {
  69. Container = "ts",
  70. VideoCodec = "mpeg1video,mpeg2video,h264",
  71. AudioCodec = "ac3,aac,mp3,pcm",
  72. Type = DlnaProfileType.Video
  73. },
  74. new DirectPlayProfile
  75. {
  76. Container = "mpeg",
  77. VideoCodec = "mpeg1video,mpeg2video",
  78. AudioCodec = "ac3,mp3,pcm",
  79. Type = DlnaProfileType.Video
  80. },
  81. new DirectPlayProfile
  82. {
  83. Container = "avi,mp4",
  84. VideoCodec = "mpeg4,h264",
  85. AudioCodec = "ac3,aac,mp3,pcm",
  86. Type = DlnaProfileType.Video
  87. },
  88. new DirectPlayProfile
  89. {
  90. Container = "mp3",
  91. AudioCodec = "mp3",
  92. Type = DlnaProfileType.Audio
  93. },
  94. new DirectPlayProfile
  95. {
  96. Container = "asf",
  97. AudioCodec = "wmav2,wmapro,wmavoice",
  98. Type = DlnaProfileType.Audio
  99. },
  100. new DirectPlayProfile
  101. {
  102. Container = "jpeg",
  103. Type = DlnaProfileType.Photo
  104. }
  105. };
  106. CodecProfiles = new[]
  107. {
  108. new CodecProfile
  109. {
  110. Type = CodecType.Video,
  111. Codec = "h264",
  112. Conditions = new []
  113. {
  114. new ProfileCondition
  115. {
  116. Condition = ProfileConditionType.LessThanEqual,
  117. Property = ProfileConditionValue.Width,
  118. Value = "1920"
  119. },
  120. new ProfileCondition
  121. {
  122. Condition = ProfileConditionType.LessThanEqual,
  123. Property = ProfileConditionValue.Height,
  124. Value = "1080"
  125. },
  126. new ProfileCondition
  127. {
  128. Condition = ProfileConditionType.LessThanEqual,
  129. Property = ProfileConditionValue.VideoFramerate,
  130. Value = "30",
  131. IsRequired = false
  132. },
  133. new ProfileCondition
  134. {
  135. Condition = ProfileConditionType.LessThanEqual,
  136. Property = ProfileConditionValue.VideoLevel,
  137. Value = "41",
  138. IsRequired = false
  139. },
  140. new ProfileCondition
  141. {
  142. Condition = ProfileConditionType.LessThanEqual,
  143. Property = ProfileConditionValue.VideoBitrate,
  144. Value = "15360000",
  145. IsRequired = false
  146. }
  147. }
  148. },
  149. new CodecProfile
  150. {
  151. Type = CodecType.VideoAudio,
  152. Codec = "ac3",
  153. Conditions = new []
  154. {
  155. new ProfileCondition
  156. {
  157. Condition = ProfileConditionType.LessThanEqual,
  158. Property = ProfileConditionValue.AudioChannels,
  159. Value = "6",
  160. IsRequired = false
  161. }
  162. }
  163. },
  164. new CodecProfile
  165. {
  166. Type = CodecType.VideoAudio,
  167. Codec = "aac",
  168. Conditions = new []
  169. {
  170. new ProfileCondition
  171. {
  172. Condition = ProfileConditionType.LessThanEqual,
  173. Property = ProfileConditionValue.AudioChannels,
  174. Value = "2",
  175. IsRequired = false
  176. }
  177. }
  178. }
  179. };
  180. ContainerProfiles = new[]
  181. {
  182. new ContainerProfile
  183. {
  184. Type = DlnaProfileType.Photo,
  185. Conditions = new []
  186. {
  187. new ProfileCondition
  188. {
  189. Condition = ProfileConditionType.LessThanEqual,
  190. Property = ProfileConditionValue.Width,
  191. Value = "1920"
  192. },
  193. new ProfileCondition
  194. {
  195. Condition = ProfileConditionType.LessThanEqual,
  196. Property = ProfileConditionValue.Height,
  197. Value = "1080"
  198. }
  199. }
  200. }
  201. };
  202. ResponseProfiles = new[]
  203. {
  204. new ResponseProfile
  205. {
  206. Container = "ts",
  207. VideoCodec = "h264,mpeg4,vc1",
  208. AudioCodec = "ac3,aac,mp3",
  209. MimeType = "video/vnd.dlna.mpeg-tts",
  210. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  211. Type = DlnaProfileType.Video
  212. },
  213. new ResponseProfile
  214. {
  215. Container = "avi",
  216. MimeType = "video/mpeg",
  217. Type = DlnaProfileType.Video
  218. },
  219. new ResponseProfile
  220. {
  221. Container = "mkv",
  222. MimeType = "video/vnd.dlna.mpeg-tts",
  223. Type = DlnaProfileType.Video
  224. },
  225. new ResponseProfile
  226. {
  227. Container = "ts",
  228. MimeType = "video/vnd.dlna.mpeg-tts",
  229. Type = DlnaProfileType.Video
  230. },
  231. new ResponseProfile
  232. {
  233. Container = "mp4",
  234. MimeType = "video/mpeg",
  235. Type = DlnaProfileType.Video
  236. },
  237. new ResponseProfile
  238. {
  239. Container = "mpeg",
  240. MimeType = "video/mpeg",
  241. Type = DlnaProfileType.Video
  242. },
  243. new ResponseProfile
  244. {
  245. Container = "mp3",
  246. MimeType = "audio/mpeg",
  247. Type = DlnaProfileType.Audio
  248. }
  249. };
  250. }
  251. }
  252. }