Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::media::VideoDecoder Class Referenceabstract

Abstract base class for embedded video decoders. More...

#include <VideoDecoder.h>

Inheritance diagram for gnash::media::VideoDecoder:
gnash::media::ffmpeg::VideoDecoderFfmpeg gnash::media::gst::VideoDecoderGst gnash::media::haiku::VideoDecoderHaiku

Public Member Functions

virtual ~VideoDecoder ()
 
virtual void push (const EncodedVideoFrame &buffer)=0
 Push an encoded video frame into the decoder. More...
 
virtual std::unique_ptr< image::GnashImagepop ()=0
 Pop a decoded frame from the decoder. THIS METHOD MAY BLOCK. More...
 
virtual bool peek ()=0
 Check whether a decoded frame is ready to be popped. More...
 
virtual int width () const =0
 Get the width in pixels of the Video. More...
 
virtual int height () const =0
 Get the height in pixels of the Video. More...
 

Detailed Description

Abstract base class for embedded video decoders.

This very simple design allows, but does not require, the use of threads in an implementation. A user of this class push a frame into the decoder and can subsequently pop a decoded frame. Since the pop() call may block, it is advisable to first call peek() to see if there is a frame ready to be popped.

Constructor & Destructor Documentation

§ ~VideoDecoder()

virtual gnash::media::VideoDecoder::~VideoDecoder ( )
inlinevirtual

References height, and width.

Member Function Documentation

§ height()

virtual int gnash::media::VideoDecoder::height ( ) const
pure virtual

Get the height in pixels of the Video.

Returns
The height of a video frame, or 0 until this is known. This is used ultimately for the AS Video.height property.

Implemented in gnash::media::gst::VideoDecoderGst, gnash::media::ffmpeg::VideoDecoderFfmpeg, and gnash::media::haiku::VideoDecoderHaiku.

§ peek()

virtual bool gnash::media::VideoDecoder::peek ( )
pure virtual

Check whether a decoded frame is ready to be popped.

This method will never block.

Returns
true if there is a frame ready to be popped.

Implemented in gnash::media::gst::VideoDecoderGst, gnash::media::ffmpeg::VideoDecoderFfmpeg, and gnash::media::haiku::VideoDecoderHaiku.

§ pop()

virtual std::unique_ptr<image::GnashImage> gnash::media::VideoDecoder::pop ( )
pure virtual

Pop a decoded frame from the decoder. THIS METHOD MAY BLOCK.

Returns
The decoded video frame, or a NULL-containing unique_ptr if an error occurred.

Implemented in gnash::media::gst::VideoDecoderGst, gnash::media::ffmpeg::VideoDecoderFfmpeg, and gnash::media::haiku::VideoDecoderHaiku.

§ push()

virtual void gnash::media::VideoDecoder::push ( const EncodedVideoFrame buffer)
pure virtual

Push an encoded video frame into the decoder.

Parameters
bufferthe video frame to decode

Implemented in gnash::media::gst::VideoDecoderGst, gnash::media::ffmpeg::VideoDecoderFfmpeg, and gnash::media::haiku::VideoDecoderHaiku.

Referenced by gnash::Video::display().

§ width()

virtual int gnash::media::VideoDecoder::width ( ) const
pure virtual

Get the width in pixels of the Video.

Returns
The width of a video frame, or 0 until this is known. This is used ultimately for the AS Video.width property.

Implemented in gnash::media::gst::VideoDecoderGst, gnash::media::ffmpeg::VideoDecoderFfmpeg, and gnash::media::haiku::VideoDecoderHaiku.


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