using MediaBrowser.Common.IO;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers.MediaInfo;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
using MoreLinq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.MediaInfo
{
///
/// Class FFMpegManager
///
public class FFMpegManager
{
///
/// Gets or sets the video image cache.
///
/// The video image cache.
internal FileSystemRepository VideoImageCache { get; set; }
///
/// Gets or sets the subtitle cache.
///
/// The subtitle cache.
internal FileSystemRepository SubtitleCache { get; set; }
private readonly ILibraryManager _libraryManager;
private readonly IServerApplicationPaths _appPaths;
private readonly IMediaEncoder _encoder;
private readonly ILogger _logger;
///
/// Holds the list of new items to generate chapter image for when the NewItemTimer expires
///
private readonly List