aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Dlna/CodecProfile.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Dlna/CodecProfile.cs')
-rw-r--r--MediaBrowser.Controller/Dlna/CodecProfile.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Dlna/CodecProfile.cs b/MediaBrowser.Controller/Dlna/CodecProfile.cs
index a4592e654..2b9a40ea0 100644
--- a/MediaBrowser.Controller/Dlna/CodecProfile.cs
+++ b/MediaBrowser.Controller/Dlna/CodecProfile.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Linq;
namespace MediaBrowser.Controller.Dlna
@@ -6,18 +7,25 @@ namespace MediaBrowser.Controller.Dlna
public class CodecProfile
{
public CodecType Type { get; set; }
- public List<ProfileCondition> Conditions { get; set; }
+ public ProfileCondition[] Conditions { get; set; }
public string Codec { get; set; }
public CodecProfile()
{
- Conditions = new List<ProfileCondition>();
+ Conditions = new ProfileCondition[] {};
}
public List<string> GetCodecs()
{
return (Codec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
}
+
+ public bool ContainsCodec(string codec)
+ {
+ var codecs = GetCodecs();
+
+ return codecs.Count == 0 || codecs.Contains(codec, StringComparer.OrdinalIgnoreCase);
+ }
}
public enum CodecType
@@ -57,9 +65,12 @@ namespace MediaBrowser.Controller.Dlna
Width,
Height,
Has64BitOffsets,
+ VideoBitDepth,
VideoBitrate,
VideoFramerate,
VideoLevel,
- VideoProfile
+ VideoPacketLength,
+ VideoProfile,
+ VideoTimestamp
}
}