diff options
Diffstat (limited to 'MediaBrowser.Model/Dlna')
| -rw-r--r-- | MediaBrowser.Model/Dlna/CodecProfile.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ConditionProcessor.cs | 31 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ContainerProfile.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/DeviceProfile.cs | 51 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/DirectPlayProfile.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/HttpHeaderInfo.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/IDeviceDiscovery.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ProfileCondition.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ResolutionNormalizer.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ResponseProfile.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 51 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamInfo.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/SubtitleProfile.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/TranscodingProfile.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs | 14 |
15 files changed, 131 insertions, 49 deletions
diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs index 385e98f61..29d4d21ec 100644 --- a/MediaBrowser.Model/Dlna/CodecProfile.cs +++ b/MediaBrowser.Model/Dlna/CodecProfile.cs @@ -1,6 +1,7 @@ using MediaBrowser.Model.Extensions; using System.Collections.Generic; using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index ec13cacfa..e9e76a993 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -1,6 +1,9 @@ using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; namespace MediaBrowser.Model.Dlna { @@ -21,7 +24,7 @@ namespace MediaBrowser.Model.Dlna int? numVideoStreams, int? numAudioStreams, string videoCodecTag, - bool? isAvc) + bool? isAvc ) { switch (condition.Property) { @@ -86,8 +89,8 @@ namespace MediaBrowser.Model.Dlna } } - public bool IsVideoAudioConditionSatisfied(ProfileCondition condition, - int? audioChannels, + public bool IsVideoAudioConditionSatisfied(ProfileCondition condition, + int? audioChannels, int? audioBitrate, string audioProfile, bool? isSecondaryTrack) @@ -116,7 +119,7 @@ namespace MediaBrowser.Model.Dlna } int expected; - if (IntHelper.TryParseCultureInvariant(condition.Value, out expected)) + if (int.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) { switch (condition.Condition) { @@ -149,9 +152,9 @@ namespace MediaBrowser.Model.Dlna switch (condition.Condition) { case ProfileConditionType.EqualsAny: - { - return ListHelper.ContainsIgnoreCase(expected.Split('|'), currentValue); - } + { + return ListHelper.ContainsIgnoreCase(expected.Split('|'), currentValue); + } case ProfileConditionType.Equals: return StringHelper.EqualsIgnoreCase(currentValue, expected); case ProfileConditionType.NotEquals: @@ -170,7 +173,7 @@ namespace MediaBrowser.Model.Dlna } bool expected; - if (BoolHelper.TryParseCultureInvariant(condition.Value, out expected)) + if (bool.TryParse(condition.Value, out expected)) { switch (condition.Condition) { @@ -195,7 +198,7 @@ namespace MediaBrowser.Model.Dlna } float expected; - if (FloatHelper.TryParseCultureInvariant(condition.Value, out expected)) + if (float.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) { switch (condition.Condition) { @@ -214,7 +217,7 @@ namespace MediaBrowser.Model.Dlna return false; } - + private bool IsConditionSatisfied(ProfileCondition condition, double? currentValue) { if (!currentValue.HasValue) @@ -224,7 +227,7 @@ namespace MediaBrowser.Model.Dlna } double expected; - if (DoubleHelper.TryParseCultureInvariant(condition.Value, out expected)) + if (double.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) { switch (condition.Condition) { @@ -243,7 +246,7 @@ namespace MediaBrowser.Model.Dlna return false; } - + private bool IsConditionSatisfied(ProfileCondition condition, TransportStreamTimestamp? timestamp) { if (!timestamp.HasValue) @@ -251,9 +254,9 @@ namespace MediaBrowser.Model.Dlna // If the value is unknown, it satisfies if not marked as required return !condition.IsRequired; } - + TransportStreamTimestamp expected = (TransportStreamTimestamp)Enum.Parse(typeof(TransportStreamTimestamp), condition.Value, true); - + switch (condition.Condition) { case ProfileConditionType.Equals: diff --git a/MediaBrowser.Model/Dlna/ContainerProfile.cs b/MediaBrowser.Model/Dlna/ContainerProfile.cs index 931194dd3..35d7ada6b 100644 --- a/MediaBrowser.Model/Dlna/ContainerProfile.cs +++ b/MediaBrowser.Model/Dlna/ContainerProfile.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna { @@ -26,5 +28,12 @@ namespace MediaBrowser.Model.Dlna } return list; } + + public bool ContainsContainer(string container) + { + List<string> containers = GetContainers(); + + return containers.Count == 0 || ListHelper.ContainsIgnoreCase(containers, container ?? string.Empty); + } } } diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 884a9f29d..821531ed0 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -18,13 +18,13 @@ namespace MediaBrowser.Model.Dlna public string Id { get; set; } [XmlIgnore] - public DeviceProfileType ProfileType { get; set; } + public MediaBrowser.Model.Dlna.DeviceProfileType ProfileType { get; set; } /// <summary> /// Gets or sets the identification. /// </summary> /// <value>The identification.</value> - public DeviceIdentification Identification { get; set; } + public MediaBrowser.Model.Dlna.DeviceIdentification Identification { get; set; } public string FriendlyName { get; set; } public string Manufacturer { get; set; } @@ -36,8 +36,8 @@ namespace MediaBrowser.Model.Dlna public string SerialNumber { get; set; } public bool EnableAlbumArtInDidl { get; set; } - public bool EnableSingleAlbumArtLimit { get; set; } - public bool EnableSingleSubtitleLimit { get; set; } + public bool EnableSingleAlbumArtLimit { get; set; } + public bool EnableSingleSubtitleLimit { get; set; } public string SupportedMediaTypes { get; set; } @@ -99,7 +99,7 @@ namespace MediaBrowser.Model.Dlna public ResponseProfile[] ResponseProfiles { get; set; } public SubtitleProfile[] SubtitleProfiles { get; set; } - + public DeviceProfile() { DirectPlayProfiles = new DirectPlayProfile[] { }; @@ -108,9 +108,9 @@ namespace MediaBrowser.Model.Dlna CodecProfiles = new CodecProfile[] { }; ContainerProfiles = new ContainerProfile[] { }; SubtitleProfiles = new SubtitleProfile[] { }; - + XmlRootAttributes = new XmlAttribute[] { }; - + SupportedMediaTypes = "Audio,Photo,Video"; MaxStreamingBitrate = 8000000; MaxStaticBitrate = 8000000; @@ -122,7 +122,7 @@ namespace MediaBrowser.Model.Dlna List<string> list = new List<string>(); foreach (string i in (SupportedMediaTypes ?? string.Empty).Split(',')) { - if (!string.IsNullOrEmpty(i)) + if (!string.IsNullOrEmpty(i)) list.Add(i); } return list; @@ -134,7 +134,7 @@ namespace MediaBrowser.Model.Dlna foreach (var i in TranscodingProfiles) { - if (i.Type != DlnaProfileType.Audio) + if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Audio) { continue; } @@ -160,7 +160,7 @@ namespace MediaBrowser.Model.Dlna foreach (var i in TranscodingProfiles) { - if (i.Type != DlnaProfileType.Video) + if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Video) { continue; } @@ -191,7 +191,7 @@ namespace MediaBrowser.Model.Dlna foreach (var i in ResponseProfiles) { - if (i.Type != DlnaProfileType.Audio) + if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Audio) { continue; } @@ -208,12 +208,12 @@ namespace MediaBrowser.Model.Dlna continue; } - ConditionProcessor conditionProcessor = new ConditionProcessor(); + var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor(); var anyOff = false; foreach (ProfileCondition c in i.Conditions) { - if (!conditionProcessor.IsAudioConditionSatisfied(c, audioChannels, audioBitrate)) + if (!conditionProcessor.IsAudioConditionSatisfied(GetModelProfileCondition(c), audioChannels, audioBitrate)) { anyOff = true; break; @@ -230,13 +230,24 @@ namespace MediaBrowser.Model.Dlna return null; } + private MediaBrowser.Model.Dlna.ProfileCondition GetModelProfileCondition(ProfileCondition c) + { + return new MediaBrowser.Model.Dlna.ProfileCondition + { + Condition = c.Condition, + IsRequired = c.IsRequired, + Property = c.Property, + Value = c.Value + }; + } + public ResponseProfile GetImageMediaProfile(string container, int? width, int? height) { container = StringHelper.TrimStart(container ?? string.Empty, '.'); foreach (var i in ResponseProfiles) { - if (i.Type != DlnaProfileType.Photo) + if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Photo) { continue; } @@ -247,12 +258,12 @@ namespace MediaBrowser.Model.Dlna continue; } - ConditionProcessor conditionProcessor = new ConditionProcessor(); + var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor(); var anyOff = false; foreach (ProfileCondition c in i.Conditions) { - if (!conditionProcessor.IsImageConditionSatisfied(c, width, height)) + if (!conditionProcessor.IsImageConditionSatisfied(GetModelProfileCondition(c), width, height)) { anyOff = true; break; @@ -269,7 +280,7 @@ namespace MediaBrowser.Model.Dlna return null; } - public ResponseProfile GetVideoMediaProfile(string container, + public ResponseProfile GetVideoMediaProfile(string container, string audioCodec, string videoCodec, int? width, @@ -292,7 +303,7 @@ namespace MediaBrowser.Model.Dlna foreach (var i in ResponseProfiles) { - if (i.Type != DlnaProfileType.Video) + if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Video) { continue; } @@ -315,12 +326,12 @@ namespace MediaBrowser.Model.Dlna continue; } - ConditionProcessor conditionProcessor = new ConditionProcessor(); + var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor(); var anyOff = false; foreach (ProfileCondition c in i.Conditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(c, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) + if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { anyOff = true; break; diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs index 183299425..0b6ecf385 100644 --- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs index 926963ef6..b4fa4e0af 100644 --- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs +++ b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs @@ -1,4 +1,5 @@ using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs b/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs new file mode 100644 index 000000000..70191ff23 --- /dev/null +++ b/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs @@ -0,0 +1,11 @@ +using System; +using MediaBrowser.Model.Events; + +namespace MediaBrowser.Model.Dlna +{ + public interface IDeviceDiscovery + { + event EventHandler<GenericEventArgs<UpnpDeviceInfo>> DeviceDiscovered; + event EventHandler<GenericEventArgs<UpnpDeviceInfo>> DeviceLeft; + } +} diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs index 9234a2713..3d104f9c4 100644 --- a/MediaBrowser.Model/Dlna/ProfileCondition.cs +++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs @@ -1,4 +1,5 @@ using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs index fb353b016..b0760d91f 100644 --- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs +++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs @@ -61,7 +61,8 @@ namespace MediaBrowser.Model.Dlna private static double GetVideoBitrateScaleFactor(string codec) { if (StringHelper.EqualsIgnoreCase(codec, "h265") || - StringHelper.EqualsIgnoreCase(codec, "hevc")) + StringHelper.EqualsIgnoreCase(codec, "hevc") || + StringHelper.EqualsIgnoreCase(codec, "vp9")) { return .5; } diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs index c1735f3b7..1d4791b5c 100644 --- a/MediaBrowser.Model/Dlna/ResponseProfile.cs +++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 0c93df52b..6d68831ff 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -6,6 +6,8 @@ using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Session; using System; using System.Collections.Generic; +using System.Globalization; +using System.Linq; namespace MediaBrowser.Model.Dlna { @@ -408,6 +410,8 @@ namespace MediaBrowser.Model.Dlna audioStreamIndex = audioStream.Index; } + var allMediaStreams = item.MediaStreams; + MediaStream videoStream = item.VideoStream; // TODO: This doesn't accout for situation of device being able to handle media bitrate, but wifi connection not fast enough @@ -423,7 +427,7 @@ namespace MediaBrowser.Model.Dlna if (isEligibleForDirectPlay || isEligibleForDirectStream) { // See if it can be direct played - PlayMethod? directPlay = GetVideoDirectPlayProfile(options, item, videoStream, audioStream, isEligibleForDirectPlay, isEligibleForDirectStream); + PlayMethod? directPlay = GetVideoDirectPlayProfile(options, item, videoStream, audioStream, isEligibleForDirectPlay, isEligibleForDirectStream, allMediaStreams); if (directPlay != null) { @@ -483,7 +487,7 @@ namespace MediaBrowser.Model.Dlna if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels)) { int transcodingMaxAudioChannels; - if (IntHelper.TryParseCultureInvariant(transcodingProfile.MaxAudioChannels, out transcodingMaxAudioChannels)) + if (int.TryParse(transcodingProfile.MaxAudioChannels, NumberStyles.Any, CultureInfo.InvariantCulture, out transcodingMaxAudioChannels)) { playlistItem.TranscodingMaxAudioChannels = transcodingMaxAudioChannels; } @@ -652,7 +656,8 @@ namespace MediaBrowser.Model.Dlna MediaStream videoStream, MediaStream audioStream, bool isEligibleForDirectPlay, - bool isEligibleForDirectStream) + bool isEligibleForDirectStream, + List<MediaStream> allMediaStreams) { DeviceProfile profile = options.Profile; @@ -700,7 +705,7 @@ namespace MediaBrowser.Model.Dlna foreach (ContainerProfile i in profile.ContainerProfiles) { if (i.Type == DlnaProfileType.Video && - ListHelper.ContainsIgnoreCase(i.GetContainers(), container)) + i.ContainsContainer(container)) { foreach (ProfileCondition c in i.Conditions) { @@ -975,7 +980,7 @@ namespace MediaBrowser.Model.Dlna if (item.Bitrate.Value > maxBitrate.Value) { - _logger.Info("Bitrate exceeds DirectPlay limit"); + _logger.Info("Bitrate exceeds DirectPlay limit: media bitrate: {0}, max bitrate: {1}", item.Bitrate.Value.ToString(CultureInfo.InvariantCulture), maxBitrate.Value.ToString(CultureInfo.InvariantCulture)); return false; } @@ -1039,7 +1044,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.AudioBitrate: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.AudioBitrate = num; } @@ -1048,12 +1053,28 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.AudioChannels: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxAudioChannels = num; } break; } + case ProfileConditionValue.IsAvc: + { + bool isAvc; + if (bool.TryParse(value, out isAvc)) + { + if (isAvc && condition.Condition == ProfileConditionType.Equals) + { + item.RequireAvc = true; + } + else if (!isAvc && condition.Condition == ProfileConditionType.NotEquals) + { + item.RequireAvc = true; + } + } + break; + } case ProfileConditionValue.IsAnamorphic: case ProfileConditionValue.AudioProfile: case ProfileConditionValue.Has64BitOffsets: @@ -1069,7 +1090,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.RefFrames: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxRefFrames = num; } @@ -1078,7 +1099,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.VideoBitDepth: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxVideoBitDepth = num; } @@ -1092,7 +1113,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.Height: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxHeight = num; } @@ -1101,7 +1122,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.VideoBitrate: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.VideoBitrate = num; } @@ -1110,7 +1131,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.VideoFramerate: { float num; - if (FloatHelper.TryParseCultureInvariant(value, out num)) + if (float.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxFramerate = num; } @@ -1119,7 +1140,7 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.VideoLevel: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.VideoLevel = num; } @@ -1128,12 +1149,14 @@ namespace MediaBrowser.Model.Dlna case ProfileConditionValue.Width: { int num; - if (IntHelper.TryParseCultureInvariant(value, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { item.MaxWidth = num; } break; } + default: + break; } } } diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index b8db8a10c..eb3b7d8fb 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -6,6 +6,7 @@ using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Session; using System; using System.Collections.Generic; +using System.Linq; namespace MediaBrowser.Model.Dlna { @@ -35,6 +36,7 @@ namespace MediaBrowser.Model.Dlna public string VideoCodec { get; set; } public string VideoProfile { get; set; } + public bool RequireAvc { get; set; } public bool CopyTimestamps { get; set; } public bool EnableSubtitlesInManifest { get; set; } public bool EnableSplittingOnNonKeyFrames { get; set; } @@ -266,6 +268,7 @@ namespace MediaBrowser.Model.Dlna list.Add(new NameValuePair("Tag", item.MediaSource.ETag ?? string.Empty)); list.Add(new NameValuePair("EnableSplittingOnNonKeyFrames", item.EnableSplittingOnNonKeyFrames.ToString().ToLower())); + list.Add(new NameValuePair("RequireAvc", item.RequireAvc.ToString().ToLower())); return list; } diff --git a/MediaBrowser.Model/Dlna/SubtitleProfile.cs b/MediaBrowser.Model/Dlna/SubtitleProfile.cs index 0723de222..f182541d8 100644 --- a/MediaBrowser.Model/Dlna/SubtitleProfile.cs +++ b/MediaBrowser.Model/Dlna/SubtitleProfile.cs @@ -1,6 +1,7 @@ using MediaBrowser.Model.Extensions; using System.Collections.Generic; using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs index eeab99678..0f9fbae30 100644 --- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Xml.Serialization; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs new file mode 100644 index 000000000..f4b9d1e9b --- /dev/null +++ b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using MediaBrowser.Model.Net; + +namespace MediaBrowser.Model.Dlna +{ + public class UpnpDeviceInfo + { + public Uri Location { get; set; } + public Dictionary<string, string> Headers { get; set; } + public IpAddressInfo LocalIpAddress { get; set; } + public int LocalPort { get; set; } + } +} |
