2014-04-06 10:53:23 -07:00
|
|
|
|
using MediaBrowser.Model.Dlna;
|
2014-10-06 16:58:46 -07:00
|
|
|
|
using MediaBrowser.Model.Dlna.Profiles;
|
2014-11-26 12:29:49 -07:00
|
|
|
|
using System.Xml.Serialization;
|
2014-04-01 15:23:07 -07:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Dlna.Profiles
|
|
|
|
|
{
|
|
|
|
|
[XmlRoot("Profile")]
|
|
|
|
|
public class Windows81Profile : DefaultProfile
|
|
|
|
|
{
|
|
|
|
|
public Windows81Profile()
|
|
|
|
|
{
|
|
|
|
|
Name = "Windows 8/RT";
|
|
|
|
|
|
|
|
|
|
Identification = new DeviceIdentification
|
|
|
|
|
{
|
|
|
|
|
Manufacturer = "Microsoft SDK Customer"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TranscodingProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp3",
|
|
|
|
|
AudioCodec = "mp3",
|
2015-01-02 09:46:39 -07:00
|
|
|
|
Type = DlnaProfileType.Audio,
|
|
|
|
|
Context = EncodingContext.Streaming
|
|
|
|
|
},
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp3",
|
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
|
Type = DlnaProfileType.Audio,
|
|
|
|
|
Context = EncodingContext.Static
|
2014-04-01 15:23:07 -07:00
|
|
|
|
},
|
|
|
|
|
new TranscodingProfile
|
2014-04-21 09:02:30 -07:00
|
|
|
|
{
|
|
|
|
|
Protocol = "hls",
|
|
|
|
|
Container = "ts",
|
|
|
|
|
VideoCodec = "h264",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
Type = DlnaProfileType.Video,
|
2014-07-16 20:17:14 -07:00
|
|
|
|
Context = EncodingContext.Streaming
|
2014-04-21 09:02:30 -07:00
|
|
|
|
},
|
|
|
|
|
new TranscodingProfile
|
2014-04-01 15:23:07 -07:00
|
|
|
|
{
|
|
|
|
|
Container = "ts",
|
|
|
|
|
VideoCodec = "h264",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
Type = DlnaProfileType.Video,
|
2014-07-16 20:17:14 -07:00
|
|
|
|
Context = EncodingContext.Streaming
|
|
|
|
|
},
|
|
|
|
|
new TranscodingProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp4",
|
|
|
|
|
VideoCodec = "h264",
|
|
|
|
|
AudioCodec = "aac,ac3,eac3",
|
|
|
|
|
Type = DlnaProfileType.Video,
|
|
|
|
|
Context = EncodingContext.Static
|
2014-04-01 15:23:07 -07:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
DirectPlayProfiles = new[]
|
|
|
|
|
{
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp4,mov",
|
|
|
|
|
VideoCodec = "h264,mpeg4",
|
|
|
|
|
AudioCodec = "aac,ac3,eac3,mp3,pcm",
|
|
|
|
|
Type = DlnaProfileType.Video
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "ts",
|
|
|
|
|
VideoCodec = "h264",
|
|
|
|
|
AudioCodec = "aac,ac3,eac3,mp3,mp2,pcm",
|
|
|
|
|
Type = DlnaProfileType.Video
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "asf",
|
|
|
|
|
VideoCodec = "wmv2,wmv3,vc1",
|
|
|
|
|
AudioCodec = "wmav2,wmapro,wmavoice",
|
|
|
|
|
Type = DlnaProfileType.Video
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "avi",
|
|
|
|
|
VideoCodec = "mpeg4,msmpeg4,mjpeg",
|
|
|
|
|
AudioCodec = "mp3,ac3,eac3,mp2,pcm",
|
|
|
|
|
Type = DlnaProfileType.Video
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp4",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "mp3",
|
|
|
|
|
AudioCodec = "mp3",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
2015-01-02 03:00:24 -07:00
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "m4a",
|
|
|
|
|
AudioCodec = "aac",
|
|
|
|
|
VideoCodec = "",
|
|
|
|
|
Type = DlnaProfileType.Audio
|
|
|
|
|
},
|
|
|
|
|
|
2014-04-01 15:23:07 -07:00
|
|
|
|
new DirectPlayProfile
|
|
|
|
|
{
|
|
|
|
|
Container = "jpeg",
|
|
|
|
|
Type = DlnaProfileType.Photo
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
CodecProfiles = new[]
|
|
|
|
|
{
|
2014-11-26 12:29:49 -07:00
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.Video,
|
|
|
|
|
Codec="h264",
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// Note: Add any of the following if supported
|
|
|
|
|
|
|
|
|
|
//"Constrained Baseline",
|
|
|
|
|
//"Baseline",
|
|
|
|
|
//"Extended",
|
|
|
|
|
//"Main",
|
|
|
|
|
//"High",
|
|
|
|
|
//"Progressive High",
|
|
|
|
|
//"Constrained High"
|
|
|
|
|
|
|
|
|
|
// The first one in the list should be the higest one, e.g. if High profile is supported, make sure it appears before baseline: high|baseline
|
|
|
|
|
|
2014-11-27 08:44:50 -07:00
|
|
|
|
new ProfileCondition(ProfileConditionType.EqualsAny, ProfileConditionValue.VideoProfile, "high|main|extended|baseline|constrained baseline"),
|
|
|
|
|
new ProfileCondition
|
|
|
|
|
{
|
|
|
|
|
Condition = ProfileConditionType.LessThanEqual,
|
|
|
|
|
Property = ProfileConditionValue.VideoLevel,
|
|
|
|
|
Value = "51"
|
2015-01-01 11:53:24 -07:00
|
|
|
|
},
|
|
|
|
|
new ProfileCondition
|
|
|
|
|
{
|
|
|
|
|
Condition = ProfileConditionType.LessThanEqual,
|
|
|
|
|
Property = ProfileConditionValue.VideoBitDepth,
|
|
|
|
|
Value = "8",
|
|
|
|
|
IsRequired = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.Video,
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
|
|
|
|
new ProfileCondition
|
|
|
|
|
{
|
|
|
|
|
Condition = ProfileConditionType.LessThanEqual,
|
|
|
|
|
Property = ProfileConditionValue.VideoBitDepth,
|
|
|
|
|
Value = "8",
|
|
|
|
|
IsRequired = false
|
2014-11-27 08:44:50 -07:00
|
|
|
|
}
|
2014-11-26 12:29:49 -07:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2014-04-01 15:23:07 -07:00
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.VideoAudio,
|
|
|
|
|
Codec = "aac,eac3",
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
|
|
|
|
new ProfileCondition
|
|
|
|
|
{
|
|
|
|
|
Condition = ProfileConditionType.LessThanEqual,
|
|
|
|
|
Property = ProfileConditionValue.AudioChannels,
|
|
|
|
|
Value = "8"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
new CodecProfile
|
|
|
|
|
{
|
|
|
|
|
Type = CodecType.VideoAudio,
|
|
|
|
|
Codec = "ac3",
|
|
|
|
|
Conditions = new []
|
|
|
|
|
{
|
|
|
|
|
new ProfileCondition
|
|
|
|
|
{
|
|
|
|
|
Condition = ProfileConditionType.LessThanEqual,
|
|
|
|
|
Property = ProfileConditionValue.AudioChannels,
|
|
|
|
|
Value = "6"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2014-08-05 18:09:03 -07:00
|
|
|
|
SubtitleProfiles = new[]
|
2014-08-05 16:59:24 -07:00
|
|
|
|
{
|
|
|
|
|
new SubtitleProfile
|
|
|
|
|
{
|
2014-08-21 08:55:35 -07:00
|
|
|
|
Format = "vtt",
|
2014-08-05 18:09:03 -07:00
|
|
|
|
Method = SubtitleDeliveryMethod.External
|
2014-08-05 16:59:24 -07:00
|
|
|
|
}
|
|
|
|
|
};
|
2014-04-01 15:23:07 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|