2014-03-15 04:14:07 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
2014-03-13 19:08:02 +00:00
|
|
|
|
namespace MediaBrowser.Controller.Dlna
|
|
|
|
|
{
|
|
|
|
|
public class DirectPlayProfile
|
|
|
|
|
{
|
2014-03-15 04:14:07 +00:00
|
|
|
|
public string Container { get; set; }
|
|
|
|
|
public string AudioCodec { get; set; }
|
|
|
|
|
public string VideoCodec { get; set; }
|
|
|
|
|
|
|
|
|
|
[IgnoreDataMember]
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
public string[] Containers
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (Container ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
Container = value == null ? null : string.Join(",", value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[IgnoreDataMember]
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
public string[] AudioCodecs
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (AudioCodec ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
AudioCodec = value == null ? null : string.Join(",", value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[IgnoreDataMember]
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
public string[] VideoCodecs
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (VideoCodec ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
VideoCodec = value == null ? null : string.Join(",", value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-18 01:45:41 +00:00
|
|
|
|
public string OrgPn { get; set; }
|
2014-03-13 19:08:02 +00:00
|
|
|
|
public string MimeType { get; set; }
|
|
|
|
|
public DlnaProfileType Type { get; set; }
|
|
|
|
|
|
2014-03-15 04:14:07 +00:00
|
|
|
|
public List<ProfileCondition> Conditions { get; set; }
|
|
|
|
|
|
2014-03-13 19:08:02 +00:00
|
|
|
|
public DirectPlayProfile()
|
|
|
|
|
{
|
2014-03-15 04:14:07 +00:00
|
|
|
|
Conditions = new List<ProfileCondition>();
|
2014-03-13 19:08:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-15 04:14:07 +00:00
|
|
|
|
public class ProfileCondition
|
|
|
|
|
{
|
|
|
|
|
public ProfileConditionType Condition { get; set; }
|
2014-03-22 18:25:03 +00:00
|
|
|
|
public ProfileConditionValue Property { get; set; }
|
|
|
|
|
public string Value { get; set; }
|
2014-03-15 04:14:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-03-13 19:08:02 +00:00
|
|
|
|
public enum DlnaProfileType
|
|
|
|
|
{
|
|
|
|
|
Audio = 0,
|
2014-03-22 18:25:03 +00:00
|
|
|
|
Video = 1,
|
|
|
|
|
Photo = 2
|
2014-03-13 19:08:02 +00:00
|
|
|
|
}
|
2014-03-15 04:14:07 +00:00
|
|
|
|
|
|
|
|
|
public enum ProfileConditionType
|
|
|
|
|
{
|
|
|
|
|
Equals = 0,
|
|
|
|
|
NotEquals = 1,
|
|
|
|
|
LessThanEqual = 2,
|
|
|
|
|
GreaterThanEqual = 3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum ProfileConditionValue
|
|
|
|
|
{
|
|
|
|
|
AudioChannels,
|
|
|
|
|
AudioBitrate,
|
|
|
|
|
Filesize,
|
|
|
|
|
VideoWidth,
|
|
|
|
|
VideoHeight,
|
|
|
|
|
VideoBitrate,
|
|
|
|
|
VideoFramerate
|
|
|
|
|
}
|
2014-03-13 19:08:02 +00:00
|
|
|
|
}
|