aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs6
-rw-r--r--MediaBrowser.Api/Playback/StreamState.cs12
2 files changed, 16 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 3718edba4..288553ade 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -2358,7 +2358,8 @@ namespace MediaBrowser.Api.Playback
state.TargetVideoStreamCount,
state.TargetAudioStreamCount,
state.TargetVideoCodecTag,
- state.IsTargetAVC);
+ state.IsTargetAVC,
+ state.AllAudioCodecs);
if (mediaProfile != null)
{
@@ -2580,7 +2581,8 @@ namespace MediaBrowser.Api.Playback
state.TargetVideoStreamCount,
state.TargetAudioStreamCount,
state.TargetVideoCodecTag,
- state.IsTargetAVC
+ state.IsTargetAVC,
+ state.AllAudioCodecs
).FirstOrDefault() ?? string.Empty;
}
diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs
index 003599390..9c337781c 100644
--- a/MediaBrowser.Api/Playback/StreamState.cs
+++ b/MediaBrowser.Api/Playback/StreamState.cs
@@ -11,6 +11,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Linq;
using System.Threading;
namespace MediaBrowser.Api.Playback
@@ -244,6 +245,17 @@ namespace MediaBrowser.Api.Playback
public int? OutputAudioBitrate;
public int? OutputVideoBitrate;
+ public List<string> AllAudioCodecs
+ {
+ get
+ {
+ return MediaSource.MediaStreams.Where(i => i.Type == MediaStreamType.Audio)
+ .Select(i => i.Codec)
+ .Where(i => !string.IsNullOrWhiteSpace(i))
+ .ToList();
+ }
+ }
+
public string ActualOutputVideoCodec
{
get