Cinder  0.9.1
Public Member Functions | Friends | List of all members
cinder::qtime::MovieWriter::Format Class Reference

#include <MovieWriter.h>

Public Member Functions

 Format ()
 
Codec getCodec () const
 
Formatcodec (Codec codec)
 
FileType getFileType () const
 
FormatfileType (FileType fileType)
 
float getJpegQuality () const
 
FormatjpegQuality (float quality)
 
float getDefaultFrameDuration () const
 
FormatdefaultFrameDuration (float defaultDuration)
 
long getTimeScale () const
 
FormatsetTimeScale (long timeScale)
 
float getAverageBitsPerSecond () const
 
FormataverageBitsPerSecond (float avgBitsPerSecond)
 
void unspecifyAverageBitsPerSecond ()
 
bool isAverageBitsPerSecondSpecified () const
 
 Format ()
 
 Format (uint32_t codec, float quality)
 
 Format (const ICMCompressionSessionOptionsRef settings, uint32_t codec, float quality, float frameRate, bool enableMultiPass)
 
 Format (const Format &format)
 
 ~Format ()
 
const Formatoperator= (const Format &format)
 
uint32_t getCodec () const
 
FormatsetCodec (uint32_t codec)
 
float getQuality () const
 
FormatsetQuality (float quality)
 
float getDefaultDuration () const
 
FormatsetDefaultDuration (float defaultDuration)
 
long getTimeScale () const
 
FormatsetTimeScale (long timeScale)
 
float getGamma () const
 
FormatsetGamma (float gamma)
 
bool isTemporal () const
 
FormatenableTemporal (bool enable=true)
 
bool isReordering () const
 
FormatenableReordering (bool enable=true)
 
int32_t getMaxKeyFrameRate () const
 
FormatsetMaxKeyFrameRate (int32_t rate)
 
bool isFrameTimeChanges () const
 
FormatenableFrameTimeChanges (bool enable=true)
 
bool isMultiPass () const
 
FormatenableMultiPass (bool enable=true)
 

Friends

class MovieWriter
 
struct Obj
 

Detailed Description

Defines the encoding parameters of a MovieWriter.

Constructor & Destructor Documentation

cinder::qtime::MovieWriter::Format::Format ( )
cinder::qtime::MovieWriter::Format::Format ( )
cinder::qtime::MovieWriter::Format::Format ( uint32_t  codec,
float  quality 
)
cinder::qtime::MovieWriter::Format::Format ( const ICMCompressionSessionOptionsRef  settings,
uint32_t  codec,
float  quality,
float  frameRate,
bool  enableMultiPass 
)
cinder::qtime::MovieWriter::Format::Format ( const Format format)
cinder::qtime::MovieWriter::Format::~Format ( )

Member Function Documentation

Codec cinder::qtime::MovieWriter::Format::getCodec ( ) const

Returns the codec of type MovieWriter::Codec. Default is Codec::H264.

Format& cinder::qtime::MovieWriter::Format::codec ( Codec  codec)

Sets the encoding codec. Default is Codec::H264.

FileType cinder::qtime::MovieWriter::Format::getFileType ( ) const

Returns the output file type. Default is FileType::QUICK_TIME_MOVIE.

Format& cinder::qtime::MovieWriter::Format::fileType ( FileType  fileType)

Sets the output file type, defined in MovieWriter::FileType. Default is FileType::QUICK_TIME_MOVIE.

float cinder::qtime::MovieWriter::Format::getJpegQuality ( ) const

Returns the overall quality for encoding in the range of [0,1.0] for the JPEG codec. Defaults to 0.99. 1.0 corresponds to lossless.

MovieWriter::Format & cinder::qtime::MovieWriter::Format::jpegQuality ( float  quality)

Sets the overall quality for encoding when using the JPEG codec. Must be in a range of [0,1.0]. Defaults to 0.99. 1.0 corresponds to lossless.

float cinder::qtime::MovieWriter::Format::getDefaultFrameDuration ( ) const

Returns the standard duration of a frame, measured in seconds. Defaults to 1/30 sec, meaning 30 FPS.

Format& cinder::qtime::MovieWriter::Format::defaultFrameDuration ( float  defaultDuration)

Sets the default duration of a frame, measured in seconds. Defaults to 1/30 sec, meaning 30 FPS.

long cinder::qtime::MovieWriter::Format::getTimeScale ( ) const

Returns the integer base value for the encoding time scale. Defaults to 600.

Format& cinder::qtime::MovieWriter::Format::setTimeScale ( long  timeScale)

Sets the integer base value for encoding time scale. Defaults to 600.

float cinder::qtime::MovieWriter::Format::getAverageBitsPerSecond ( ) const

Returns the average bits per second for H.264 encoding. Defaults to no limit.

Format& cinder::qtime::MovieWriter::Format::averageBitsPerSecond ( float  avgBitsPerSecond)

Sets the average bits per second for H.264 encoding. Defaults to no limit.

void cinder::qtime::MovieWriter::Format::unspecifyAverageBitsPerSecond ( )

Resets the average bits per second to no limit.

bool cinder::qtime::MovieWriter::Format::isAverageBitsPerSecondSpecified ( ) const

Returns whether the average bits per second for H.264 have been specified. If false, no limit is imposed.

const MovieWriter::Format & cinder::qtime::MovieWriter::Format::operator= ( const Format format)
uint32_t cinder::qtime::MovieWriter::Format::getCodec ( ) const

Returns the four character code for the QuickTime codec. Types can be found in QuickTime's ImageCompression.h.

Format& cinder::qtime::MovieWriter::Format::setCodec ( uint32_t  codec)

Sets the four character code for the QuickTime codec. Defaults to PNG ('png '). Additional types can be found in QuickTime's ImageCompression.h.

float cinder::qtime::MovieWriter::Format::getQuality ( ) const

Returns the overall quality for encoding in the range of [0,1.0]. Defaults to 0.99. 1.0 corresponds to lossless.

MovieWriter::Format & cinder::qtime::MovieWriter::Format::setQuality ( float  quality)

Sets the overall quality for encoding. Must be in a range of [0,1.0]. Defaults to 0.99. 1.0 corresponds to lossless.

float cinder::qtime::MovieWriter::Format::getDefaultDuration ( ) const

Returns the standard duration of a frame measured in seconds.

Format& cinder::qtime::MovieWriter::Format::setDefaultDuration ( float  defaultDuration)

Sets the default duration of a frame, measured in seconds. Defaults to 1/30 sec, meaning 30 FPS.

long cinder::qtime::MovieWriter::Format::getTimeScale ( ) const

Returns the integer base value for the encoding time scale. Defaults to 600.

Format& cinder::qtime::MovieWriter::Format::setTimeScale ( long  timeScale)

Sets the integer base value for encoding time scale. Defaults to 600.

float cinder::qtime::MovieWriter::Format::getGamma ( ) const

Returns the gamma value by which image data is encoded.

Format& cinder::qtime::MovieWriter::Format::setGamma ( float  gamma)

Sets the gamma value by which image data is encoded. Defaults to 2.5 on MSW and 2.2 on Mac OS X.

bool cinder::qtime::MovieWriter::Format::isTemporal ( ) const

Returns if temporal compression (allowing P or B frames) is enabled. Defaults to true.

MovieWriter::Format & cinder::qtime::MovieWriter::Format::enableTemporal ( bool  enable = true)

Enables temporal compression (allowing P or B frames). Defaults to true.

bool cinder::qtime::MovieWriter::Format::isReordering ( ) const

Returns if frame reordering is enabled. Defaults to true. In order to encode B frames, a compressor must reorder frames, which means that the order in which they will be emitted and stored (the decode order) is different from the order in which they were presented to the compressor (the display order).

MovieWriter::Format & cinder::qtime::MovieWriter::Format::enableReordering ( bool  enable = true)

Enables frame reordering. Defaults to true. In order to encode B frames, a compressor must reorder frames, which means that the order in which they will be emitted and stored (the decode order) is different from the order in which they were presented to the compressor (the display order).

int32_t cinder::qtime::MovieWriter::Format::getMaxKeyFrameRate ( ) const

Gets the maximum number of frames between key frames. Default is 0, which indicates that the compressor should choose where to place all key frames. Compressors are allowed to generate key frames more frequently if this would result in more efficient compression.

MovieWriter::Format & cinder::qtime::MovieWriter::Format::setMaxKeyFrameRate ( int32_t  rate)

Sets the maximum number of frames between key frames. Default is 0, which indicates that the compressor should choose where to place all key frames. Compressors are allowed to generate key frames more frequently if this would result in more efficient compression.

bool cinder::qtime::MovieWriter::Format::isFrameTimeChanges ( ) const

Returns whether a codec is allowed to change frame times. Defaults to true. Some compressors are able to identify and coalesce runs of identical frames and output single frames with longer duration, or output frames at a different frame rate from the original.

MovieWriter::Format & cinder::qtime::MovieWriter::Format::enableFrameTimeChanges ( bool  enable = true)

Sets whether a codec is allowed to change frame times. Defaults to true. Some compressors are able to identify and coalesce runs of identical frames and output single frames with longer duration, or output frames at a different frame rate from the original.

bool cinder::qtime::MovieWriter::Format::isMultiPass ( ) const

Returns whether multiPass encoding is enabled. Defaults to false.

Format& cinder::qtime::MovieWriter::Format::enableMultiPass ( bool  enable = true)

Enables multiPass encoding. Defaults to false. While multiPass encoding can result in significantly smaller movies, it often takes much longer to compress and requires the creation of two temporary files for storing intermediate results.

Friends And Related Function Documentation

MovieWriter
friend
friend struct Obj
friend

The documentation for this class was generated from the following files: