diff options
Diffstat (limited to 'MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs')
| -rw-r--r-- | MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index 901d81c5f..e52951dd0 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -13,7 +13,8 @@ namespace MediaBrowser.Model.Dlna _profile = profile; } - public string BuildImageHeader(string container, + public string BuildImageHeader( + string container, int? width, int? height, bool isDirectStream, @@ -28,8 +29,7 @@ namespace MediaBrowser.Model.Dlna DlnaFlags.InteractiveTransferMode | DlnaFlags.DlnaV15; - string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}", - DlnaMaps.FlagsToString(flagValue)); + string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}", DlnaMaps.FlagsToString(flagValue)); ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container, width, @@ -37,7 +37,7 @@ namespace MediaBrowser.Model.Dlna if (string.IsNullOrEmpty(orgPn)) { - orgPn = mediaProfile == null ? null : mediaProfile.OrgPn; + orgPn = mediaProfile?.OrgPn; } if (string.IsNullOrEmpty(orgPn)) @@ -50,7 +50,8 @@ namespace MediaBrowser.Model.Dlna return (contentFeatures + orgOp + orgCi + dlnaflags).Trim(';'); } - public string BuildAudioHeader(string container, + public string BuildAudioHeader( + string container, string audioCodec, int? audioBitrate, int? audioSampleRate, @@ -102,7 +103,8 @@ namespace MediaBrowser.Model.Dlna return (contentFeatures + orgOp + orgCi + dlnaflags).Trim(';'); } - public List<string> BuildVideoHeader(string container, + public List<string> BuildVideoHeader( + string container, string videoCodec, string audioCodec, int? width, @@ -206,7 +208,7 @@ namespace MediaBrowser.Model.Dlna return contentFeatureList; } - private string GetImageOrgPnValue(string container, int? width, int? height) + private static string GetImageOrgPnValue(string container, int? width, int? height) { MediaFormatProfile? format = new MediaFormatProfileResolver() .ResolveImageFormat(container, @@ -216,7 +218,7 @@ namespace MediaBrowser.Model.Dlna return format.HasValue ? format.Value.ToString() : null; } - private string GetAudioOrgPnValue(string container, int? audioBitrate, int? audioSampleRate, int? audioChannels) + private static string GetAudioOrgPnValue(string container, int? audioBitrate, int? audioSampleRate, int? audioChannels) { MediaFormatProfile? format = new MediaFormatProfileResolver() .ResolveAudioFormat(container, @@ -227,7 +229,7 @@ namespace MediaBrowser.Model.Dlna return format.HasValue ? format.Value.ToString() : null; } - private string[] GetVideoOrgPnValue(string container, string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestamp) + private static string[] GetVideoOrgPnValue(string container, string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestamp) { return new MediaFormatProfileResolver().ResolveVideoFormat(container, videoCodec, audioCodec, width, height, timestamp); } |
