Esempio n. 1
0
        protected override void Execute(CodeActivityContext context)
        {
            Process ps = null;

            if (!DisableActivity.Get(context))
            {
                FFmpegArgument arguments = new FFmpegArgument();
                arguments.FFmpegFilePath    = FFmpegFilePath.Get(context);
                arguments.OutputFileName    = OutputFileName.Get(context);
                arguments.VideoCodec        = VideoCodec.Get(context);
                arguments.PixelFormat       = PixelFormat.Get(context);
                arguments.ExtraOptionString = ExtraOptionString.Get(context);
                arguments.MaxDuration       = MaxDuration.Get(context);
                arguments.MaxFileSize       = MaxFileSize.Get(context);
                arguments.FrameRate         = FrameRate.Get(context);

                ps = StartRecording.Start(arguments, DelayAfter.Get(context));
            }

            FFmpegProcess.Set(context, ps);
        }
Esempio n. 2
0
        protected override void Execute(NativeActivityContext context)
        {
            if (!IsActivityDisable.Get(context))
            {
                FFmpegArgument arguments = new FFmpegArgument();
                arguments.FFmpegFilePath    = FFmpegFilePath.Get(context);
                arguments.OutputFileName    = OutputFileName.Get(context);
                arguments.VideoCodec        = VideoCodec.Get(context);
                arguments.PixelFormat       = PixelFormat.Get(context);
                arguments.ExtraOptionString = ExtraOptionString.Get(context);
                arguments.MaxDuration       = MaxDuration.Get(context);
                arguments.MaxFileSize       = MaxFileSize.Get(context);
                arguments.FrameRate         = FrameRate.Get(context);


                ps = StartRecording.Start(arguments, DelayAfter.Get(context));
            }

            if (Body != null)
            {
                context.ScheduleAction(Body, OnCompleted, OnFaulted);
            }
        }