private static void ComposeFfmpeg(IServiceCollection services, ProcessingConfiguration processingConfig) { var ffmpegDiretory = Path.GetDirectoryName(processingConfig.Actions.FfmpegPath); Xabe.FFmpeg.FFmpeg.SetExecutablesPath(ffmpegDiretory); services.AddTransient <IFFmpegEngine, FFmpegEngine>(); }
private static ProcessingConfiguration GetProcessingConfig( IServiceCollection services, IConfiguration configuration) { var processingConfig = new ProcessingConfiguration(); configuration.GetSection("Processing").Bind(processingConfig); services.AddSingleton(processingConfig); return(processingConfig); }
private static void ComposeActions(IServiceCollection services, ProcessingConfiguration config) { services.AddTransient <IActionsFileStore, LocalFileStoreAdapter>( x => new LocalFileStoreAdapter( new LocalFileStoreOptions { BaseFilePath = config.Actions.BaseFilePath } )); services.AddTransient <ILocalRecordsComponent, LocalRecordComponent>(); services.AddTransient <IExtensionToMediaTypeMapper, ExtensionToMediaTypeMapper>(); services.AddTransient <IActionsMappings, ActionsMappings>(); services.AddTransient <IActionsHandlerFactory, ActionsHandlerFactory>(); services.AddTransient <IActionsProcessorFacade, ActionsProcessorFacade>(); services.AddTransient <IJsonActionsParser, JsonActionsParser>(); }