Beispiel #1
0
        public override void Initialize(object config, string outPath)
        {
            m_config           = (fcAPI.fcGifConfig)config;
            m_config.numColors = Mathf.Clamp(m_config.numColors, 1, 256);
            m_ctx = fcAPI.fcGifCreateContext(ref m_config);

            var path = outPath + ".gif";

            m_ostream = fcAPI.fcCreateFileStream(path);
            fcAPI.fcGifAddOutputStream(m_ctx, m_ostream);
        }
Beispiel #2
0
        public override void Initialize(object config, string outPath)
        {
            m_config             = (fcAPI.fcWaveConfig)config;
            m_config.sampleRate  = AudioSettings.outputSampleRate;
            m_config.numChannels = fcAPI.fcGetNumAudioChannels();
            m_ctx = fcAPI.fcWaveCreateContext(ref m_config);

            var path = outPath + ".wave";

            m_ostream = fcAPI.fcCreateFileStream(path);
            fcAPI.fcWaveAddOutputStream(m_ctx, m_ostream);
        }
Beispiel #3
0
        public override void Initialize(object config, string outPath)
        {
            m_config = (fcAPI.fcWebMConfig)config;
            m_config.videoTargetFramerate = 60;
            m_config.audioSampleRate      = AudioSettings.outputSampleRate;
            m_config.audioNumChannels     = fcAPI.fcGetNumAudioChannels();
            m_ctx = fcAPI.fcWebMCreateContext(ref m_config);

            var path = outPath + ".webm";

            m_ostream = fcAPI.fcCreateFileStream(path);
            fcAPI.fcWebMAddOutputStream(m_ctx, m_ostream);
        }
        public override void Initialize(MovieRecorder recorder)
        {
            m_numVideoFrames = 0;

            m_config = recorder.gifConfig;
            fcAPI.fcGifConfig gifconf = fcAPI.fcGifConfig.default_value;
            gifconf.width            = recorder.scratchBuffer.width;
            gifconf.height           = recorder.scratchBuffer.height;
            gifconf.num_colors       = Mathf.Clamp(m_config.numColors, 1, 256);
            gifconf.max_active_tasks = 0;
            m_ctx = fcAPI.fcGifCreateContext(ref gifconf);

            var path = recorder.outputDir.GetFullPath() + "/" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".gif";

            m_ostream = fcAPI.fcCreateFileStream(path);
            fcAPI.fcGifAddOutputStream(m_ctx, m_ostream);
        }
Beispiel #5
0
        public override void Initialize(MovieRecorder recorder)
        {
            m_config = recorder.webmConfig;
            fcAPI.fcWebMConfig webmconf = fcAPI.fcWebMConfig.default_value;
            webmconf                        = fcAPI.fcWebMConfig.default_value;
            webmconf.video                  = m_config.captureVideo;
            webmconf.audio                  = m_config.captureAudio;
            webmconf.video_width            = recorder.scratchBuffer.width;
            webmconf.video_height           = recorder.scratchBuffer.height;
            webmconf.video_target_framerate = 60;
            webmconf.video_target_bitrate   = m_config.videoBitrate;
            webmconf.audio_target_bitrate   = m_config.audioBitrate;
            webmconf.audio_sample_rate      = AudioSettings.outputSampleRate;
            webmconf.audio_num_channels     = fcAPI.fcGetNumAudioChannels();
            m_ctx = fcAPI.fcWebMCreateContext(ref webmconf);

            var path = recorder.outputDir.GetFullPath() + "/" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".webm";

            m_ostream = fcAPI.fcCreateFileStream(path);
            fcAPI.fcWebMAddOutputStream(m_ctx, m_ostream);
        }