updated dlna profile format

This commit is contained in:
Luke Pulverenti
2014-04-01 00:16:25 -04:00
parent 49b121e87f
commit 4afe2c3f73
37 changed files with 217 additions and 387 deletions

View File

@@ -74,13 +74,13 @@ namespace MediaBrowser.Controller.Dlna
public ContainerProfile[] ContainerProfiles { get; set; }
public CodecProfile[] CodecProfiles { get; set; }
public MediaProfile[] MediaProfiles { get; set; }
public ResponseProfile[] ResponseProfiles { get; set; }
public DeviceProfile()
{
DirectPlayProfiles = new DirectPlayProfile[] { };
TranscodingProfiles = new TranscodingProfile[] { };
MediaProfiles = new MediaProfile[] { };
ResponseProfiles = new ResponseProfile[] { };
CodecProfiles = new CodecProfile[] { };
ContainerProfiles = new ContainerProfile[] { };
@@ -147,11 +147,11 @@ namespace MediaBrowser.Controller.Dlna
});
}
public MediaProfile GetAudioMediaProfile(string container, string audioCodec, MediaStream audioStream)
public ResponseProfile GetAudioMediaProfile(string container, string audioCodec, MediaStream audioStream)
{
container = (container ?? string.Empty).TrimStart('.');
return MediaProfiles.FirstOrDefault(i =>
return ResponseProfiles.FirstOrDefault(i =>
{
if (i.Type != DlnaProfileType.Audio)
{
@@ -174,11 +174,11 @@ namespace MediaBrowser.Controller.Dlna
});
}
public MediaProfile GetVideoMediaProfile(string container, string audioCodec, string videoCodec, MediaStream audioStream, MediaStream videoStream)
public ResponseProfile GetVideoMediaProfile(string container, string audioCodec, string videoCodec, MediaStream audioStream, MediaStream videoStream)
{
container = (container ?? string.Empty).TrimStart('.');
return MediaProfiles.FirstOrDefault(i =>
return ResponseProfiles.FirstOrDefault(i =>
{
if (i.Type != DlnaProfileType.Video)
{
@@ -207,11 +207,11 @@ namespace MediaBrowser.Controller.Dlna
});
}
public MediaProfile GetPhotoMediaProfile(string container)
public ResponseProfile GetPhotoMediaProfile(string container)
{
container = (container ?? string.Empty).TrimStart('.');
return MediaProfiles.FirstOrDefault(i =>
return ResponseProfiles.FirstOrDefault(i =>
{
if (i.Type != DlnaProfileType.Photo)
{

View File

@@ -4,7 +4,7 @@ using System.Xml.Serialization;
namespace MediaBrowser.Controller.Dlna
{
public class MediaProfile
public class ResponseProfile
{
[XmlAttribute("container")]
public string Container { get; set; }
@@ -26,7 +26,7 @@ namespace MediaBrowser.Controller.Dlna
public ProfileCondition[] Conditions { get; set; }
public MediaProfile()
public ResponseProfile()
{
Conditions = new ProfileCondition[] {};
}

View File

@@ -30,13 +30,8 @@ namespace MediaBrowser.Controller.Dlna
[XmlAttribute("transcodeSeekInfo")]
public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
public TranscodingSetting[] Settings { get; set; }
public TranscodingProfile()
{
Settings = new TranscodingSetting[] { };
}
[XmlAttribute("videoProfile")]
public string VideoProfile { get; set; }
public List<string> GetAudioCodecs()
{
@@ -44,20 +39,6 @@ namespace MediaBrowser.Controller.Dlna
}
}
public class TranscodingSetting
{
[XmlAttribute("name")]
public TranscodingSettingType Name { get; set; }
[XmlAttribute("value")]
public string Value { get; set; }
}
public enum TranscodingSettingType
{
VideoProfile = 0
}
public enum TranscodeSeekInfo
{
Auto = 0,

View File

@@ -84,7 +84,7 @@
<Compile Include="Dlna\DirectPlayProfile.cs" />
<Compile Include="Dlna\IDlnaManager.cs" />
<Compile Include="Dlna\DeviceProfile.cs" />
<Compile Include="Dlna\MediaProfile.cs" />
<Compile Include="Dlna\ResponseProfile.cs" />
<Compile Include="Dlna\TranscodingProfile.cs" />
<Compile Include="Drawing\IImageProcessor.cs" />
<Compile Include="Drawing\ImageFormat.cs" />