/// <summary> /// Initializes a new instance of the <see cref="TranscodingJobHelper"/> class. /// </summary> /// <param name="attachmentExtractor">Instance of the <see cref="IAttachmentExtractor"/> interface.</param> /// <param name="appPaths">Instance of the <see cref="IApplicationPaths"/> interface.</param> /// <param name="logger">Instance of the <see cref="ILogger{TranscodingJobHelpers}"/> interface.</param> /// <param name="mediaSourceManager">Instance of the <see cref="IMediaSourceManager"/> interface.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param> /// <param name="mediaEncoder">Instance of the <see cref="IMediaEncoder"/> interface.</param> /// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param> /// <param name="sessionManager">Instance of the <see cref="ISessionManager"/> interface.</param> /// <param name="authorizationContext">Instance of the <see cref="IAuthorizationContext"/> interface.</param> /// <param name="encodingHelper">Instance of <see cref="EncodingHelper"/>.</param> /// <param name="loggerFactory">Instance of the <see cref="ILoggerFactory"/> interface.</param> public TranscodingJobHelper( IAttachmentExtractor attachmentExtractor, IApplicationPaths appPaths, ILogger <TranscodingJobHelper> logger, IMediaSourceManager mediaSourceManager, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IServerConfigurationManager serverConfigurationManager, ISessionManager sessionManager, IAuthorizationContext authorizationContext, EncodingHelper encodingHelper, ILoggerFactory loggerFactory) { _attachmentExtractor = attachmentExtractor; _appPaths = appPaths; _logger = logger; _mediaSourceManager = mediaSourceManager; _fileSystem = fileSystem; _mediaEncoder = mediaEncoder; _serverConfigurationManager = serverConfigurationManager; _sessionManager = sessionManager; _authorizationContext = authorizationContext; _encodingHelper = encodingHelper; _loggerFactory = loggerFactory; DeleteEncodedMediaCache(); sessionManager.PlaybackProgress += OnPlaybackProgress; sessionManager.PlaybackStart += OnPlaybackProgress; }
public void SetUp() { AttachmentRetrieverSettings.AttachmentRetrieverType = AttachmentRetrieverType.Default; AttachmentExtractorSettings.AttachmentExtractorType = AttachmentExtractorType.Custom; _extractor = Substitute.For <IAttachmentExtractor>(); AttachmentExtractorSettings.CustomAttachmentExtractor = _extractor; }
/// <summary> /// Initializes a new instance of the <see cref="VideoAttachmentsController"/> class. /// </summary> /// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param> /// <param name="attachmentExtractor">Instance of the <see cref="IAttachmentExtractor"/> interface.</param> public VideoAttachmentsController( ILibraryManager libraryManager, IAttachmentExtractor attachmentExtractor) { _libraryManager = libraryManager; _attachmentExtractor = attachmentExtractor; }
public AttachmentService( ILogger <AttachmentService> logger, IServerConfigurationManager serverConfigurationManager, IHttpResultFactory httpResultFactory, ILibraryManager libraryManager, IAttachmentExtractor attachmentExtractor) : base(logger, serverConfigurationManager, httpResultFactory) { _libraryManager = libraryManager; _attachmentExtractor = attachmentExtractor; }