Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::media::ffmpeg::MediaHandlerFfmpeg Class Reference

FFMPEG based MediaHandler. More...

#include <MediaHandlerFfmpeg.h>

Inheritance diagram for gnash::media::ffmpeg::MediaHandlerFfmpeg:
gnash::media::MediaHandler

Public Member Functions

std::string description () const
 Return a description of this media handler. More...
 
virtual std::unique_ptr< MediaParsercreateMediaParser (std::unique_ptr< IOChannel > stream)
 Return an appropriate MediaParser for given input. More...
 
virtual std::unique_ptr< VideoDecodercreateVideoDecoder (const VideoInfo &info)
 Create a VideoDecoder for decoding what's specified in the VideoInfo. More...
 
virtual std::unique_ptr< VideoConvertercreateVideoConverter (ImgBuf::Type4CC srcFormat, ImgBuf::Type4CC dstFormat)
 Create an VideoConverter for converting between color spaces. More...
 
virtual std::unique_ptr< AudioDecodercreateAudioDecoder (const AudioInfo &info)
 Create an AudioDecoder for decoding what's specified in the AudioInfo. More...
 
virtual size_t getInputPaddingSize () const
 Return the number of bytes padding needed for input buffers. More...
 
virtual VideoInputgetVideoInput (size_t index)
 Return a VideoInput. More...
 
virtual AudioInputgetAudioInput (size_t index)
 
virtual void cameraNames (std::vector< std::string > &names) const
 Return a list of available cameras. More...
 
- Public Member Functions inherited from gnash::media::MediaHandler
virtual ~MediaHandler ()
 

Additional Inherited Members

- Protected Member Functions inherited from gnash::media::MediaHandler
 MediaHandler ()
 Base constructor. More...
 
std::unique_ptr< AudioDecodercreateFlashAudioDecoder (const AudioInfo &info)
 Create an AudioDecoder for CODEC_TYPE_FLASH codecs. More...
 
bool isFLV (IOChannel &stream)
 Return true if input stream is an FLV. More...
 

Detailed Description

FFMPEG based MediaHandler.

Member Function Documentation

§ cameraNames()

void gnash::media::ffmpeg::MediaHandlerFfmpeg::cameraNames ( std::vector< std::string > &  names) const
virtual

Return a list of available cameras.

This is re-generated every time the function is called.

Implements gnash::media::MediaHandler.

References gnash::log_unimpl().

§ createAudioDecoder()

std::unique_ptr< AudioDecoder > gnash::media::ffmpeg::MediaHandlerFfmpeg::createAudioDecoder ( const AudioInfo info)
virtual

Create an AudioDecoder for decoding what's specified in the AudioInfo.

Parameters
infoAudioInfo class with all the info needed to decode the sound correctly.
Returns
Will always return a valid AudioDecoder or throw a gnash::MediaException if a fatal error occurs.

Implements gnash::media::MediaHandler.

References _, gnash::media::CODEC_TYPE_FLASH, gnash::media::MediaHandler::createFlashAudioDecoder(), and gnash::media::AudioInfo::type.

§ createMediaParser()

std::unique_ptr< MediaParser > gnash::media::ffmpeg::MediaHandlerFfmpeg::createMediaParser ( std::unique_ptr< IOChannel stream)
virtual

Return an appropriate MediaParser for given input.

Parameters
streamInput stream, ownership transferred
Returns
0 if no parser could be created for the input

NOTE: the default implementation returns an FLVParser for FLV input or 0 for others.

Reimplemented from gnash::media::MediaHandler.

References gnash::media::MediaHandler::isFLV(), and gnash::log_error().

§ createVideoConverter()

std::unique_ptr< VideoConverter > gnash::media::ffmpeg::MediaHandlerFfmpeg::createVideoConverter ( ImgBuf::Type4CC  srcFormat,
ImgBuf::Type4CC  dstFormat 
)
virtual

Create an VideoConverter for converting between color spaces.

Parameters
srcFormatThe source image color space
dstFormatThe destination image color space
Returns
A valid VideoConverter or a NULL unique_ptr if a fatal error occurs.

Implements gnash::media::MediaHandler.

References gnash::log_error().

§ createVideoDecoder()

std::unique_ptr< VideoDecoder > gnash::media::ffmpeg::MediaHandlerFfmpeg::createVideoDecoder ( const VideoInfo info)
virtual

Create a VideoDecoder for decoding what's specified in the VideoInfo.

Parameters
infoVideoInfo class with all the info needed to decode the image stream correctly.
Returns
Will always return a valid VideoDecoder or throw a gnash::MediaException if a fatal error occurs.

Implements gnash::media::MediaHandler.

§ description()

std::string gnash::media::ffmpeg::MediaHandlerFfmpeg::description ( ) const
virtual

Return a description of this media handler.

Implements gnash::media::MediaHandler.

§ getAudioInput()

AudioInput * gnash::media::ffmpeg::MediaHandlerFfmpeg::getAudioInput ( size_t  index)
virtual

§ getInputPaddingSize()

size_t gnash::media::ffmpeg::MediaHandlerFfmpeg::getInputPaddingSize ( ) const
virtual

Return the number of bytes padding needed for input buffers.

Bitstream readers are optimized to read several bytes at a time, and this should be used to allocate a large enough input buffer.

Reimplemented from gnash::media::MediaHandler.

§ getVideoInput()

VideoInput * gnash::media::ffmpeg::MediaHandlerFfmpeg::getVideoInput ( size_t  index)
virtual

Return a VideoInput.

This is always owned by the MediaHandler, but will remain alive as long as it is referenced by a Camera object.

Parameters
indexThe index of the VideoInput to return.
Returns
A Video Input corresponding to the specified index or null if it is not available.

Implements gnash::media::MediaHandler.


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