expand on dlna profiles

This commit is contained in:
Luke Pulverenti
2014-03-13 15:08:02 -04:00
parent bd53ddc67c
commit 0db3588529
24 changed files with 517 additions and 663 deletions

View File

@@ -0,0 +1,25 @@

namespace MediaBrowser.Controller.Dlna
{
public class DirectPlayProfile
{
public string[] Containers { get; set; }
public string[] AudioCodecs { get; set; }
public string[] VideoCodecs { get; set; }
public string MimeType { get; set; }
public DlnaProfileType Type { get; set; }
public DirectPlayProfile()
{
Containers = new string[] { };
AudioCodecs = new string[] { };
VideoCodecs = new string[] { };
}
}
public enum DlnaProfileType
{
Audio = 0,
Video = 1
}
}

View File

@@ -0,0 +1,54 @@

namespace MediaBrowser.Controller.Dlna
{
public class DlnaProfile
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the type of the client.
/// </summary>
/// <value>The type of the client.</value>
public string ClientType { get; set; }
/// <summary>
/// Gets or sets the name of the friendly.
/// </summary>
/// <value>The name of the friendly.</value>
public string FriendlyName { get; set; }
/// <summary>
/// Gets or sets the model number.
/// </summary>
/// <value>The model number.</value>
public string ModelNumber { get; set; }
/// <summary>
/// Gets or sets the name of the model.
/// </summary>
/// <value>The name of the model.</value>
public string ModelName { 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 DlnaProfile()
{
DirectPlayProfiles = new DirectPlayProfile[] { };
TranscodingProfiles = new TranscodingProfile[] { };
}
}
}

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
namespace MediaBrowser.Controller.Dlna
{
public interface IDlnaManager
{
/// <summary>
/// Gets the dlna profiles.
/// </summary>
/// <returns>IEnumerable{DlnaProfile}.</returns>
IEnumerable<DlnaProfile> GetProfiles();
/// <summary>
/// Gets the default profile.
/// </summary>
/// <returns>DlnaProfile.</returns>
DlnaProfile GetDefaultProfile();
/// <summary>
/// Gets the profile.
/// </summary>
/// <param name="friendlyName">Name of the friendly.</param>
/// <param name="modelName">Name of the model.</param>
/// <param name="modelNumber">The model number.</param>
/// <returns>DlnaProfile.</returns>
DlnaProfile GetProfile(string friendlyName, string modelName, string modelNumber);
}
}

View File

@@ -0,0 +1,16 @@

namespace MediaBrowser.Controller.Dlna
{
public class TranscodingProfile
{
public string Container { get; set; }
public DlnaProfileType Type { get; set; }
public string MimeType { get; set; }
public string VideoCodec { get; set; }
public string AudioCodec { get; set; }
}
}

View File

@@ -1332,6 +1332,11 @@ namespace MediaBrowser.Controller.Entities
return ImageInfos.Where(i => i.Type == imageType);
}
public bool AddImages(ImageType imageType, IEnumerable<FileInfo> images)
{
return AddImages(imageType, images.Cast<FileSystemInfo>());
}
/// <summary>
/// Adds the images.
/// </summary>

View File

@@ -73,6 +73,10 @@
<Compile Include="Channels\IChannelManager.cs" />
<Compile Include="Collections\CollectionCreationOptions.cs" />
<Compile Include="Collections\ICollectionManager.cs" />
<Compile Include="Dlna\DirectPlayProfile.cs" />
<Compile Include="Dlna\IDlnaManager.cs" />
<Compile Include="Dlna\DlnaProfile.cs" />
<Compile Include="Dlna\TranscodingProfile.cs" />
<Compile Include="Drawing\IImageProcessor.cs" />
<Compile Include="Drawing\ImageFormat.cs" />
<Compile Include="Drawing\ImageProcessingOptions.cs" />