Public Member Functions

gnash::media::VideoDecoder Class Reference

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

#include <VideoDecoder.h>

Inheritance diagram for gnash::media::VideoDecoder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

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

virtual gnash::media::VideoDecoder::~VideoDecoder (  )  [inline, virtual]

Member Function Documentation

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::ffmpeg::VideoDecoderFfmpeg, gnash::media::gst::VideoDecoderGst, and gnash::media::haiku::VideoDecoderHaiku.

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::ffmpeg::VideoDecoderFfmpeg, gnash::media::gst::VideoDecoderGst, and gnash::media::haiku::VideoDecoderHaiku.

virtual std::auto_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 auto_ptr if an error occurred.

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

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

Push an encoded video frame into the decoder.

Parameters:
buffer the video frame to decode

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

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::ffmpeg::VideoDecoderFfmpeg, gnash::media::gst::VideoDecoderGst, and gnash::media::haiku::VideoDecoderHaiku.


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