SonyBlurayPlayerProfile.cs 15 KB

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