FfmpegDecoder Struct Reference

Low-level class for using ffmpeg to decode movie files. More...

#include <Media/FfmpegDecoder.H>

Inheritance diagram for FfmpegDecoder:
Inheritance graph
[legend]
Collaboration diagram for FfmpegDecoder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FfmpegDecoder (const char *codecname, const int bufflen, const char *fname, const bool preload)
 Construct an ffmpeg stream from a filename, codec name, etc.
virtual ~FfmpegDecoder ()
 Destructor.
virtual int apparentFrameNumber () const
 Get the "apparent" frame number.
virtual GenericFrameSpec peekFrameSpec ()
 Get the specifications of the movie frames.
virtual VideoFrame readVideoFrame ()
 Get the next raw VideoFrame from the stream.
virtual Image< PixRGB< byte > > readRGB ()
 Read an RGB image from the stream.
virtual bool readAndDiscardFrame ()
 Read a frame from the stream and discard it.
 FfmpegDecoder (const char *, int, const char *, bool)
lobot::ImageType readRGB () const
GenericFrameSpec peekFrameSpec () const

Detailed Description

Low-level class for using ffmpeg to decode movie files.

Definition at line 60 of file FfmpegDecoder.H.


Constructor & Destructor Documentation

FfmpegDecoder::FfmpegDecoder ( const char *  codecname,
const int  bufflen,
const char *  fname,
const bool  preload 
)

Construct an ffmpeg stream from a filename, codec name, etc.

Definition at line 161 of file FfmpegDecoder.C.

References ASSERT.

FfmpegDecoder::~FfmpegDecoder (  )  [virtual]

Destructor.

Definition at line 288 of file FfmpegDecoder.C.


Member Function Documentation

int FfmpegDecoder::apparentFrameNumber (  )  const [virtual]

Get the "apparent" frame number.

This function takes into account whether or not the next frame will be a push-back frame

Implements MovieDecoder.

Definition at line 297 of file FfmpegDecoder.C.

GenericFrameSpec FfmpegDecoder::peekFrameSpec (  )  [virtual]

Get the specifications of the movie frames.

Implements MovieDecoder.

Definition at line 308 of file FfmpegDecoder.C.

References ASSERT, and convertAVPixelFormatToVideoFormat().

Referenced by lobot::VideoStream::frameRate(), lobot::VideoStream::frameSize(), readRGB(), and readVideoFrame().

bool FfmpegDecoder::readAndDiscardFrame (  )  [virtual]

Read a frame from the stream and discard it.

If you know you are going to discard the frame (e.g. to skip ahead to a certain frame number, or to count the frame), then it is more efficient to call readAndDiscardFrame() than to call readVideoFrame() or readRGB() but ignore the result.

Implements MovieDecoder.

Definition at line 369 of file FfmpegDecoder.C.

Image< PixRGB< byte > > FfmpegDecoder::readRGB (  )  [virtual]

Read an RGB image from the stream.

Implements MovieDecoder.

Definition at line 356 of file FfmpegDecoder.C.

References convertAVFrameToRGB(), and peekFrameSpec().

Referenced by lobot::VideoStream::update().

VideoFrame FfmpegDecoder::readVideoFrame (  )  [virtual]

Get the next raw VideoFrame from the stream.

Implements MovieDecoder.

Definition at line 343 of file FfmpegDecoder.C.

References convertAVFrameToVideoFrame(), and peekFrameSpec().


The documentation for this struct was generated from the following files:
Generated on Sun May 8 08:43:20 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3