FfmpegPacketDecoder Class Reference

Decode a movie using ffmpeg's libavformat packet streaming API. More...

#include <Media/FfmpegPacketDecoder.H>

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

List of all members.

Public Member Functions

 FfmpegPacketDecoder (const char *fname, const bool preload)
 Construct from a given filename.
 ~FfmpegPacketDecoder ()
 Virtual destructor for safe inheritance.
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.

Detailed Description

Decode a movie using ffmpeg's libavformat packet streaming API.

Definition at line 65 of file FfmpegPacketDecoder.H.


Constructor & Destructor Documentation

FfmpegPacketDecoder::FfmpegPacketDecoder ( const char *  fname,
const bool  preload 
)

Construct from a given filename.

Definition at line 128 of file FfmpegPacketDecoder.C.

References ASSERT.

FfmpegPacketDecoder::~FfmpegPacketDecoder (  ) 

Virtual destructor for safe inheritance.

Definition at line 291 of file FfmpegPacketDecoder.C.


Member Function Documentation

int FfmpegPacketDecoder::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 314 of file FfmpegPacketDecoder.C.

GenericFrameSpec FfmpegPacketDecoder::peekFrameSpec (  )  [virtual]

Get the specifications of the movie frames.

Implements MovieDecoder.

Definition at line 323 of file FfmpegPacketDecoder.C.

References ASSERT, and convertAVPixelFormatToVideoFormat().

Referenced by readRGB(), and readVideoFrame().

bool FfmpegPacketDecoder::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 395 of file FfmpegPacketDecoder.C.

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

Read an RGB image from the stream.

Implements MovieDecoder.

Definition at line 382 of file FfmpegPacketDecoder.C.

References convertAVFrameToRGB(), and peekFrameSpec().

VideoFrame FfmpegPacketDecoder::readVideoFrame (  )  [virtual]

Get the next raw VideoFrame from the stream.

Implements MovieDecoder.

Definition at line 369 of file FfmpegPacketDecoder.C.

References convertAVFrameToVideoFrame(), and peekFrameSpec().


The documentation for this class 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