Ejemplo n.º 1
0
 public static IVideoEncoder GetAvailableEncoder(VideoConfigurator cfg)
 {
     if (Mpeg4VideoEncoderVcm.GetAvailableCodecs().Length > 0)
     {
         return(new Mpeg4VideoEncoderVcm(cfg.Width, cfg.Height, cfg.FramePerSecond, cfg.FrameCount, (int)cfg.Quality));
     }
     else
     {
         return(new MotionJpegVideoEncoderWpf(cfg.Width, cfg.Height, (int)cfg.Quality));
     }
 }
 public static IVideoEncoder GetAvailableEncoder(VideoConfigurator cfg)
 {
     // If there are Mpeg4 video codecs installed in the system -> take an internally preferred one
     if (Mpeg4VideoEncoderVcm.GetAvailableCodecs().Length > 0)
     {
         return(new Mpeg4VideoEncoderVcm(cfg.Width, cfg.Height, cfg.FramePerSecond, cfg.FrameCount, (int)cfg.Quality));
     }
     // Otherwise -> take MotionJpeg
     else
     {
         return(new MotionJpegVideoEncoderWpf(cfg.Width, cfg.Height, (int)cfg.Quality));
     }
 }
 public Recorder(string outputFilePath, IVideoEncoder videoEncoder, VideoConfigurator configurator)
 {
     _outputFilePath  = outputFilePath;
     _selectedEncoder = videoEncoder;
     _configurator    = configurator;
 }
Ejemplo n.º 4
0
 private RecorderFactory(VideoConfigurator configurator)
 {
     _configurator = configurator;
 }