The VideoFifo is a container, where the AVReader classes put the frames from reading to be displayed. More...
#include <foleys_VideoFifo.h>
Public Member Functions | |
| VideoFifo (int size) | |
| VideoFrame & | getWritingFrame () |
| Returns a VideoFrame reference you can write to. | |
| void | finishWriting () |
| This unlocks the videoFrame you are currently writing to and advances the write pointer. | |
| VideoFrame & | getFrame (int64_t timecode) |
| VideoFrame & | getFrameSeconds (double pts) |
| bool | setTimeCodeSeconds (double pts) |
| Sets the current timecode. | |
| VideoFrame & | getLatestFrame () |
| Returns tha last written frame. | |
| int | getNumAvailableFrames () const |
| bool | isFrameAvailable (double pts) const |
| int | getFreeSpace () const |
| Returns the number of frames that can be filled. | |
| void | clear () |
| Reset all indices and set all VideoFrames to empty (timecode = -1) | |
| void | setVideoSettings (const VideoStreamSettings &settings) |
| Sets the VideoSettings. | |
| void | dumpTimeCodes () const |
| For debugging: this shows all currently available timecodes in the fifo. | |
| double | getFrameDurationInSeconds () const |
The VideoFifo is a container, where the AVReader classes put the frames from reading to be displayed.
| VideoFifo | ( | int | size | ) |
| VideoFrame & getWritingFrame | ( | ) |
Returns a VideoFrame reference you can write to.
Make sure to call finishWriting once you are done writing.
Referenced by MediaFoundationReader::Pimpl::readNewData().
| void finishWriting | ( | ) |
This unlocks the videoFrame you are currently writing to and advances the write pointer.
Referenced by MediaFoundationReader::Pimpl::readNewData().
| VideoFrame & getFrame | ( | int64_t | timecode | ) |
References VideoFifo::dumpTimeCodes(), and FOLEYS_LOG.
Referenced by VideoFifo::getFrameSeconds().
| VideoFrame & getFrameSeconds | ( | double | pts | ) |
References VideoFifo::getFrame().
Referenced by MovieClip::getFrame().
| bool setTimeCodeSeconds | ( | double | pts | ) |
Sets the current timecode.
This is important if you don't use the frames, otherwise the video fifo will fill up and clogg the reading
| VideoFrame & getLatestFrame | ( | ) |
Returns tha last written frame.
Use this for streaming clips
| int getNumAvailableFrames | ( | ) | const |
Referenced by VideoFifo::getFreeSpace().
| bool isFrameAvailable | ( | double | pts | ) | const |
Referenced by MovieClip::isFrameAvailable(), and MovieClip::waitForFrameReady().
| int getFreeSpace | ( | ) | const |
Returns the number of frames that can be filled.
References VideoFifo::getNumAvailableFrames().
| void clear | ( | ) |
Reset all indices and set all VideoFrames to empty (timecode = -1)
Referenced by MovieClip::setNextReadPosition(), and MovieClip::setReader().
| void setVideoSettings | ( | const VideoStreamSettings & | settings | ) |
Sets the VideoSettings.
This is needed for the defaultDuration, but can be also used for creating the empty frames.
References VideoStreamSettings::defaultDuration, FOLEYS_LOG, VideoStreamSettings::frameSize, VideoStreamSettings::timebase, and Size::toString().
Referenced by MovieClip::setReader().
| void dumpTimeCodes | ( | ) | const |
For debugging: this shows all currently available timecodes in the fifo.
References FOLEYS_LOG.
Referenced by VideoFifo::getFrame().
| double getFrameDurationInSeconds | ( | ) | const |
References VideoStreamSettings::defaultDuration, and VideoStreamSettings::timebase.