jellyfin/MediaBrowser.Controller/Dlna/CodecProfile.cs

67 lines
1.4 KiB
C#
Raw Normal View History

2014-03-22 21:02:10 +01:00
using System.Collections.Generic;
using System.Linq;
2014-03-22 21:02:10 +01:00
namespace MediaBrowser.Controller.Dlna
{
public class CodecProfile
{
public CodecType Type { get; set; }
2014-03-23 17:42:02 +01:00
public ProfileCondition[] Conditions { get; set; }
public string Codec { get; set; }
2014-03-22 21:02:10 +01:00
public CodecProfile()
{
2014-03-23 17:42:02 +01:00
Conditions = new ProfileCondition[] {};
}
public List<string> GetCodecs()
{
return (Codec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
2014-03-22 21:02:10 +01:00
}
}
public enum CodecType
{
VideoCodec = 0,
VideoAudioCodec = 1,
AudioCodec = 2
}
public class ProfileCondition
{
public ProfileConditionType Condition { get; set; }
public ProfileConditionValue Property { get; set; }
public string Value { get; set; }
2014-03-23 01:48:34 +01:00
public bool IsRequired { get; set; }
public ProfileCondition()
{
IsRequired = true;
}
2014-03-22 21:02:10 +01:00
}
public enum ProfileConditionType
{
Equals = 0,
NotEquals = 1,
LessThanEqual = 2,
GreaterThanEqual = 3
}
public enum ProfileConditionValue
{
AudioChannels,
AudioBitrate,
2014-03-23 01:48:34 +01:00
AudioProfile,
2014-03-22 21:02:10 +01:00
Filesize,
Width,
Height,
2014-03-23 01:48:34 +01:00
Has64BitOffsets,
2014-03-23 07:07:43 +01:00
VideoBitDepth,
2014-03-22 21:02:10 +01:00
VideoBitrate,
VideoFramerate,
2014-03-23 01:48:34 +01:00
VideoLevel,
VideoProfile
2014-03-22 21:02:10 +01:00
}
}