SonyBlurayPlayerProfile.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. using System.Xml.Serialization;
  2. using MediaBrowser.Controller.Dlna;
  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. ModelName = "Windows Media Player Sharing";
  32. ModelNumber = "3.0";
  33. Manufacturer = "Microsoft Corporation";
  34. 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";
  35. TranscodingProfiles = new[]
  36. {
  37. new TranscodingProfile
  38. {
  39. Container = "mp3",
  40. AudioCodec = "mp3",
  41. Type = DlnaProfileType.Audio
  42. },
  43. new TranscodingProfile
  44. {
  45. Container = "ts",
  46. VideoCodec = "mpeg2video",
  47. AudioCodec = "ac3",
  48. Type = DlnaProfileType.Video
  49. },
  50. new TranscodingProfile
  51. {
  52. Container = "jpeg",
  53. Type = DlnaProfileType.Photo
  54. }
  55. };
  56. DirectPlayProfiles = new[]
  57. {
  58. new DirectPlayProfile
  59. {
  60. Container = "ts",
  61. VideoCodec = "mpeg1video,mpeg2video,h264",
  62. AudioCodec = "ac3,aac,mp3,pcm",
  63. Type = DlnaProfileType.Video
  64. },
  65. new DirectPlayProfile
  66. {
  67. Container = "mpeg",
  68. VideoCodec = "mpeg1video,mpeg2video",
  69. AudioCodec = "ac3,mp3,pcm",
  70. Type = DlnaProfileType.Video
  71. },
  72. new DirectPlayProfile
  73. {
  74. Container = "avi,mp4",
  75. VideoCodec = "mpeg4,h264",
  76. AudioCodec = "ac3,aac,mp3,pcm",
  77. Type = DlnaProfileType.Video
  78. },
  79. new DirectPlayProfile
  80. {
  81. Container = "mp3",
  82. AudioCodec = "mp3",
  83. Type = DlnaProfileType.Audio
  84. },
  85. new DirectPlayProfile
  86. {
  87. Container = "asf",
  88. AudioCodec = "wmav2,wmapro,wmavoice",
  89. Type = DlnaProfileType.Audio
  90. },
  91. new DirectPlayProfile
  92. {
  93. Container = "jpeg",
  94. Type = DlnaProfileType.Photo
  95. }
  96. };
  97. CodecProfiles = new[]
  98. {
  99. new CodecProfile
  100. {
  101. Type = CodecType.VideoCodec,
  102. Codec = "h264",
  103. Conditions = new []
  104. {
  105. new ProfileCondition
  106. {
  107. Condition = ProfileConditionType.LessThanEqual,
  108. Property = ProfileConditionValue.Width,
  109. Value = "1920"
  110. },
  111. new ProfileCondition
  112. {
  113. Condition = ProfileConditionType.LessThanEqual,
  114. Property = ProfileConditionValue.Height,
  115. Value = "1080"
  116. },
  117. new ProfileCondition
  118. {
  119. Condition = ProfileConditionType.LessThanEqual,
  120. Property = ProfileConditionValue.VideoFramerate,
  121. Value = "30",
  122. IsRequired = false
  123. },
  124. new ProfileCondition
  125. {
  126. Condition = ProfileConditionType.LessThanEqual,
  127. Property = ProfileConditionValue.VideoLevel,
  128. Value = "41",
  129. IsRequired = false
  130. },
  131. new ProfileCondition
  132. {
  133. Condition = ProfileConditionType.LessThanEqual,
  134. Property = ProfileConditionValue.VideoBitrate,
  135. Value = "15360000",
  136. IsRequired = false
  137. }
  138. }
  139. },
  140. new CodecProfile
  141. {
  142. Type = CodecType.VideoAudioCodec,
  143. Codec = "ac3",
  144. Conditions = new []
  145. {
  146. new ProfileCondition
  147. {
  148. Condition = ProfileConditionType.LessThanEqual,
  149. Property = ProfileConditionValue.AudioChannels,
  150. Value = "6",
  151. IsRequired = false
  152. }
  153. }
  154. },
  155. new CodecProfile
  156. {
  157. Type = CodecType.VideoAudioCodec,
  158. Codec = "aac",
  159. Conditions = new []
  160. {
  161. new ProfileCondition
  162. {
  163. Condition = ProfileConditionType.LessThanEqual,
  164. Property = ProfileConditionValue.AudioChannels,
  165. Value = "2",
  166. IsRequired = false
  167. }
  168. }
  169. }
  170. };
  171. ContainerProfiles = new[]
  172. {
  173. new ContainerProfile
  174. {
  175. Type = DlnaProfileType.Photo,
  176. Conditions = new []
  177. {
  178. new ProfileCondition
  179. {
  180. Condition = ProfileConditionType.LessThanEqual,
  181. Property = ProfileConditionValue.Width,
  182. Value = "1920"
  183. },
  184. new ProfileCondition
  185. {
  186. Condition = ProfileConditionType.LessThanEqual,
  187. Property = ProfileConditionValue.Height,
  188. Value = "1080"
  189. }
  190. }
  191. }
  192. };
  193. MediaProfiles = new[]
  194. {
  195. new MediaProfile
  196. {
  197. Container = "ts",
  198. VideoCodec = "h264,mpeg4,vc1",
  199. AudioCodec = "ac3,aac,mp3",
  200. MimeType = "video/vnd.dlna.mpeg-tts",
  201. OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  202. Type = DlnaProfileType.Video
  203. },
  204. new MediaProfile
  205. {
  206. Container = "avi",
  207. MimeType = "video/mpeg",
  208. Type = DlnaProfileType.Video
  209. },
  210. new MediaProfile
  211. {
  212. Container = "mkv",
  213. MimeType = "video/vnd.dlna.mpeg-tts",
  214. Type = DlnaProfileType.Video
  215. },
  216. new MediaProfile
  217. {
  218. Container = "ts",
  219. MimeType = "video/vnd.dlna.mpeg-tts",
  220. Type = DlnaProfileType.Video
  221. },
  222. new MediaProfile
  223. {
  224. Container = "mp4",
  225. MimeType = "video/mpeg",
  226. Type = DlnaProfileType.Video
  227. },
  228. new MediaProfile
  229. {
  230. Container = "mpeg",
  231. MimeType = "video/mpeg",
  232. Type = DlnaProfileType.Video
  233. },
  234. new MediaProfile
  235. {
  236. Container = "mp3",
  237. MimeType = "audio/mpeg",
  238. Type = DlnaProfileType.Audio
  239. }
  240. };
  241. }
  242. }
  243. }