Gnash  0.8.10
Public Member Functions
gnash::media::gst::MediaParserGst Class Reference

Gstreamer based MediaParser. More...

#include <MediaParserGst.h>

Inheritance diagram for gnash::media::gst::MediaParserGst:
gnash::media::MediaParser

List of all members.

Public Member Functions

 MediaParserGst (std::auto_ptr< IOChannel > stream)
 Construct a Gstreamer-based media parser for given stream.
 ~MediaParserGst ()
bool seek (boost::uint32_t &)
 Seeks to the closest possible position the given position, and returns the new position.
bool parseNextChunk ()
 Parse next chunk of input.
virtual boost::uint64_t getBytesLoaded () const
 Return number of bytes parsed so far.
virtual boost::optional< Id3InfogetId3Info () const
 Get ID3 data from the parsed stream if it exists.
void rememberAudioFrame (EncodedAudioFrame *frame)
void rememberVideoFrame (EncodedVideoFrame *frame)

Detailed Description

Gstreamer based MediaParser.


Constructor & Destructor Documentation

gnash::media::gst::MediaParserGst::MediaParserGst ( std::auto_ptr< IOChannel stream)

Construct a Gstreamer-based media parser for given stream.

Can throw a MediaException if input format couldn't be detected

References _, swfdec_gst_connect_srcpad(), gnash::media::MediaParser::_stream, gnash::media::MediaParser::_videoInfo, gnash::media::MediaParser::_audioInfo, and gnash::media::MediaParser::startParserThread().

gnash::media::gst::MediaParserGst::~MediaParserGst ( )

Member Function Documentation

boost::uint64_t gnash::media::gst::MediaParserGst::getBytesLoaded ( ) const [virtual]

Return number of bytes parsed so far.

Reimplemented from gnash::media::MediaParser.

References gnash::media::MediaParser::_bytesLoadedMutex, and gnash::media::MediaParser::_bytesLoaded.

boost::optional< Id3Info > gnash::media::gst::MediaParserGst::getId3Info ( ) const [virtual]

Get ID3 data from the parsed stream if it exists.

It's best to do this only when parsingComplete is true.

Reimplemented from gnash::media::MediaParser.

bool gnash::media::gst::MediaParserGst::parseNextChunk ( ) [virtual]

Parse next chunk of input.

The implementations are required to parse a small chunk of input, so to avoid blocking too much if parsing conditions change (ie: seek or destruction requested)

When LOAD_MEDIA_IN_A_SEPARATE_THREAD is defined, this should never be called by users (consider protected).

Implements gnash::media::MediaParser.

References gnash::media::MediaParser::_streamMutex, gnash::media::MediaParser::_stream, gnash::media::MediaParser::_parsingComplete, gnash::media::MediaParser::_bytesLoadedMutex, and gnash::media::MediaParser::_bytesLoaded.

void gnash::media::gst::MediaParserGst::rememberAudioFrame ( EncodedAudioFrame frame)
void gnash::media::gst::MediaParserGst::rememberVideoFrame ( EncodedVideoFrame frame)
bool gnash::media::gst::MediaParserGst::seek ( boost::uint32_t &  time) [virtual]

Seeks to the closest possible position the given position, and returns the new position.

Parameters:
timeinput/output parameter, input requests a time, output return the actual time seeked to.
Returns:
true if the seek was valid, false otherwise.

Implements gnash::media::MediaParser.


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