Video display and composing engine for JUCE
Loading...
Searching...
No Matches
VideoFifo Class Referencefinal

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)
 
VideoFramegetWritingFrame ()
 Returns a VideoFrame reference you can write to.
 
void finishWriting ()
 This unlocks the videoFrame you are currently writing to and advances the write pointer.
 
VideoFramegetFrame (int64_t timecode)
 
VideoFramegetFrameSeconds (double pts)
 
bool setTimeCodeSeconds (double pts)
 Sets the current timecode.
 
VideoFramegetLatestFrame ()
 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
 

Detailed Description

The VideoFifo is a container, where the AVReader classes put the frames from reading to be displayed.

Constructor & Destructor Documentation

◆ VideoFifo()

VideoFifo ( int  size)

Member Function Documentation

◆ getWritingFrame()

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().

◆ finishWriting()

void finishWriting ( )

This unlocks the videoFrame you are currently writing to and advances the write pointer.

Referenced by MediaFoundationReader::Pimpl::readNewData().

◆ getFrame()

VideoFrame & getFrame ( int64_t  timecode)

◆ getFrameSeconds()

VideoFrame & getFrameSeconds ( double  pts)

References VideoFifo::getFrame().

Referenced by MovieClip::getFrame().

◆ setTimeCodeSeconds()

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

Returns
true if a frame is available, or false if not

◆ getLatestFrame()

VideoFrame & getLatestFrame ( )

Returns tha last written frame.

Use this for streaming clips

◆ getNumAvailableFrames()

int getNumAvailableFrames ( ) const

Referenced by VideoFifo::getFreeSpace().

◆ isFrameAvailable()

bool isFrameAvailable ( double  pts) const

◆ getFreeSpace()

int getFreeSpace ( ) const

Returns the number of frames that can be filled.

References VideoFifo::getNumAvailableFrames().

◆ clear()

void clear ( )

Reset all indices and set all VideoFrames to empty (timecode = -1)

Referenced by MovieClip::setNextReadPosition(), and MovieClip::setReader().

◆ setVideoSettings()

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().

◆ dumpTimeCodes()

void dumpTimeCodes ( ) const

For debugging: this shows all currently available timecodes in the fifo.

References FOLEYS_LOG.

Referenced by VideoFifo::getFrame().

◆ getFrameDurationInSeconds()

double getFrameDurationInSeconds ( ) const

The documentation for this class was generated from the following files: