filmstro_ffmpeg
 All Classes Files Functions Friends Macros
Public Member Functions | List of all members
FFmpegVideoReader::DecoderThread Class Reference

class for FFmpegReader to decode audio and images asynchronously This is to keep the audio thread as fast as possible More...

#include <filmstro_ffmpeg_FFmpegVideoReader.h>

Inheritance diagram for FFmpegVideoReader::DecoderThread:

Public Member Functions

 DecoderThread (AudioBufferFIFO< float > &fifo, const int videoFifoSize)
 
virtual ~DecoderThread ()
 
bool loadMovieFile (const juce::File &inputFile)
 
void closeMovieFile ()
 
void addVideoListener (FFmpegVideoListener *listener)
 
void removeVideoListener (FFmpegVideoListener *listener)
 
void run () override
 working loop More...
 
void setCurrentPTS (const double pts, bool seek=false)
 set the currently played PTS according to the audio stream More...
 
double getCurrentPTS () const
 returns the presentation timestamp the video is synchronised to More...
 
int getVideoWidth () const
 get the width of the video images according to decoder More...
 
int getVideoHeight () const
 get the height of the video images according to decoder More...
 
enum AVPixelFormat getPixelFormat () const
 get the pixel format of the video images according to decoder, will be converted to BGR0 to be displayed as juce::Image More...
 
double getPixelAspect () const
 This will return the aspect ratio of each pixel. More...
 
enum AVSampleFormat getSampleFormat () const
 
double getFramesPerSecond () const
 Return the framerate. More...
 
AVRational getVideoTimeBase () const
 This will return the time_base from the video stream. More...
 
AVFormatContext * getVideoReaderContext ()
 Give access to the context to set up writers. More...
 
double getSampleRate () const
 
double getDuration () const
 
int getNumChannels () const
 
AVCodecContext * getVideoContext () const
 
AVCodecContext * getAudioContext () const
 
AVCodecContext * getSubtitleContext () const
 

Detailed Description

class for FFmpegReader to decode audio and images asynchronously This is to keep the audio thread as fast as possible

Constructor & Destructor Documentation

FFmpegVideoReader::DecoderThread::DecoderThread ( AudioBufferFIFO< float > &  fifo,
const int  videoFifoSize 
)
FFmpegVideoReader::DecoderThread::~DecoderThread ( )
virtual

Member Function Documentation

void FFmpegVideoReader::DecoderThread::addVideoListener ( FFmpegVideoListener listener)
void FFmpegVideoReader::DecoderThread::closeMovieFile ( )
AVCodecContext * FFmpegVideoReader::DecoderThread::getAudioContext ( ) const
double FFmpegVideoReader::DecoderThread::getCurrentPTS ( ) const

returns the presentation timestamp the video is synchronised to

double FFmpegVideoReader::DecoderThread::getDuration ( ) const
double FFmpegVideoReader::DecoderThread::getFramesPerSecond ( ) const

Return the framerate.

If framerate in the decoder context is not set, this will return the timebase of the video stream.

int FFmpegVideoReader::DecoderThread::getNumChannels ( ) const
double FFmpegVideoReader::DecoderThread::getPixelAspect ( ) const

This will return the aspect ratio of each pixel.

enum AVPixelFormat FFmpegVideoReader::DecoderThread::getPixelFormat ( ) const

get the pixel format of the video images according to decoder, will be converted to BGR0 to be displayed as juce::Image

enum AVSampleFormat FFmpegVideoReader::DecoderThread::getSampleFormat ( ) const
double FFmpegVideoReader::DecoderThread::getSampleRate ( ) const
AVCodecContext * FFmpegVideoReader::DecoderThread::getSubtitleContext ( ) const
AVCodecContext * FFmpegVideoReader::DecoderThread::getVideoContext ( ) const
int FFmpegVideoReader::DecoderThread::getVideoHeight ( ) const

get the height of the video images according to decoder

AVFormatContext* FFmpegVideoReader::DecoderThread::getVideoReaderContext ( )

Give access to the context to set up writers.

AVRational FFmpegVideoReader::DecoderThread::getVideoTimeBase ( ) const

This will return the time_base from the video stream.

int FFmpegVideoReader::DecoderThread::getVideoWidth ( ) const

get the width of the video images according to decoder

bool FFmpegVideoReader::DecoderThread::loadMovieFile ( const juce::File &  inputFile)
void FFmpegVideoReader::DecoderThread::removeVideoListener ( FFmpegVideoListener listener)
void FFmpegVideoReader::DecoderThread::run ( )
override

working loop

void FFmpegVideoReader::DecoderThread::setCurrentPTS ( const double  pts,
bool  seek = false 
)

set the currently played PTS according to the audio stream


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