aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-21 20:37:01 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-21 20:37:01 -0500
commit3d697cdab27baa33c9d00785fce6de4c448d6028 (patch)
tree702420ef8c3dbd6cff4bb1631aa7774b71e3ba73 /MediaBrowser.Api/Playback/BaseStreamingService.cs
parenta29e1eb036d22d108ee4234d31650a061b591073 (diff)
added new stream info properties
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs32
1 files changed, 31 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 9c147379a..10ef902d9 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1059,9 +1059,10 @@ namespace MediaBrowser.Api.Playback
}
//state.RunTimeTicks = recording.RunTimeTicks;
- state.SendInputOverStandardInput = recording.RecordingInfo.Status == RecordingStatus.InProgress;
+ state.ReadInputAtNativeFramerate = recording.RecordingInfo.Status == RecordingStatus.InProgress;
state.AudioSync = 1000;
state.DeInterlace = true;
+ state.InputFormat = "mpegts";
}
else if (item is LiveTvChannel)
{
@@ -1087,8 +1088,10 @@ namespace MediaBrowser.Api.Playback
}
state.SendInputOverStandardInput = true;
+ state.ReadInputAtNativeFramerate = true;
state.AudioSync = 1000;
state.DeInterlace = true;
+ state.InputFormat = "mpegts";
}
else
{
@@ -1140,6 +1143,33 @@ namespace MediaBrowser.Api.Playback
return state;
}
+ protected string GetInputModifier(StreamState state)
+ {
+ var inputModifier = string.Empty;
+
+ if (!string.IsNullOrEmpty(state.InputFormat))
+ {
+ inputModifier += " -f " + state.InputFormat;
+ }
+
+ if (!string.IsNullOrEmpty(state.InputVideoCodec))
+ {
+ inputModifier += " -vcodec " + state.InputVideoCodec;
+ }
+
+ if (!string.IsNullOrEmpty(state.InputAudioCodec))
+ {
+ inputModifier += " -acodec " + state.InputAudioCodec;
+ }
+
+ if (state.ReadInputAtNativeFramerate)
+ {
+ inputModifier += " -re";
+ }
+
+ return inputModifier;
+ }
+
/// <summary>
/// Infers the audio codec based on the url
/// </summary>