Beispiel #1
0
 public CastService(
     ILogger <CastService> logger,
     IBaseWebServer appWebServer,
     IFFmpegService ffmpegService,
     IYoutubeUrlDecoder youtubeUrlDecoder,
     ITelemetryService telemetryService,
     IAppSettingsService appSettings,
     IFileService fileService,
     IPlayer player)
 {
     _logger            = logger;
     _appWebServer      = appWebServer;
     _ffmpegService     = ffmpegService;
     _youtubeUrlDecoder = youtubeUrlDecoder;
     _telemetryService  = telemetryService;
     _appSettings       = appSettings;
     _fileService       = fileService;
     _player            = player;
     _subtitle          = new Track
     {
         TrackId  = SubTitleDefaultTrackId,
         SubType  = TextTrackType.Subtitles,
         Type     = TrackType.Text,
         Name     = "English",
         Language = "en-US"
     };
 }
 public VideoSource(string inputFile, IFFmpegService ffmpegService, ISourceSetting defaultSetting)
 {
     _ffmpegService     = ffmpegService;
     _workingDirectory  = "temp\\" + Guid.NewGuid().ToString();
     _inputFile         = inputFile;
     _durationInSeconds = _ffmpegService.GetVideoDurationInSeconds(_inputFile);
     _sourceSetting     = defaultSetting;
     UpdateFrames();
 }
Beispiel #3
0
 public MediaModule(
     ILogger logger,
     IFFmpegService fFMpegService,
     ITelemetryService telemetryService,
     IFileService fileService,
     string baseRoute)
     : base(baseRoute)
 {
     _logger           = logger;
     _ffmpegService    = fFMpegService;
     _telemetryService = telemetryService;
     _fileService      = fileService;
     _tokenSource      = new CancellationTokenSource();
 }
Beispiel #4
0
 public CastItController(
     ILogger <CastItController> logger,
     IFileService fileService,
     ICastService castService,
     IFFmpegService ffmpegService,
     IPlayer player,
     IAppSettingsService appSettings)
 {
     _logger        = logger;
     _fileService   = fileService;
     _castService   = castService;
     _ffmpegService = ffmpegService;
     _player        = player;
     _appSettings   = appSettings;
 }
Beispiel #5
0
 public AppWebServer(
     ILoggerFactory loggerFactory,
     ITelemetryService telemetryService,
     IFFmpegService ffmpegService,
     IFileService fileService,
     IPlayer player,
     IAppSettingsService appSettings)
 {
     _loggerFactory    = loggerFactory;
     _logger           = loggerFactory.CreateLogger <AppWebServer>();
     _telemetryService = telemetryService;
     _ffmpegService    = ffmpegService;
     _fileService      = fileService;
     _player           = player;
     _appSettings      = appSettings;
     _mediaModule      = new MediaModule(_logger, ffmpegService, telemetryService, fileService, AppWebServerConstants.MediaPath);
 }
        public MainWindow()
        {
            if (!File.Exists("ffmpeg.exe"))
            {
                MessageBox.Show("This application needs FFmpeg.exe to work.\n\nPlease download the exe from https://ffmpeg.org and put it in the same folder as this application.", "FFmpeg not found!", MessageBoxButton.OK, MessageBoxImage.Error);
                Close();
            }

            _ffmpegService = new FFmpegService();
            _sourceFactory = new SourceFactory(_ffmpegService, GetDefaultSetting());

            _tokenMaker = new TokenMaker(new VideoExporter(_ffmpegService, GetDefaultSetting()));
            _tokenMaker.OnExportLayerCompleted += OnExportLayerCompleted;

            SetBorder(GetBorders()[0]);

            InitializeComponent();
        }
Beispiel #7
0
 public VideoExporter(IFFmpegService ffmpegService, ISourceSetting sourceSetting)
 {
     _ffmpegService = ffmpegService;
     _sourceSetting = sourceSetting;
 }
Beispiel #8
0
 public SourceFactory(IFFmpegService ffmpegService, ISourceSetting defaultSetting)
 {
     _ffmpegService  = ffmpegService;
     _defaultSetting = defaultSetting;
 }
Beispiel #9
0
 /// <summary>
 /// Initialises a new instance of the <see cref="SplitterService" /> class.
 /// </summary>
 /// <param name="fileIoService">injected file io service.</param>
 /// <param name="ffmpegService">injected ffmpeg service.</param>
 public SplitterService(IFileIoService fileIoService, IFFmpegService ffmpegService)
 {
     this.fileIoService = fileIoService;
     this.ffmpegService = ffmpegService;
 }