diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-03 18:50:04 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-03 18:50:04 -0400 |
| commit | 2a77500c6190c00e3783e42ee13042a3476d1ad1 (patch) | |
| tree | 5f3ec28258c7d392ae2ba2393153eadac98d6b1a /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | 0200911afc125051b4f5e652ef1bebeca984b571 (diff) | |
add latest translations
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index a72b2088b..8b05625cb 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Common.Extensions; +using System.Text; +using MediaBrowser.Common.Extensions; using MediaBrowser.Common.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Dlna; @@ -153,7 +154,7 @@ namespace MediaBrowser.Api.Playback if (time.HasValue) { - var seconds = TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds; + var seconds = TimeSpan.FromTicks(time.Value).TotalSeconds; if (seconds > 0) { @@ -172,16 +173,6 @@ namespace MediaBrowser.Api.Playback /// <value>The slow seek command line parameter.</value> protected string GetSlowSeekCommandLineParameter(StreamRequest request) { - var time = request.StartTimeTicks; - - if (time.HasValue) - { - if (TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds > 0) - { - return string.Format(" -ss {0}", FastSeekOffsetSeconds.ToString(UsCulture)); - } - } - return string.Empty; } @@ -922,7 +913,8 @@ namespace MediaBrowser.Api.Playback ApiEntryPoint.Instance.OnTranscodeBeginning(outputPath, TranscodingJobType, process, state.IsInputVideo, state.Request.StartTimeTicks, state.MediaPath, state.Request.DeviceId); - Logger.Info(process.StartInfo.FileName + " " + process.StartInfo.Arguments); + var commandLineLogMessage = process.StartInfo.FileName + " " + process.StartInfo.Arguments; + Logger.Info(commandLineLogMessage); var logFilePath = Path.Combine(ServerConfigurationManager.ApplicationPaths.LogDirectoryPath, "ffmpeg-" + Guid.NewGuid() + ".txt"); Directory.CreateDirectory(Path.GetDirectoryName(logFilePath)); @@ -930,6 +922,9 @@ namespace MediaBrowser.Api.Playback // FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory. state.LogFileStream = FileSystem.GetFileStream(logFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, true); + var commandLineLogMessageBytes = Encoding.UTF8.GetBytes(commandLineLogMessage + Environment.NewLine + Environment.NewLine); + await state.LogFileStream.WriteAsync(commandLineLogMessageBytes, 0, commandLineLogMessageBytes.Length).ConfigureAwait(false); + process.Exited += (sender, args) => OnFfMpegProcessExited(process, state); try @@ -1149,7 +1144,7 @@ namespace MediaBrowser.Api.Playback return state.VideoRequest.Framerate.Value; } - var maxrate = state.VideoRequest.MaxFramerate ?? 23.976; + var maxrate = state.VideoRequest.MaxFramerate ?? 23.97602; if (state.VideoStream != null) { @@ -1628,7 +1623,7 @@ namespace MediaBrowser.Api.Playback } var profile = string.IsNullOrWhiteSpace(state.Request.DeviceProfileId) ? - DlnaManager.GetProfile(headers) : + null : DlnaManager.GetProfile(state.Request.DeviceProfileId); if (profile == null) @@ -1686,7 +1681,6 @@ namespace MediaBrowser.Api.Playback } } - /// <summary> /// Adds the dlna headers. /// </summary> |
