mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
Create profile xml structure
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public class CodecProfile
|
||||
{
|
||||
[XmlAttribute("type")]
|
||||
public CodecType Type { get; set; }
|
||||
|
||||
public ProfileCondition[] Conditions { get; set; }
|
||||
|
||||
[XmlAttribute("codec")]
|
||||
public string Codec { get; set; }
|
||||
|
||||
public CodecProfile()
|
||||
@@ -37,9 +42,16 @@ namespace MediaBrowser.Controller.Dlna
|
||||
|
||||
public class ProfileCondition
|
||||
{
|
||||
[XmlAttribute("condition")]
|
||||
public ProfileConditionType Condition { get; set; }
|
||||
|
||||
[XmlAttribute("property")]
|
||||
public ProfileConditionValue Property { get; set; }
|
||||
|
||||
[XmlAttribute("value")]
|
||||
public string Value { get; set; }
|
||||
|
||||
[XmlAttribute("isRequired")]
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
public ProfileCondition()
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public class ContainerProfile
|
||||
{
|
||||
[XmlAttribute("type")]
|
||||
public DlnaProfileType Type { get; set; }
|
||||
public ProfileCondition[] Conditions { get; set; }
|
||||
|
||||
[XmlAttribute("container")]
|
||||
public string Container { get; set; }
|
||||
|
||||
public ContainerProfile()
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public class DeviceIdentification
|
||||
@@ -62,8 +64,13 @@ namespace MediaBrowser.Controller.Dlna
|
||||
|
||||
public class HttpHeaderInfo
|
||||
{
|
||||
[XmlAttribute("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[XmlAttribute("value")]
|
||||
public string Value { get; set; }
|
||||
|
||||
[XmlAttribute("match")]
|
||||
public HeaderMatchType Match { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
[XmlRoot("Profile")]
|
||||
public class DeviceProfile
|
||||
{
|
||||
/// <summary>
|
||||
@@ -12,19 +15,9 @@ namespace MediaBrowser.Controller.Dlna
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the transcoding profiles.
|
||||
/// </summary>
|
||||
/// <value>The transcoding profiles.</value>
|
||||
public TranscodingProfile[] TranscodingProfiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the direct play profiles.
|
||||
/// </summary>
|
||||
/// <value>The direct play profiles.</value>
|
||||
public DirectPlayProfile[] DirectPlayProfiles { get; set; }
|
||||
|
||||
public ContainerProfile[] ContainerProfiles { get; set; }
|
||||
[XmlIgnore]
|
||||
[IgnoreDataMember]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identification.
|
||||
@@ -57,14 +50,27 @@ namespace MediaBrowser.Controller.Dlna
|
||||
|
||||
public string ProtocolInfo { get; set; }
|
||||
|
||||
public MediaProfile[] MediaProfiles { get; set; }
|
||||
public CodecProfile[] CodecProfiles { get; set; }
|
||||
|
||||
public int TimelineOffsetSeconds { get; set; }
|
||||
|
||||
public bool RequiresPlainVideoItems { get; set; }
|
||||
public bool RequiresPlainFolders { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the direct play profiles.
|
||||
/// </summary>
|
||||
/// <value>The direct play profiles.</value>
|
||||
public DirectPlayProfile[] DirectPlayProfiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the transcoding profiles.
|
||||
/// </summary>
|
||||
/// <value>The transcoding profiles.</value>
|
||||
public TranscodingProfile[] TranscodingProfiles { get; set; }
|
||||
|
||||
public ContainerProfile[] ContainerProfiles { get; set; }
|
||||
|
||||
public CodecProfile[] CodecProfiles { get; set; }
|
||||
public MediaProfile[] MediaProfiles { get; set; }
|
||||
|
||||
public DeviceProfile()
|
||||
{
|
||||
DirectPlayProfiles = new DirectPlayProfile[] { };
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public class DirectPlayProfile
|
||||
{
|
||||
[XmlAttribute("container")]
|
||||
public string Container { get; set; }
|
||||
|
||||
[XmlAttribute("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
|
||||
[XmlAttribute("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
|
||||
[XmlAttribute("type")]
|
||||
public DlnaProfileType Type { get; set; }
|
||||
|
||||
public List<string> GetContainers()
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public interface IDlnaManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the dlna profiles.
|
||||
/// Gets the profile infos.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{DlnaProfile}.</returns>
|
||||
IEnumerable<DeviceProfile> GetProfiles();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default profile.
|
||||
/// </summary>
|
||||
/// <returns>DlnaProfile.</returns>
|
||||
DeviceProfile GetDefaultProfile();
|
||||
/// <returns>IEnumerable{DeviceProfileInfo}.</returns>
|
||||
IEnumerable<DeviceProfileInfo> GetProfileInfos();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile.
|
||||
@@ -23,6 +18,13 @@ namespace MediaBrowser.Controller.Dlna
|
||||
/// <returns>DeviceProfile.</returns>
|
||||
DeviceProfile GetProfile(IDictionary<string,string> headers);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>DeviceProfile.</returns>
|
||||
DeviceProfile GetProfile(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public class MediaProfile
|
||||
{
|
||||
[XmlAttribute("container")]
|
||||
public string Container { get; set; }
|
||||
|
||||
[XmlAttribute("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
|
||||
[XmlAttribute("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
|
||||
[XmlAttribute("type")]
|
||||
public DlnaProfileType Type { get; set; }
|
||||
|
||||
[XmlAttribute("orgPn")]
|
||||
public string OrgPn { get; set; }
|
||||
|
||||
[XmlAttribute("mimeType")]
|
||||
public string MimeType { get; set; }
|
||||
|
||||
public ProfileCondition[] Conditions { get; set; }
|
||||
|
||||
@@ -1,19 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public class TranscodingProfile
|
||||
{
|
||||
[XmlAttribute("container")]
|
||||
public string Container { get; set; }
|
||||
|
||||
[XmlAttribute("type")]
|
||||
public DlnaProfileType Type { get; set; }
|
||||
|
||||
[XmlAttribute("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
|
||||
[XmlAttribute("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
|
||||
[XmlAttribute("estimateContentLength")]
|
||||
public bool EstimateContentLength { get; set; }
|
||||
|
||||
[XmlAttribute("enableMpegtsM2TsMode")]
|
||||
public bool EnableMpegtsM2TsMode { get; set; }
|
||||
|
||||
[XmlAttribute("transcodeSeekInfo")]
|
||||
public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
|
||||
|
||||
public TranscodingSetting[] Settings { get; set; }
|
||||
@@ -32,7 +43,10 @@ namespace MediaBrowser.Controller.Dlna
|
||||
|
||||
public class TranscodingSetting
|
||||
{
|
||||
[XmlAttribute("name")]
|
||||
public TranscodingSettingType Name { get; set; }
|
||||
|
||||
[XmlAttribute("value")]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user