2015-04-27 17:55:57 +00:00
|
|
|
|
using MediaBrowser.Model.Dlna;
|
2015-05-08 16:28:06 +00:00
|
|
|
|
using System.Linq;
|
2015-04-27 17:55:57 +00:00
|
|
|
|
using System.Xml.Serialization;
|
2014-03-23 16:42:02 +00:00
|
|
|
|
|
2015-04-27 17:55:57 +00:00
|
|
|
|
namespace MediaBrowser.Dlna.Profiles
|
2014-03-23 16:42:02 +00:00
|
|
|
|
{
|
2014-03-26 15:06:48 +00:00
|
|
|
|
[XmlRoot("Profile")]
|
2014-03-23 16:42:02 +00:00
|
|
|
|
public class DefaultProfile : DeviceProfile
|
|
|
|
|
{
|
|
|
|
|
public DefaultProfile()
|
|
|
|
|
{
|
2014-03-26 20:14:47 +00:00
|
|
|
|
Name = "Generic Device";
|
2014-03-25 05:25:03 +00:00
|
|
|
|
|
2014-06-22 05:52:31 +00:00
|
|
|
|
ProtocolInfo = "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_50_AC3_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMA_BASE;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMA_FULL;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000,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:*:video/mpeg:DLNA.ORG_PN=MPEG1;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/x-msvideo:DLNA.ORG_PN=AVI;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/x-matroska:DLNA.ORG_PN=MATROSKA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_MPEG1_L3;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AC3;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_720p_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_1080i_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_HP_HD_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_LPCM;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,http-get
|
2014-03-23 17:18:24 +00:00
|
|
|
|
|
2014-04-22 17:25:54 +00:00
|
|
|
|
XDlnaDoc = "DMS-1.50";
|
|
|
|
|
|
2015-03-21 16:10:02 +00:00
|
|
|
|
Manufacturer = "Emby";
|
|
|
|
|
ModelDescription = "Emby";
|
2016-03-30 01:33:18 +00:00
|
|
|
|
ModelName = "Emby Server";
|
2015-03-21 16:10:02 +00:00
|
|
|
|
ModelNumber = "Emby";
|
|
|
|
|
ModelUrl = "http://emby.media/";
|
|
|
|
|
ManufacturerUrl = "http://emby.media/";
|
2014-03-23 17:18:24 +00:00
|
|
|
|
|
2014-04-21 01:36:12 +00:00
|
|
|
|
AlbumArtPn = "JPEG_SM";
|
|
|
|
|
|
2014-08-01 00:37:06 +00:00
|
|
|
|
MaxAlbumArtHeight = 480;
|
|
|
|
|
MaxAlbumArtWidth = 480;
|
|
|
|
|
|
|
|
|
|
MaxIconWidth = 48;
|
|
|
|
|
MaxIconHeight = 48;
|
2014-04-21 01:36:12 +00:00
|
|
|
|
|
2016-05-07 21:01:21 +00:00
|
|
|
|
MaxStreamingBitrate = 20000000;
|
|
|
|
|
MaxStaticBitrate = 20000000;
|
2016-03-18 17:35:18 +00:00
|
|
|
|
MusicStreamingTranscodingBitrate = 192000;
|
2014-07-18 19:07:28 +00:00
|
|
|
|
|
2014-08-01 00:37:06 +00:00
|
|
|
|
EnableAlbumArtInDidl = false;
|
2014-07-30 03:31:35 +00:00
|
|
|
|
|
2014-03-23 16:42:02 +00:00
|
|
|
|
TranscodingProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp3",
|
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
2014-04-08 04:17:18 +00:00
|
|
|
|
Container = "ts",
|
2014-03-23 16:42:02 +00:00
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
|
AudioCodec = "aac",
|
2014-11-26 19:29:49 +00:00
|
|
|
|
VideoCodec = "h264"
|
2014-09-24 01:44:05 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "jpeg",
|
|
|
|
|
Type = DlnaProfileType.Photo
|
2014-03-23 16:42:02 +00:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
DirectPlayProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
2016-08-19 06:22:18 +00:00
|
|
|
|
Container = "m4v,ts,mkv,avi,mpg,mpeg,mp4",
|
|
|
|
|
VideoCodec = "h264",
|
|
|
|
|
AudioCodec = "aac,mp3,ac3",
|
|
|
|
|
Type = DlnaProfileType.Video
|
2014-03-23 16:42:02 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
2016-08-19 06:22:18 +00:00
|
|
|
|
Container = "mp3,wma,aac,wav",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2016-08-27 18:39:48 +00:00
|
|
|
|
SubtitleProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new SubtitleProfile
|
|
|
|
|
{
|
|
|
|
|
Format = "srt",
|
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2016-08-19 06:22:18 +00:00
|
|
|
|
ResponseProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new ResponseProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "m4v",
|
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
|
MimeType = "video/mp4"
|
2014-03-23 16:42:02 +00:00
|
|
|
|
}
|
|
|
|
|
};
|
2015-05-08 16:28:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddXmlRootAttribute(string name, string value)
|
|
|
|
|
{
|
|
|
|
|
var atts = XmlRootAttributes ?? new XmlAttribute[] { };
|
|
|
|
|
var list = atts.ToList();
|
|
|
|
|
|
|
|
|
|
list.Add(new XmlAttribute
|
|
|
|
|
{
|
|
|
|
|
Name = name,
|
|
|
|
|
Value = value
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
XmlRootAttributes = list.ToArray();
|
2014-03-23 16:42:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|