aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/StreamState.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-24 22:00:19 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-24 22:00:19 -0400
commiteca1ba0b12da195dff3c31ffb799e4e3a7b5b5b9 (patch)
tree436352b39c2c78e1b6731a9d44c09dd8407bed2f /MediaBrowser.Api/Playback/StreamState.cs
parent725e1a1509231650ae448d9eb7db55cce6fcd6bb (diff)
fixes #797 - Determine mpeg2ts timestamp info
Diffstat (limited to 'MediaBrowser.Api/Playback/StreamState.cs')
-rw-r--r--MediaBrowser.Api/Playback/StreamState.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs
index fe9199244..051413259 100644
--- a/MediaBrowser.Api/Playback/StreamState.cs
+++ b/MediaBrowser.Api/Playback/StreamState.cs
@@ -10,6 +10,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
+using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Api.Playback
{
@@ -26,7 +27,7 @@ namespace MediaBrowser.Api.Playback
{
get { return Request as VideoStreamRequest; }
}
-
+
/// <summary>
/// Gets or sets the log file stream.
/// </summary>
@@ -77,19 +78,21 @@ namespace MediaBrowser.Api.Playback
public string InputAudioSync { get; set; }
public string InputVideoSync { get; set; }
-
+
public bool DeInterlace { get; set; }
public bool ReadInputAtNativeFramerate { get; set; }
public string InputFormat { get; set; }
public string InputVideoCodec { get; set; }
public string InputAudioCodec { get; set; }
+ public TransportStreamTimestamp InputTimestamp { get; set; }
+
public string MimeType { get; set; }
public bool EstimateContentLength { get; set; }
public bool EnableMpegtsM2TsMode { get; set; }
public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
-
+
public string GetMimeType(string outputPath)
{
if (!string.IsNullOrEmpty(MimeType))
@@ -269,11 +272,13 @@ namespace MediaBrowser.Api.Playback
{
get
{
- var stream = VideoStream;
+ var defaultValue = string.Equals(OutputContainer, "m2ts", StringComparison.OrdinalIgnoreCase) ?
+ TransportStreamTimestamp.VALID :
+ TransportStreamTimestamp.NONE;
return !Request.Static
- ? TransportStreamTimestamp.VALID
- : stream == null ? TransportStreamTimestamp.VALID : stream.Timestamp;
+ ? defaultValue
+ : InputTimestamp;
}
}