reduce stdout redirection
This commit is contained in:
parent
3043d0687f
commit
22601f0a2e
|
@ -996,7 +996,7 @@ namespace MediaBrowser.Api.Playback
|
|||
UseShellExecute = false,
|
||||
|
||||
// Must consume both stdout and stderr or deadlocks may occur
|
||||
RedirectStandardOutput = true,
|
||||
//RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardInput = true,
|
||||
|
||||
|
@ -1063,7 +1063,7 @@ namespace MediaBrowser.Api.Playback
|
|||
}
|
||||
|
||||
// MUST read both stdout and stderr asynchronously or a deadlock may occurr
|
||||
process.BeginOutputReadLine();
|
||||
//process.BeginOutputReadLine();
|
||||
|
||||
// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback
|
||||
Task.Run(() => StartStreamingLog(transcodingJob, state, process.StandardError.BaseStream, state.LogFileStream));
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
UseShellExecute = false,
|
||||
|
||||
// Must consume both stdout and stderr or deadlocks may occur
|
||||
RedirectStandardOutput = true,
|
||||
//RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardInput = true,
|
||||
|
||||
|
@ -133,7 +133,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
cancellationToken.Register(() => Cancel(process, encodingJob));
|
||||
|
||||
// MUST read both stdout and stderr asynchronously or a deadlock may occurr
|
||||
process.BeginOutputReadLine();
|
||||
//process.BeginOutputReadLine();
|
||||
|
||||
// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback
|
||||
new JobLogger(Logger).StartStreamingLog(encodingJob, process.StandardError.BaseStream, encodingJob.LogFileStream);
|
||||
|
|
|
@ -482,7 +482,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
UseShellExecute = false,
|
||||
|
||||
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
|
||||
RedirectStandardOutput = true,
|
||||
//RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardInput = true,
|
||||
FileName = FFProbePath,
|
||||
|
@ -517,7 +517,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
try
|
||||
{
|
||||
process.BeginErrorReadLine();
|
||||
//process.BeginErrorReadLine();
|
||||
|
||||
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
|
||||
|
||||
|
@ -612,7 +612,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
UseShellExecute = false,
|
||||
|
||||
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
|
||||
RedirectStandardOutput = true,
|
||||
//RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardInput = true,
|
||||
FileName = FFMpegPath,
|
||||
|
@ -643,7 +643,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
try
|
||||
{
|
||||
process.BeginOutputReadLine();
|
||||
//process.BeginOutputReadLine();
|
||||
|
||||
using (var reader = new StreamReader(process.StandardError.BaseStream))
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||
UseShellExecute = false,
|
||||
|
||||
// Must consume both stdout and stderr or deadlocks may occur
|
||||
RedirectStandardOutput = true,
|
||||
//RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardInput = true,
|
||||
|
||||
|
@ -174,7 +174,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||
cancellationToken.Register(Stop);
|
||||
|
||||
// MUST read both stdout and stderr asynchronously or a deadlock may occurr
|
||||
process.BeginOutputReadLine();
|
||||
//process.BeginOutputReadLine();
|
||||
|
||||
onStarted();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user