aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/StreamState.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/StreamState.cs')
-rw-r--r--MediaBrowser.Api/Playback/StreamState.cs70
1 files changed, 68 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs
index dd5065e53..40e765f1a 100644
--- a/MediaBrowser.Api/Playback/StreamState.cs
+++ b/MediaBrowser.Api/Playback/StreamState.cs
@@ -11,6 +11,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading;
+using MediaBrowser.Model.Net;
namespace MediaBrowser.Api.Playback
{
@@ -63,8 +64,15 @@ namespace MediaBrowser.Api.Playback
public string LiveTvStreamId { get; set; }
- public int SegmentLength = 10;
- public int HlsListSize;
+ public int SegmentLength = 6;
+
+ public int HlsListSize
+ {
+ get
+ {
+ return ReadInputAtNativeFramerate ? 1000 : 0;
+ }
+ }
public long? RunTimeTicks;
@@ -90,6 +98,7 @@ namespace MediaBrowser.Api.Playback
public string InputVideoSync { get; set; }
public bool DeInterlace { get; set; }
+
public bool ReadInputAtNativeFramerate { get; set; }
public TransportStreamTimestamp InputTimestamp { get; set; }
@@ -180,6 +189,50 @@ namespace MediaBrowser.Api.Playback
public int? OutputAudioBitrate;
public int? OutputVideoBitrate;
+ public string ActualOutputVideoCodec
+ {
+ get
+ {
+ var codec = OutputVideoCodec;
+
+ if (string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase))
+ {
+ var stream = VideoStream;
+
+ if (stream != null)
+ {
+ return stream.Codec;
+ }
+
+ return null;
+ }
+
+ return codec;
+ }
+ }
+
+ public string ActualOutputAudioCodec
+ {
+ get
+ {
+ var codec = OutputAudioCodec;
+
+ if (string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase))
+ {
+ var stream = AudioStream;
+
+ if (stream != null)
+ {
+ return stream.Codec;
+ }
+
+ return null;
+ }
+
+ return codec;
+ }
+ }
+
public string OutputContainer { get; set; }
public DeviceProfile DeviceProfile { get; set; }
@@ -361,5 +414,18 @@ namespace MediaBrowser.Api.Playback
return false;
}
}
+
+ public bool? IsTargetCabac
+ {
+ get
+ {
+ if (Request.Static)
+ {
+ return VideoStream == null ? null : VideoStream.IsCabac;
+ }
+
+ return true;
+ }
+ }
}
}