2014-03-24 22:25:03 -07:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2014-03-26 08:06:48 -07:00
|
|
|
|
using System.Xml.Serialization;
|
2014-03-24 22:25:03 -07:00
|
|
|
|
|
2014-03-13 12:08:02 -07:00
|
|
|
|
namespace MediaBrowser.Controller.Dlna
|
|
|
|
|
{
|
|
|
|
|
public class TranscodingProfile
|
|
|
|
|
{
|
2014-03-26 08:06:48 -07:00
|
|
|
|
[XmlAttribute("container")]
|
2014-03-13 12:08:02 -07:00
|
|
|
|
public string Container { get; set; }
|
|
|
|
|
|
2014-03-26 08:06:48 -07:00
|
|
|
|
[XmlAttribute("type")]
|
2014-03-13 12:08:02 -07:00
|
|
|
|
public DlnaProfileType Type { get; set; }
|
|
|
|
|
|
2014-03-26 08:06:48 -07:00
|
|
|
|
[XmlAttribute("videoCodec")]
|
2014-03-13 12:08:02 -07:00
|
|
|
|
public string VideoCodec { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
|
|
|
|
[XmlAttribute("audioCodec")]
|
2014-03-13 12:08:02 -07:00
|
|
|
|
public string AudioCodec { get; set; }
|
2014-03-17 18:45:41 -07:00
|
|
|
|
|
2014-03-28 12:58:18 -07:00
|
|
|
|
[XmlAttribute("protocol")]
|
|
|
|
|
public string Protocol { get; set; }
|
|
|
|
|
|
2014-03-26 08:06:48 -07:00
|
|
|
|
[XmlAttribute("estimateContentLength")]
|
2014-03-22 17:48:34 -07:00
|
|
|
|
public bool EstimateContentLength { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
|
|
|
|
[XmlAttribute("enableMpegtsM2TsMode")]
|
2014-03-24 22:25:03 -07:00
|
|
|
|
public bool EnableMpegtsM2TsMode { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
|
|
|
|
[XmlAttribute("transcodeSeekInfo")]
|
2014-03-22 17:48:34 -07:00
|
|
|
|
public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
|
|
|
|
|
|
2014-03-23 09:42:02 -07:00
|
|
|
|
public TranscodingSetting[] Settings { get; set; }
|
2014-03-17 18:45:41 -07:00
|
|
|
|
|
|
|
|
|
public TranscodingProfile()
|
|
|
|
|
{
|
2014-03-23 09:42:02 -07:00
|
|
|
|
Settings = new TranscodingSetting[] { };
|
2014-03-17 18:45:41 -07:00
|
|
|
|
}
|
2014-03-23 09:42:02 -07:00
|
|
|
|
|
2014-03-24 22:25:03 -07:00
|
|
|
|
|
|
|
|
|
public List<string> GetAudioCodecs()
|
|
|
|
|
{
|
|
|
|
|
return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
|
|
|
|
|
}
|
2014-03-17 18:45:41 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class TranscodingSetting
|
|
|
|
|
{
|
2014-03-26 08:06:48 -07:00
|
|
|
|
[XmlAttribute("name")]
|
2014-03-17 18:45:41 -07:00
|
|
|
|
public TranscodingSettingType Name { get; set; }
|
2014-03-26 08:06:48 -07:00
|
|
|
|
|
|
|
|
|
[XmlAttribute("value")]
|
2014-03-17 18:45:41 -07:00
|
|
|
|
public string Value { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum TranscodingSettingType
|
|
|
|
|
{
|
2014-03-24 10:54:45 -07:00
|
|
|
|
VideoProfile = 0
|
2014-03-22 17:48:34 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum TranscodeSeekInfo
|
|
|
|
|
{
|
|
|
|
|
Auto = 0,
|
|
|
|
|
Bytes = 1
|
2014-03-13 12:08:02 -07:00
|
|
|
|
}
|
|
|
|
|
}
|