179 lines
5.9 KiB
C#
179 lines
5.9 KiB
C#
|
using MediaBrowser.Model.Dlna;
|
|||
|
using System.Xml.Serialization;
|
|||
|
|
|||
|
namespace MediaBrowser.Dlna.Profiles
|
|||
|
{
|
|||
|
[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 []
|
|||
|
{
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.LessThanEqual,
|
|||
|
Property = ProfileConditionValue.Width,
|
|||
|
Value = "1920"
|
|||
|
},
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.LessThanEqual,
|
|||
|
Property = ProfileConditionValue.Height,
|
|||
|
Value = "1080"
|
|||
|
},
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.NotEquals,
|
|||
|
Property = ProfileConditionValue.IsAnamorphic,
|
|||
|
Value = "true",
|
|||
|
IsRequired = false
|
|||
|
},
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.LessThanEqual,
|
|||
|
Property = ProfileConditionValue.VideoBitDepth,
|
|||
|
Value = "8",
|
|||
|
IsRequired = false
|
|||
|
},
|
|||
|
// TODO: Add HasScalingMatrix != true, IsRequired false
|
|||
|
}
|
|||
|
},
|
|||
|
|
|||
|
new CodecProfile
|
|||
|
{
|
|||
|
Type = CodecType.VideoAudio,
|
|||
|
Codec = "aac",
|
|||
|
Conditions = new []
|
|||
|
{
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.LessThanEqual,
|
|||
|
Property = ProfileConditionValue.AudioChannels,
|
|||
|
Value = "2"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
|
|||
|
new CodecProfile
|
|||
|
{
|
|||
|
Type = CodecType.Audio,
|
|||
|
Codec = "aac",
|
|||
|
Conditions = new []
|
|||
|
{
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.LessThanEqual,
|
|||
|
Property = ProfileConditionValue.AudioChannels,
|
|||
|
Value = "2"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
|
|||
|
new CodecProfile
|
|||
|
{
|
|||
|
Type = CodecType.Audio,
|
|||
|
Codec = "mp3",
|
|||
|
Conditions = new []
|
|||
|
{
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.LessThanEqual,
|
|||
|
Property = ProfileConditionValue.AudioChannels,
|
|||
|
Value = "2"
|
|||
|
},
|
|||
|
new ProfileCondition
|
|||
|
{
|
|||
|
Condition = ProfileConditionType.LessThanEqual,
|
|||
|
Property = ProfileConditionValue.AudioBitrate,
|
|||
|
Value = "320000"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|