mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #6558 from dmitrylyzo/ffmpeg-exitcode
This commit is contained in:
commit
09f33d3b87
@ -11,6 +11,7 @@ using System.Threading.Tasks;
|
|||||||
using Jellyfin.Api.Models.PlaybackDtos;
|
using Jellyfin.Api.Models.PlaybackDtos;
|
||||||
using Jellyfin.Api.Models.StreamingDtos;
|
using Jellyfin.Api.Models.StreamingDtos;
|
||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
|
using MediaBrowser.Common;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
@ -607,6 +608,10 @@ namespace Jellyfin.Api.Helpers
|
|||||||
{
|
{
|
||||||
StartThrottler(state, transcodingJob);
|
StartThrottler(state, transcodingJob);
|
||||||
}
|
}
|
||||||
|
else if (transcodingJob.ExitCode != 0)
|
||||||
|
{
|
||||||
|
throw new FfmpegException(string.Format(CultureInfo.InvariantCulture, "FFmpeg exited with code {0}", transcodingJob.ExitCode));
|
||||||
|
}
|
||||||
|
|
||||||
_logger.LogDebug("StartFfMpeg() finished successfully");
|
_logger.LogDebug("StartFfMpeg() finished successfully");
|
||||||
|
|
||||||
@ -743,6 +748,7 @@ namespace Jellyfin.Api.Helpers
|
|||||||
private void OnFfMpegProcessExited(Process process, TranscodingJobDto job, StreamState state)
|
private void OnFfMpegProcessExited(Process process, TranscodingJobDto job, StreamState state)
|
||||||
{
|
{
|
||||||
job.HasExited = true;
|
job.HasExited = true;
|
||||||
|
job.ExitCode = process.ExitCode;
|
||||||
|
|
||||||
_logger.LogDebug("Disposing stream resources");
|
_logger.LogDebug("Disposing stream resources");
|
||||||
state.Dispose();
|
state.Dispose();
|
||||||
|
@ -106,6 +106,11 @@ namespace Jellyfin.Api.Models.PlaybackDtos
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasExited { get; set; }
|
public bool HasExited { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets exit code.
|
||||||
|
/// </summary>
|
||||||
|
public int ExitCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether is user paused.
|
/// Gets or sets a value indicating whether is user paused.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.MediaEncoding
|
namespace MediaBrowser.Common
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents errors that occur during interaction with FFmpeg.
|
/// Represents errors that occur during interaction with FFmpeg.
|
@ -12,6 +12,7 @@ using System.Text.RegularExpressions;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.Extensions.Json;
|
using Jellyfin.Extensions.Json;
|
||||||
|
using MediaBrowser.Common;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
|
@ -11,6 +11,7 @@ using System.Net.Http;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using MediaBrowser.Common;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user