mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
reduce stdout redirection
This commit is contained in:
parent
3043d0687f
commit
22601f0a2e
@ -996,7 +996,7 @@ namespace MediaBrowser.Api.Playback
|
|||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
|
|
||||||
// Must consume both stdout and stderr or deadlocks may occur
|
// Must consume both stdout and stderr or deadlocks may occur
|
||||||
RedirectStandardOutput = true,
|
//RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardInput = true,
|
RedirectStandardInput = true,
|
||||||
|
|
||||||
@ -1063,7 +1063,7 @@ namespace MediaBrowser.Api.Playback
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MUST read both stdout and stderr asynchronously or a deadlock may occurr
|
// 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
|
// 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));
|
Task.Run(() => StartStreamingLog(transcodingJob, state, process.StandardError.BaseStream, state.LogFileStream));
|
||||||
|
@ -81,7 +81,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
|
|
||||||
// Must consume both stdout and stderr or deadlocks may occur
|
// Must consume both stdout and stderr or deadlocks may occur
|
||||||
RedirectStandardOutput = true,
|
//RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardInput = true,
|
RedirectStandardInput = true,
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
cancellationToken.Register(() => Cancel(process, encodingJob));
|
cancellationToken.Register(() => Cancel(process, encodingJob));
|
||||||
|
|
||||||
// MUST read both stdout and stderr asynchronously or a deadlock may occurr
|
// 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
|
// 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);
|
new JobLogger(Logger).StartStreamingLog(encodingJob, process.StandardError.BaseStream, encodingJob.LogFileStream);
|
||||||
|
@ -482,7 +482,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
|
|
||||||
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
|
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
|
||||||
RedirectStandardOutput = true,
|
//RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardInput = true,
|
RedirectStandardInput = true,
|
||||||
FileName = FFProbePath,
|
FileName = FFProbePath,
|
||||||
@ -517,7 +517,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
process.BeginErrorReadLine();
|
//process.BeginErrorReadLine();
|
||||||
|
|
||||||
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
|
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
|
|
||||||
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
|
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
|
||||||
RedirectStandardOutput = true,
|
//RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardInput = true,
|
RedirectStandardInput = true,
|
||||||
FileName = FFMpegPath,
|
FileName = FFMpegPath,
|
||||||
@ -643,7 +643,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
process.BeginOutputReadLine();
|
//process.BeginOutputReadLine();
|
||||||
|
|
||||||
using (var reader = new StreamReader(process.StandardError.BaseStream))
|
using (var reader = new StreamReader(process.StandardError.BaseStream))
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
|
|
||||||
// Must consume both stdout and stderr or deadlocks may occur
|
// Must consume both stdout and stderr or deadlocks may occur
|
||||||
RedirectStandardOutput = true,
|
//RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardInput = true,
|
RedirectStandardInput = true,
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||||||
cancellationToken.Register(Stop);
|
cancellationToken.Register(Stop);
|
||||||
|
|
||||||
// MUST read both stdout and stderr asynchronously or a deadlock may occurr
|
// MUST read both stdout and stderr asynchronously or a deadlock may occurr
|
||||||
process.BeginOutputReadLine();
|
//process.BeginOutputReadLine();
|
||||||
|
|
||||||
onStarted();
|
onStarted();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user