Video display and composing engine for JUCE
Loading...
Searching...
No Matches
MediaFoundationReader Class Reference

#include <foleys_MediaFoundation_Win.h>

+ Inheritance diagram for MediaFoundationReader:

Classes

struct  Pimpl
 

Public Member Functions

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

Static Public Attributes

static constexpr auto kMaxFramesToTryBeforeTcFound = 40
 

Additional Inherited Members

- Public Attributes inherited from AVReader
Size originalSize
 
int pixelFormat
 
double timebase = {}
 
double sampleRate = {}
 
int numChannels = 0
 
juce::int64 numSamples = 0
 
- Protected Attributes inherited from AVReader
bool opened = false
 

Constructor & Destructor Documentation

◆ MediaFoundationReader()

MediaFoundationReader ( const juce::File &  file,
foleys::StreamTypes  type 
)

Member Function Documentation

◆ getMediaFile()

juce::File getMediaFile ( ) const
overridevirtual

Implements AVReader.

◆ getTotalLength()

juce::int64 getTotalLength ( ) const
overridevirtual

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.

Implements AVReader.

◆ getLengthInSeconds()

double getLengthInSeconds ( ) const
overridevirtual

Returns the length of the clip in seconds.

Implements AVReader.

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

◆ setPosition()

void setPosition ( const int64_t  position)
overridevirtual

Seek the reader to a certain position.

This position is given in audio samples

Implements AVReader.

◆ getStillImage()

juce::Image getStillImage ( double  seconds,
Size  size 
)
overridevirtual

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.

Implements AVReader.

◆ readNewData()

void readNewData ( VideoFifo videoFifo,
AudioFifo audioFifo 
)
overridevirtual

Implements AVReader.

◆ hasVideo()

bool hasVideo ( ) const
overridevirtual

◆ hasAudio()

bool hasAudio ( ) const
overridevirtual

◆ hasSubtitle()

bool hasSubtitle ( ) const
overridevirtual

Implements AVReader.

◆ setOutputSampleRate()

void setOutputSampleRate ( double  sampleRate)
overridevirtual

Implements AVReader.

References AVReader::sampleRate.

◆ getNumVideoStreams()

int getNumVideoStreams ( ) const
overridevirtual

Implements AVReader.

Referenced by MediaFoundationReader::hasVideo().

◆ getVideoSettings()

VideoStreamSettings getVideoSettings ( int  streamIndex) const
overridevirtual

Implements AVReader.

◆ getNumAudioStreams()

int getNumAudioStreams ( ) const
overridevirtual

Implements AVReader.

Referenced by MediaFoundationReader::hasAudio().

◆ getAudioSettings()

AudioStreamSettings getAudioSettings ( int  streamIndex) const
overridevirtual

Implements AVReader.

Member Data Documentation

◆ kMaxFramesToTryBeforeTcFound

constexpr auto kMaxFramesToTryBeforeTcFound = 40
staticconstexpr

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