Outputs QuickTime movies. More...
#include <MovieWriter.h>
Classes | |
class | Format |
Defines the encoding parameters of a MovieWriter. More... | |
Public Types | |
enum | { CODEC_H264 = 'avc1', CODEC_JPEG = 'jpeg', CODEC_MP4 = 'mp4v', CODEC_PNG = 'png ', CODEC_RAW = 'raw ', CODEC_ANIMATION = 'rle ' } |
Public Member Functions | |
MovieWriter () | |
MovieWriter (const std::string &path, int32_t width, int32_t height, const Format &format=Format::Format()) | |
float | getDefaultDuration () const |
Returns the Movie's default frame duration measured in seconds. You can also think of this as the Movie's frameRate. | |
int32_t | getWidth () const |
Returns the width of the Movie in pixels. | |
int32_t | getHeight () const |
Returns the height of the Movie in pixels. | |
Vec2i | getSize () const |
Returns the size of the Movie in pixels. | |
float | getAspectRatio () const |
Returns the Movie's aspect ratio, which is its width / height. | |
Area | getBounds () const |
Returns the bounding Area of the Movie in pixels: [0,0]-(width,height). | |
const Format & | getFormat () const |
Returns the Movie's Format. | |
void | addFrame (const ImageSourceRef &imageSource, float duration=-1.0f) |
Appends a frame to the Movie. The optional duration parameter allows a frame to be inserted for a time other than the Format's default duration. | |
uint32_t | getNumFrames () const |
Returns the number of frames in the movie. | |
void | finish () |
Completes the encoding of the movie and closes the file. Calling finish() more than once has no effect. | |
Static Public Member Functions | |
static bool | getUserCompressionSettings (Format *result, ImageSourceRef previewImage=ImageSourceRef()) |
Presents the user with the standard compression options dialog. Optional previewImage provides a still image as a preview (currently ignored on Mac OS X). Returns false if user cancelled. | |
| |
typedef std::shared_ptr< Obj > MovieWriter::* | unspecified_bool_type |
Emulates shared_ptr-like behavior. | |
operator unspecified_bool_type () const | |
Emulates shared_ptr-like behavior. | |
void | reset () |
Emulates shared_ptr-like behavior. |
Outputs QuickTime movies.
The MovieWriter class is used to save QuickTime movies. It supports any built-in codec, as well as advanced features like frame reordering and multiPass encoding.
typedef std::shared_ptr<Obj> MovieWriter::* cinder::qtime::MovieWriter::unspecified_bool_type |
Emulates shared_ptr-like behavior.
cinder::qtime::MovieWriter::MovieWriter | ( | ) |
cinder::qtime::MovieWriter::MovieWriter | ( | const std::string & | path, | |
int32_t | width, | |||
int32_t | height, | |||
const Format & | format = Format::Format() | |||
) |
float cinder::qtime::MovieWriter::getDefaultDuration | ( | ) | const |
Returns the Movie's default frame duration measured in seconds. You can also think of this as the Movie's frameRate.
int32_t cinder::qtime::MovieWriter::getWidth | ( | ) | const |
Returns the width of the Movie in pixels.
int32_t cinder::qtime::MovieWriter::getHeight | ( | ) | const |
Returns the height of the Movie in pixels.
Vec2i cinder::qtime::MovieWriter::getSize | ( | ) | const |
Returns the size of the Movie in pixels.
float cinder::qtime::MovieWriter::getAspectRatio | ( | ) | const |
Returns the Movie's aspect ratio, which is its width / height.
Area cinder::qtime::MovieWriter::getBounds | ( | ) | const |
Returns the bounding Area of the Movie in pixels: [0,0]-(width,height).
bool cinder::qtime::MovieWriter::getUserCompressionSettings | ( | Format * | result, | |
ImageSourceRef | previewImage = ImageSourceRef() | |||
) | [static] |
Presents the user with the standard compression options dialog. Optional previewImage provides a still image as a preview (currently ignored on Mac OS X). Returns false
if user cancelled.
void cinder::qtime::MovieWriter::addFrame | ( | const ImageSourceRef & | imageSource, | |
float | duration = -1.0f | |||
) |
Appends a frame to the Movie. The optional duration parameter allows a frame to be inserted for a time other than the Format's default duration.
uint32_t cinder::qtime::MovieWriter::getNumFrames | ( | ) | const |
Returns the number of frames in the movie.
void cinder::qtime::MovieWriter::finish | ( | ) |
Completes the encoding of the movie and closes the file. Calling finish() more than once has no effect.
cinder::qtime::MovieWriter::operator unspecified_bool_type | ( | ) | const |
Emulates shared_ptr-like behavior.
void cinder::qtime::MovieWriter::reset | ( | ) |
Emulates shared_ptr-like behavior.