2014-10-06 23:58:46 +00:00
|
|
|
|
using System.Xml.Serialization;
|
2014-07-17 03:17:14 +00:00
|
|
|
|
|
2014-10-06 23:58:46 +00:00
|
|
|
|
namespace MediaBrowser.Model.Dlna.Profiles
|
2014-07-17 03:17:14 +00:00
|
|
|
|
{
|
|
|
|
|
[XmlRoot("Profile")]
|
|
|
|
|
public class AndroidProfile : DefaultProfile
|
|
|
|
|
{
|
|
|
|
|
public AndroidProfile()
|
|
|
|
|
{
|
|
|
|
|
Name = "Android";
|
|
|
|
|
|
|
|
|
|
TranscodingProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp3",
|
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Protocol = "hls",
|
|
|
|
|
Container = "ts",
|
|
|
|
|
VideoCodec = "h264",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
|
VideoProfile = "Baseline",
|
|
|
|
|
Context = EncodingContext.Streaming
|
|
|
|
|
},
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp4",
|
|
|
|
|
VideoCodec = "h264",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
|
VideoProfile = "Baseline",
|
|
|
|
|
Context = EncodingContext.Static
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
DirectPlayProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp4",
|
|
|
|
|
VideoCodec = "h264,mpeg4",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
Type = DlnaProfileType.Video
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp4,aac",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp3",
|
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "flac",
|
|
|
|
|
AudioCodec = "flac",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "ogg",
|
|
|
|
|
AudioCodec = "vorbis",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "jpeg,png,gif,bmp",
|
|
|
|
|
Type = DlnaProfileType.Photo
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
CodecProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.Video,
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
2014-10-06 23:58:46 +00:00
|
|
|
|
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")
|
2014-07-17 03:17:14 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.VideoAudio,
|
|
|
|
|
Codec = "aac",
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
2014-10-06 23:58:46 +00:00
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2")
|
2014-07-17 03:17:14 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.Audio,
|
|
|
|
|
Codec = "aac",
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
2014-10-06 23:58:46 +00:00
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2")
|
2014-07-17 03:17:14 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.Audio,
|
|
|
|
|
Codec = "mp3",
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
2014-10-06 23:58:46 +00:00
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2"),
|
|
|
|
|
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioBitrate, "320000")
|
2014-07-17 03:17:14 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|