Video display and composing engine for JUCE
Loading...
Searching...
No Matches
AVReader Class Referenceabstract

The AVReader allows reading of AVClip classes. More...

#include <foleys_AVReader.h>

+ Inheritance diagram for AVReader:

Public Member Functions

 AVReader ()=default
 
virtual ~AVReader ()=default
 
virtual juce::File getMediaFile () const =0
 
bool isOpenedOk () const
 
virtual double getLengthInSeconds () const =0
 Returns the length of the clip in seconds.
 
virtual juce::int64 getTotalLength () const =0
 Returns the length in samples.
 
virtual void setPosition (const int64_t position)=0
 Seek the reader to a certain position.
 
virtual juce::Image getStillImage (double seconds, Size size)=0
 This method allows direct access to a specific time to render thumbnails.
 
virtual void readNewData (VideoFifo &, AudioFifo &)=0
 
virtual bool hasVideo () const =0
 
virtual bool hasAudio () const =0
 
virtual bool hasSubtitle () const =0
 
virtual void setOutputSampleRate (double sampleRate)=0
 
virtual int getNumVideoStreams () const =0
 
virtual VideoStreamSettings getVideoSettings (int streamIndex) const =0
 
virtual int getNumAudioStreams () const =0
 
virtual AudioStreamSettings getAudioSettings (int streamIndex) const =0
 

Public Attributes

Size originalSize
 
int pixelFormat
 
double timebase = {}
 
double sampleRate = {}
 
int numChannels = 0
 
juce::int64 numSamples = 0
 

Protected Attributes

bool opened = false
 

Detailed Description

The AVReader allows reading of AVClip classes.

This class is pure virtual to allow different implementations for various backends.

Constructor & Destructor Documentation

◆ AVReader()

AVReader ( )
default

◆ ~AVReader()

virtual ~AVReader ( )
virtualdefault

Member Function Documentation

◆ getMediaFile()

virtual juce::File getMediaFile ( ) const
pure virtual

Implemented in MediaFoundationReader.

◆ isOpenedOk()

bool isOpenedOk ( ) const

References AVReader::opened.

◆ getLengthInSeconds()

virtual double getLengthInSeconds ( ) const
pure virtual

Returns the length of the clip in seconds.

Implemented in MediaFoundationReader.

◆ getTotalLength()

virtual juce::int64 getTotalLength ( ) const
pure virtual

Returns the length in samples.

Note before prepareToPlay this returns the number of samples in the audio stream. Since the Reader will resample to suit the output, this number can change.

Implemented in MediaFoundationReader.

◆ setPosition()

virtual void setPosition ( const int64_t  position)
pure virtual

Seek the reader to a certain position.

This position is given in audio samples

Implemented in MediaFoundationReader.

◆ getStillImage()

virtual juce::Image getStillImage ( double  seconds,
Size  size 
)
pure virtual

This method allows direct access to a specific time to render thumbnails.

Don't use this to stream the video. Ideally use a separate reader for the thumbnails.

Implemented in MediaFoundationReader.

◆ readNewData()

virtual void readNewData ( VideoFifo ,
AudioFifo  
)
pure virtual

Implemented in MediaFoundationReader.

◆ hasVideo()

virtual bool hasVideo ( ) const
pure virtual

Implemented in MediaFoundationReader.

◆ hasAudio()

virtual bool hasAudio ( ) const
pure virtual

Implemented in MediaFoundationReader.

◆ hasSubtitle()

virtual bool hasSubtitle ( ) const
pure virtual

Implemented in MediaFoundationReader.

◆ setOutputSampleRate()

virtual void setOutputSampleRate ( double  sampleRate)
pure virtual

Implemented in MediaFoundationReader.

◆ getNumVideoStreams()

virtual int getNumVideoStreams ( ) const
pure virtual

Implemented in MediaFoundationReader.

◆ getVideoSettings()

virtual VideoStreamSettings getVideoSettings ( int  streamIndex) const
pure virtual

Implemented in MediaFoundationReader.

◆ getNumAudioStreams()

virtual int getNumAudioStreams ( ) const
pure virtual

Implemented in MediaFoundationReader.

◆ getAudioSettings()

virtual AudioStreamSettings getAudioSettings ( int  streamIndex) const
pure virtual

Implemented in MediaFoundationReader.

Member Data Documentation

◆ originalSize

Size originalSize

◆ pixelFormat

int pixelFormat

◆ timebase

double timebase = {}

◆ sampleRate

double sampleRate = {}

◆ numChannels

int numChannels = 0

◆ numSamples

juce::int64 numSamples = 0

◆ opened

bool opened = false
protected

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