
Thin c++ wrapper around mpeg_encode/ppmtompeg. More...
#include <Media/UcbMpegEncoder.H>


Public Member Functions | |
| UcbMpegEncoder (const std::string &exename, const std::string &outname, const UcbMpegParams ¶ms, 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. | |
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.
| UcbMpegEncoder::UcbMpegEncoder | ( | const std::string & | exename, | |
| const std::string & | outname, | |||
| const UcbMpegParams & | params, | |||
| const double | framerate = 29.97 | |||
| ) |
Construct an encoder.
| exename | full path to the mpeg_encode or ppmtompeg executable |
Definition at line 115 of file UcbMpegEncoder.C.
| 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().
1.6.3