|
|
@ -1,23 +1,31 @@
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Dlna.Profiles
|
|
|
|
namespace MediaBrowser.Model.Dlna.Profiles
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[XmlRoot("Profile")]
|
|
|
|
[XmlRoot("Profile")]
|
|
|
|
public class AndroidProfile : DefaultProfile
|
|
|
|
public class AndroidProfile : DefaultProfile
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public AndroidProfile()
|
|
|
|
public AndroidProfile(bool supportsHls, bool supportsMpegDash)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name = "Android";
|
|
|
|
Name = "Android";
|
|
|
|
|
|
|
|
|
|
|
|
TranscodingProfiles = new[]
|
|
|
|
List<TranscodingProfile> transcodingProfiles = new List<TranscodingProfile>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
transcodingProfiles.Add(new TranscodingProfile
|
|
|
|
{
|
|
|
|
{
|
|
|
|
new TranscodingProfile
|
|
|
|
Container = "mp3",
|
|
|
|
{
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
Container = "mp3",
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
});
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
|
|
|
},
|
|
|
|
if (supportsMpegDash)
|
|
|
|
new TranscodingProfile
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (supportsHls)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
transcodingProfiles.Add(new TranscodingProfile
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Protocol = "hls",
|
|
|
|
Protocol = "hls",
|
|
|
|
Container = "ts",
|
|
|
|
Container = "ts",
|
|
|
@ -26,17 +34,19 @@ namespace MediaBrowser.Model.Dlna.Profiles
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
VideoProfile = "Baseline",
|
|
|
|
VideoProfile = "Baseline",
|
|
|
|
Context = EncodingContext.Streaming
|
|
|
|
Context = EncodingContext.Streaming
|
|
|
|
},
|
|
|
|
});
|
|
|
|
new TranscodingProfile
|
|
|
|
}
|
|
|
|
{
|
|
|
|
transcodingProfiles.Add(new TranscodingProfile
|
|
|
|
Container = "mp4",
|
|
|
|
{
|
|
|
|
VideoCodec = "h264",
|
|
|
|
Container = "mp4",
|
|
|
|
AudioCodec = "aac",
|
|
|
|
VideoCodec = "h264",
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
AudioCodec = "aac",
|
|
|
|
VideoProfile = "Baseline",
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
Context = EncodingContext.Static
|
|
|
|
VideoProfile = "Baseline",
|
|
|
|
}
|
|
|
|
Context = EncodingContext.Static
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TranscodingProfiles = transcodingProfiles.ToArray();
|
|
|
|
|
|
|
|
|
|
|
|
DirectPlayProfiles = new[]
|
|
|
|
DirectPlayProfiles = new[]
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -88,6 +98,22 @@ namespace MediaBrowser.Model.Dlna.Profiles
|
|
|
|
new CodecProfile
|
|
|
|
new CodecProfile
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Type = CodecType.Video,
|
|
|
|
Type = CodecType.Video,
|
|
|
|
|
|
|
|
Codec= "h264",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Conditions = new []
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
new ProfileCondition(ProfileConditionType.SubstringOf, ProfileConditionValue.VideoProfile, "baseline"),
|
|
|
|
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"),
|
|
|
|
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"),
|
|
|
|
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"),
|
|
|
|
|
|
|
|
new ProfileCondition(ProfileConditionType.NotEquals, ProfileConditionValue.IsAnamorphic, "true")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new CodecProfile
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = CodecType.Video,
|
|
|
|
|
|
|
|
|
|
|
|
Conditions = new []
|
|
|
|
Conditions = new []
|
|
|
|
{
|
|
|
|
{
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"),
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"),
|
|
|
|