UcbMpegEncoder Class Reference

Thin c++ wrapper around mpeg_encode/ppmtompeg. More...

#include <Media/UcbMpegEncoder.H>

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

List of all members.

Public Member Functions

 UcbMpegEncoder (const std::string &exename, const std::string &outname, const UcbMpegParams &params, const double framerate=29.97)
 Construct an encoder.
virtual int close ()
 Close any underlying streams; return 0 if OK, non-zero if error.
void writeVideoFrame (const VideoFrame &f)
virtual void writeFrame (const GenericFrame &f)
 Write a frame to the low-level stream.

Detailed Description

Thin c++ wrapper around mpeg_encode/ppmtompeg.

The implementation opens a pipe to an mpeg_encode or ppmtompeg subprocess, using the "INPUT_DIR stdin" configuration option, and sends frames over the pipe to be encoded into the resulting mpeg file.

Ucb stands for "University of California-Berkeley", where mpeg_encode was originally written.

Definition at line 84 of file UcbMpegEncoder.H.


Constructor & Destructor Documentation

UcbMpegEncoder::UcbMpegEncoder ( const std::string exename,
const std::string outname,
const UcbMpegParams params,
const double  framerate = 29.97 
)

Construct an encoder.

Parameters:
exename full path to the mpeg_encode or ppmtompeg executable

Definition at line 115 of file UcbMpegEncoder.C.


Member Function Documentation

int UcbMpegEncoder::close (  )  [virtual]

Close any underlying streams; return 0 if OK, non-zero if error.

Implements LowLevelEncoder.

Definition at line 139 of file UcbMpegEncoder.C.

References rutz::bidir_pipe::close_out(), and rutz::bidir_pipe::exit_status().

void UcbMpegEncoder::writeFrame ( const GenericFrame f  )  [virtual]

Write a frame to the low-level stream.

Implements LowLevelEncoder.

Definition at line 304 of file UcbMpegEncoder.C.

References GenericFrame::asVideo().


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