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);
        }
        public override void Initialize(MovieRecorder recorder)
        {
            m_config = recorder.mp4Config;
            fcAPI.fcMP4Config mp4conf = fcAPI.fcMP4Config.default_value;
            mp4conf                        = fcAPI.fcMP4Config.default_value;
            mp4conf.video                  = m_config.captureVideo;
            mp4conf.audio                  = m_config.captureAudio;
            mp4conf.video_width            = recorder.scratchBuffer.width;
            mp4conf.video_height           = recorder.scratchBuffer.height;
            mp4conf.video_target_framerate = 60;
            mp4conf.video_target_bitrate   = m_config.videoBitrate;
            mp4conf.audio_target_bitrate   = m_config.audioBitrate;
            mp4conf.audio_sample_rate      = AudioSettings.outputSampleRate;
            mp4conf.audio_num_channels     = fcAPI.fcGetNumAudioChannels();

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

            m_ctx = fcAPI.fcMP4OSCreateContext(ref mp4conf, path);
        }
示例#3
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);
        }
 public abstract void Initialize(MovieRecorder recorder);