2020-01-22 21:00:07 +01:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2021-03-07 15:17:32 +01:00
|
|
|
using System;
|
|
|
|
using System.Globalization;
|
2019-01-13 20:54:44 +01:00
|
|
|
using System.Linq;
|
2019-01-13 20:16:19 +01:00
|
|
|
using MediaBrowser.Model.Dlna;
|
2016-10-30 00:22:20 +02:00
|
|
|
|
2016-10-30 00:34:54 +02:00
|
|
|
namespace Emby.Dlna.Profiles
|
2016-10-30 00:22:20 +02:00
|
|
|
{
|
2018-09-12 19:26:21 +02:00
|
|
|
[System.Xml.Serialization.XmlRoot("Profile")]
|
2016-10-30 00:22:20 +02:00
|
|
|
public class DefaultProfile : DeviceProfile
|
|
|
|
{
|
|
|
|
public DefaultProfile()
|
|
|
|
{
|
2021-03-07 15:17:32 +01:00
|
|
|
Id = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
|
2016-10-30 00:22:20 +02:00
|
|
|
Name = "Generic Device";
|
|
|
|
|
2020-04-20 14:52:50 +02:00
|
|
|
ProtocolInfo = "http-get:*:video/mpeg:*,http-get:*:video/mp4:*,http-get:*:video/vnd.dlna.mpeg-tts:*,http-get:*:video/avi:*,http-get:*:video/x-matroska:*,http-get:*:video/x-ms-wmv:*,http-get:*:video/wtv:*,http-get:*:audio/mpeg:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/wav:*,http-get:*:audio/L16:*,http-get:*:image/jpeg:*,http-get:*:image/png:*,http-get:*:image/gif:*,http-get:*:image/tiff:*";
|
2016-10-30 00:22:20 +02:00
|
|
|
|
2018-12-13 10:18:29 +01:00
|
|
|
Manufacturer = "Jellyfin";
|
2018-09-12 19:26:21 +02:00
|
|
|
ModelDescription = "UPnP/AV 1.0 Compliant Media Server";
|
2018-12-13 20:10:22 +01:00
|
|
|
ModelName = "Jellyfin Server";
|
2018-09-12 19:26:21 +02:00
|
|
|
ModelNumber = "01";
|
2018-12-11 07:28:44 +01:00
|
|
|
ModelUrl = "https://github.com/jellyfin/jellyfin";
|
|
|
|
ManufacturerUrl = "https://github.com/jellyfin/jellyfin";
|
2016-10-30 00:22:20 +02:00
|
|
|
|
|
|
|
AlbumArtPn = "JPEG_SM";
|
|
|
|
|
|
|
|
MaxAlbumArtHeight = 480;
|
|
|
|
MaxAlbumArtWidth = 480;
|
|
|
|
|
|
|
|
MaxIconWidth = 48;
|
|
|
|
MaxIconHeight = 48;
|
|
|
|
|
2018-09-12 19:26:21 +02:00
|
|
|
MaxStreamingBitrate = 140000000;
|
|
|
|
MaxStaticBitrate = 140000000;
|
2016-10-30 00:22:20 +02:00
|
|
|
MusicStreamingTranscodingBitrate = 192000;
|
|
|
|
|
|
|
|
EnableAlbumArtInDidl = false;
|
|
|
|
|
|
|
|
TranscodingProfiles = new[]
|
|
|
|
{
|
|
|
|
new TranscodingProfile
|
|
|
|
{
|
|
|
|
Container = "mp3",
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
},
|
|
|
|
|
|
|
|
new TranscodingProfile
|
|
|
|
{
|
|
|
|
Container = "ts",
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
AudioCodec = "aac",
|
|
|
|
VideoCodec = "h264"
|
|
|
|
},
|
|
|
|
|
|
|
|
new TranscodingProfile
|
|
|
|
{
|
|
|
|
Container = "jpeg",
|
|
|
|
Type = DlnaProfileType.Photo
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
DirectPlayProfiles = new[]
|
|
|
|
{
|
|
|
|
new DirectPlayProfile
|
|
|
|
{
|
2017-11-05 22:51:23 +01:00
|
|
|
// play all
|
2020-08-20 17:01:04 +02:00
|
|
|
Container = string.Empty,
|
2016-10-30 00:22:20 +02:00
|
|
|
Type = DlnaProfileType.Video
|
|
|
|
},
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
{
|
2017-11-05 22:51:23 +01:00
|
|
|
// play all
|
2020-08-20 17:01:04 +02:00
|
|
|
Container = string.Empty,
|
2016-10-30 00:22:20 +02:00
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
SubtitleProfiles = new[]
|
|
|
|
{
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "srt",
|
2017-05-12 20:09:42 +02:00
|
|
|
Method = SubtitleDeliveryMethod.External,
|
2017-03-07 19:27:56 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
2017-05-12 20:09:42 +02:00
|
|
|
Format = "sub",
|
2017-03-07 19:27:56 +01:00
|
|
|
Method = SubtitleDeliveryMethod.External,
|
2017-05-12 20:09:42 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "srt",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "ass",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "ssa",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "smi",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "dvdsub",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "pgs",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "pgssub",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "sub",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
2017-05-31 21:21:32 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "subrip",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
|
|
|
},
|
|
|
|
|
|
|
|
new SubtitleProfile
|
|
|
|
{
|
|
|
|
Format = "vtt",
|
|
|
|
Method = SubtitleDeliveryMethod.Embed
|
2016-10-30 00:22:20 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
ResponseProfiles = new[]
|
|
|
|
{
|
|
|
|
new ResponseProfile
|
|
|
|
{
|
|
|
|
Container = "m4v",
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
MimeType = "video/mp4"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public void AddXmlRootAttribute(string name, string value)
|
|
|
|
{
|
2021-12-15 18:25:36 +01:00
|
|
|
var list = XmlRootAttributes.ToList();
|
2016-10-30 00:22:20 +02:00
|
|
|
|
|
|
|
list.Add(new XmlAttribute
|
|
|
|
{
|
|
|
|
Name = name,
|
|
|
|
Value = value
|
|
|
|
});
|
|
|
|
|
2018-12-28 16:48:26 +01:00
|
|
|
XmlRootAttributes = list.ToArray();
|
2016-10-30 00:22:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|