jellyfin/MediaBrowser.Model/Dlna/DirectPlayProfile.cs

37 lines
901 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2016-12-09 08:23:09 +01:00
using System.Xml.Serialization;
2014-03-15 05:14:07 +01:00
2014-04-02 00:23:07 +02:00
namespace MediaBrowser.Model.Dlna
2014-03-13 20:08:02 +01:00
{
public class DirectPlayProfile
{
2016-12-09 08:23:09 +01:00
[XmlAttribute("container")]
2014-03-23 07:07:43 +01:00
public string Container { get; set; }
2014-03-26 16:06:48 +01:00
2016-12-09 08:23:09 +01:00
[XmlAttribute("audioCodec")]
public string AudioCodec { get; set; }
2014-03-26 16:06:48 +01:00
2016-12-09 08:23:09 +01:00
[XmlAttribute("videoCodec")]
public string VideoCodec { get; set; }
2014-03-15 05:14:07 +01:00
2016-12-09 08:23:09 +01:00
[XmlAttribute("type")]
2014-03-13 20:08:02 +01:00
public DlnaProfileType Type { get; set; }
public bool SupportsContainer(string container)
{
2017-08-04 08:34:46 +02:00
return ContainerProfile.ContainsContainer(Container, container);
}
2017-08-19 21:43:35 +02:00
public string[] GetAudioCodecs()
{
2017-08-19 21:43:35 +02:00
return ContainerProfile.SplitValue(AudioCodec);
}
2017-08-19 21:43:35 +02:00
public string[] GetVideoCodecs()
{
2017-08-19 21:43:35 +02:00
return ContainerProfile.SplitValue(VideoCodec);
}
2014-03-13 20:08:02 +01:00
}
}