Beispiel #1
0
 public override void AddVideoFrame(byte[] frame, fcAPI.fcPixelFormat format, double timestamp)
 {
     if (m_ctx)
     {
         fcAPI.fcGifAddFramePixels(m_ctx, frame, format, timestamp);
     }
 }
 public override void AddVideoFrame(byte[] frame, fcAPI.fcPixelFormat format, double timestamp)
 {
     if (m_ctx && m_config.video)
     {
         fcAPI.fcMP4AddVideoFramePixels(m_ctx, frame, format, timestamp);
     }
 }
Beispiel #3
0
        public override void AddVideoFrame(byte[] frame, fcAPI.fcPixelFormat format, double timestamp = -1.0)
        {
            string path     = m_outPath + "_" + m_frame.ToString("0000") + ".png";
            int    channels = System.Math.Min(m_config.channels, (int)format & 7);

            fcAPI.fcPngExportPixels(m_ctx, path, frame, m_config.width, m_config.height, format, channels);

            ++m_frame;
        }
Beispiel #4
0
        public override void AddVideoFrame(byte[] frame, fcAPI.fcPixelFormat format, double timestamp = -1.0)
        {
            string path     = m_outPath + "_" + m_frame.ToString("0000") + ".exr";
            int    channels = System.Math.Min(m_config.channels, (int)format & 7);

            fcAPI.fcExrBeginImage(m_ctx, path, m_config.width, m_config.height);
            for (int i = 0; i < channels; ++i)
            {
                fcAPI.fcExrAddLayerPixels(m_ctx, frame, format, i, s_channelNames[i]);
            }
            fcAPI.fcExrEndImage(m_ctx);

            ++m_frame;
        }
Beispiel #5
0
 public abstract void AddVideoFrame(byte[] frame, fcAPI.fcPixelFormat format, double timestamp = -1.0);
        public override void AddVideoFrame(byte[] frame, fcAPI.fcPixelFormat format, double timestamp)
        {
            bool keyframe = m_config.keyframeInterval > 0 && m_numVideoFrames % m_config.keyframeInterval == 0;

            fcAPI.fcGifAddFramePixels(m_ctx, frame, format, keyframe, timestamp);
        }