public TimedFrameWriter(IAviVideoStream videoStream, AviWriter writer, RecorderParams @params)
 {
     VideoStream = videoStream;
     Writer      = writer;
     Params      = @params;
     msPerFrame  = (1.0 / (double)writer.FramesPerSecond) * 1000;
 }
示例#2
0
        public MainPage()
        {
            this.InitializeComponent();

            identificationHelper = new IdentificationHelper();

            RecorderParams = new RecorderParams(2, 0.15f, 10);
            recorderHelper = new RecorderHelper(RecorderParams, this);

            Messages = new ObservableCollection <Message>();
            Speakers = new ObservableCollection <Speaker>();
        }
        public StillMovieMaker(string directory, string fileName, double Scale, int framesPerSecond, int quality, int startFrame, int endFrame, string fileNameFormat, FourCC?codec = null)
        {
            Codec          = codec ?? defaultCodec;
            ImageDirectory = directory;
            var    di    = new DirectoryInfo(directory);
            var    first = di.GetFiles("*.png").First();
            Bitmap bmp   = (Bitmap)Bitmap.FromFile(first.FullName);

            Width          = bmp.Width;
            Height         = bmp.Height;
            FileName       = Path.Combine(di.FullName, Path.GetFileName(fileName));
            Params         = new RecorderParams(FileName, 1, framesPerSecond, defaultCodec, 80, Height, Width);
            StartFrame     = startFrame;
            EndFrame       = endFrame;
            FileNameFormat = fileNameFormat;
        }
示例#4
0
            public Recorder(RecorderParams Params)
            {
                this.Params = Params;

                // Create AVI writer and specify FPS
                writer = Params.CreateAviWriter();

                // Create video stream
                videoStream = Params.CreateVideoStream(writer);
                // Set only name. Other properties were when creating stream,
                // either explicitly by arguments or implicitly by the encoder used
                videoStream.Name = "Captura";

                screenThread = new Thread(RecordScreen)
                {
                    Name         = typeof(Recorder).Name + ".RecordScreen",
                    IsBackground = true
                };

                //screenThread.Start();
            }
示例#5
0
 public RecorderHelper(RecorderParams parameters, IRecordAction actionHandler)
 {
     Params         = parameters;
     _actionHandler = actionHandler;
 }