aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs')
-rw-r--r--MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs17
1 files changed, 8 insertions, 9 deletions
diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
index a62508fb1a..3c35ca0f6d 100644
--- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
+++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
@@ -1,7 +1,6 @@
-using System;
+using MediaBrowser.Model.MediaInfo;
+using System;
using System.Collections.Generic;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Model.Dlna
{
@@ -11,13 +10,13 @@ namespace MediaBrowser.Model.Dlna
{
if (string.Equals(container, "asf", StringComparison.OrdinalIgnoreCase))
{
- var val = ResolveVideoASFFormat(videoCodec, audioCodec, width, height);
+ MediaFormatProfile? val = ResolveVideoASFFormat(videoCodec, audioCodec, width, height);
return val.HasValue ? new List<MediaFormatProfile> { val.Value } : new List<MediaFormatProfile>();
}
if (string.Equals(container, "mp4", StringComparison.OrdinalIgnoreCase))
{
- var val = ResolveVideoMP4Format(videoCodec, audioCodec, width, height);
+ MediaFormatProfile? val = ResolveVideoMP4Format(videoCodec, audioCodec, width, height);
return val.HasValue ? new List<MediaFormatProfile> { val.Value } : new List<MediaFormatProfile>();
}
@@ -51,7 +50,7 @@ namespace MediaBrowser.Model.Dlna
if (string.Equals(container, "3gp", StringComparison.OrdinalIgnoreCase))
{
- var val = ResolveVideo3GPFormat(videoCodec, audioCodec);
+ MediaFormatProfile? val = ResolveVideo3GPFormat(videoCodec, audioCodec);
return val.HasValue ? new List<MediaFormatProfile> { val.Value } : new List<MediaFormatProfile>();
}
@@ -63,7 +62,7 @@ namespace MediaBrowser.Model.Dlna
private IEnumerable<MediaFormatProfile> ResolveVideoMPEG2TSFormat(string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestampType)
{
- var suffix = "";
+ string suffix = "";
switch (timestampType)
{
@@ -75,7 +74,7 @@ namespace MediaBrowser.Model.Dlna
break;
}
- var resolution = "S";
+ string resolution = "S";
if ((width.HasValue && width.Value > 720) || (height.HasValue && height.Value > 576))
{
resolution = "H";
@@ -83,7 +82,7 @@ namespace MediaBrowser.Model.Dlna
if (string.Equals(videoCodec, "mpeg2video", StringComparison.OrdinalIgnoreCase))
{
- var list = new List<MediaFormatProfile>();
+ List<MediaFormatProfile> list = new List<MediaFormatProfile>();
list.Add(ValueOf("MPEG_TS_SD_NA" + suffix));
list.Add(ValueOf("MPEG_TS_SD_EU" + suffix));