cinder::qtime::MovieBase Class Reference

#include <QuickTime.h>

Inherited by cinder::qtime::MovieGl, and cinder::qtime::MovieSurface.

List of all members.

Classes

struct  Obj

Public Member Functions

virtual ~MovieBase ()
bool checkPlayable ()
 Returns whether the movie has loaded and buffered enough to playback without interruption.
int32_t getWidth () const
 Returns the width of the movie in pixels.
int32_t getHeight () const
 Returns the height of the movie in pixels.
float getAspectRatio () const
 Returns the movie's aspect ratio, the ratio of its width to its height.
float getDuration () const
 Returns the movie's length measured in seconds.
float getFramerate () const
 Returns the movie's framerate measured as frames per second.
int32_t getNumFrames () const
 Returns the total number of frames (video samples) in the movie.
bool hasAlpha () const
 Returns whether the first video track in the movie contains an alpha channel. Returns false in the absence of visual media.
bool hasVisuals () const
 Returns whether a movie contains at least one visual track, defined as Video, MPEG, Sprite, QuickDraw3D, Text, or TimeCode tracks.
bool hasAudio () const
 Returns whether a movie contains at least one audio track, defined as Sound, Music, or MPEG tracks.
float getCurrentTime () const
 Returns the current time of a movie in seconds.
void seekToTime (float seconds)
 Sets the movie to the time seconds.
void seekToFrame (int frame)
 Sets the movie time to the start time of frame frame.
void seekToStart ()
 Sets the movie time to its beginning.
void seekToEnd ()
 Sets the movie time to its end.
void setActiveSegment (float startTime, float duration)
 Limits the active portion of a movie to a subset beginning at startTime seconds and lasting for duration seconds. QuickTime will not process the movie outside the active segment.
void resetActiveSegment ()
 Resets the active segment to be the entire movie.
void setLoop (bool loop=true, bool palindrome=false)
 Sets whether the movie is set to loop during playback. If palindrome is true, the movie will "ping-pong" back and forth.
void stepForward ()
 Advances the movie by one frame (a single video sample). Ignores looping settings.
void stepBackward ()
 Steps backward by one frame (a single video sample). Ignores looping settings.
void setRate (float rate)
 Sets the playback rate, which begins playback immediately for nonzero values. 1.0 represents normal speed. Negative values indicate reverse playback and 0 stops.
void setVolume (float volume)
 Sets the audio playback volume ranging from [0 - 1.0].
float getVolume () const
 Gets the audio playback volume ranging from [0 - 1.0].
void setupMonoFft (uint32_t numBands)
 Sets up Fourier analysis on the movie using numBands distinct bands in a single (mono) channel. This data is only available during playback.
void setupStereoFft (uint32_t numBands)
 Sets up Fourier analysis on the movie using numBands distinct bands in a two (stereo) channels. This data is only available during playback.
void setupMultiChannelFft (uint32_t numBands)
 Sets up Fourier analysis on the movie using numBands distinct bands in as many channels as the audo track contains. To determine the number of channels, use getNumFftChannels(). This data is only available during playback.
float * getFftData () const
uint32_t getNumFftBands () const
uint32_t getNumFftChannels () const
bool isPlaying () const
 Returns whether the movie is currently playing or is paused/stopped.
bool isDone () const
 Returns whether the movie has completely finished playing.
void play ()
 Begins movie playback.
void stop ()
 Stops movie playback.
void setNewFrameCallback (void(*aNewFrameCallback)(long, void *), void *aNewFrameCallbackRefcon)
 Sets a function which is called whenever the movie has rendered a new frame during playback. Generally only necessary for advanced users.
::Movie getMovieHandle () const
 Returns the native QuickTime Movie data structure.

Protected Member Functions

 MovieBase ()
void init ()
void updateFrame ()
void updateLoadState ()
void setupFft (FourCharCode code, uint32_t bandNum, uint8_t channelNum)
TimeValue getStartTimeOfFirstSample () const
void initFromPath (const std::string &path)
void initFromLoader (const class MovieLoader &loader)
void initFromMemory (const void *data, size_t dataSize, const std::string &fileNameHint, const std::string &mimeTypeHint)
void initFromDataSource (DataSourceRef dataSource, const std::string &mimeTypeHint)
virtual ObjgetObj () const =0

Static Protected Member Functions

static int32_t countFrames (::Movie theMovie)

Constructor & Destructor Documentation

virtual cinder::qtime::MovieBase::~MovieBase (  )  [virtual]
cinder::qtime::MovieBase::MovieBase (  )  [protected]

Member Function Documentation

bool cinder::qtime::MovieBase::checkPlayable (  ) 

Returns whether the movie has loaded and buffered enough to playback without interruption.

Returns:
The movie has loaded and buffered enough to playback without interruption
int32_t cinder::qtime::MovieBase::getWidth (  )  const

Returns the width of the movie in pixels.

int32_t cinder::qtime::MovieBase::getHeight (  )  const

Returns the height of the movie in pixels.

float cinder::qtime::MovieBase::getAspectRatio (  )  const

Returns the movie's aspect ratio, the ratio of its width to its height.

float cinder::qtime::MovieBase::getDuration (  )  const

Returns the movie's length measured in seconds.

float cinder::qtime::MovieBase::getFramerate (  )  const

Returns the movie's framerate measured as frames per second.

See also:
http://developer.apple.com/mac/library/qa/qa2001/qa1262.html Technical Q&A QA1262
int32_t cinder::qtime::MovieBase::getNumFrames (  )  const

Returns the total number of frames (video samples) in the movie.

bool cinder::qtime::MovieBase::hasAlpha (  )  const

Returns whether the first video track in the movie contains an alpha channel. Returns false in the absence of visual media.

See also:
http://developer.apple.com/qa/qtmtb/qtmtb17.html Technical Q&A QTMTB17
bool cinder::qtime::MovieBase::hasVisuals (  )  const

Returns whether a movie contains at least one visual track, defined as Video, MPEG, Sprite, QuickDraw3D, Text, or TimeCode tracks.

bool cinder::qtime::MovieBase::hasAudio (  )  const

Returns whether a movie contains at least one audio track, defined as Sound, Music, or MPEG tracks.

float cinder::qtime::MovieBase::getCurrentTime (  )  const

Returns the current time of a movie in seconds.

void cinder::qtime::MovieBase::seekToTime ( float  seconds  ) 

Sets the movie to the time seconds.

void cinder::qtime::MovieBase::seekToFrame ( int  frame  ) 

Sets the movie time to the start time of frame frame.

void cinder::qtime::MovieBase::seekToStart (  ) 

Sets the movie time to its beginning.

void cinder::qtime::MovieBase::seekToEnd (  ) 

Sets the movie time to its end.

void cinder::qtime::MovieBase::setActiveSegment ( float  startTime,
float  duration 
)

Limits the active portion of a movie to a subset beginning at startTime seconds and lasting for duration seconds. QuickTime will not process the movie outside the active segment.

void cinder::qtime::MovieBase::resetActiveSegment (  ) 

Resets the active segment to be the entire movie.

void cinder::qtime::MovieBase::setLoop ( bool  loop = true,
bool  palindrome = false 
)

Sets whether the movie is set to loop during playback. If palindrome is true, the movie will "ping-pong" back and forth.

void cinder::qtime::MovieBase::stepForward (  ) 

Advances the movie by one frame (a single video sample). Ignores looping settings.

void cinder::qtime::MovieBase::stepBackward (  ) 

Steps backward by one frame (a single video sample). Ignores looping settings.

void cinder::qtime::MovieBase::setRate ( float  rate  ) 

Sets the playback rate, which begins playback immediately for nonzero values. 1.0 represents normal speed. Negative values indicate reverse playback and 0 stops.

void cinder::qtime::MovieBase::setVolume ( float  volume  ) 

Sets the audio playback volume ranging from [0 - 1.0].

float cinder::qtime::MovieBase::getVolume (  )  const

Gets the audio playback volume ranging from [0 - 1.0].

void cinder::qtime::MovieBase::setupMonoFft ( uint32_t  numBands  ) 

Sets up Fourier analysis on the movie using numBands distinct bands in a single (mono) channel. This data is only available during playback.

void cinder::qtime::MovieBase::setupStereoFft ( uint32_t  numBands  ) 

Sets up Fourier analysis on the movie using numBands distinct bands in a two (stereo) channels. This data is only available during playback.

void cinder::qtime::MovieBase::setupMultiChannelFft ( uint32_t  numBands  ) 

Sets up Fourier analysis on the movie using numBands distinct bands in as many channels as the audo track contains. To determine the number of channels, use getNumFftChannels(). This data is only available during playback.

float * cinder::qtime::MovieBase::getFftData (  )  const
uint32_t cinder::qtime::MovieBase::getNumFftBands (  )  const
uint32_t cinder::qtime::MovieBase::getNumFftChannels (  )  const
bool cinder::qtime::MovieBase::isPlaying (  )  const

Returns whether the movie is currently playing or is paused/stopped.

bool cinder::qtime::MovieBase::isDone (  )  const

Returns whether the movie has completely finished playing.

void cinder::qtime::MovieBase::play (  ) 

Begins movie playback.

void cinder::qtime::MovieBase::stop (  ) 

Stops movie playback.

void cinder::qtime::MovieBase::setNewFrameCallback ( void(*)(long, void *)  aNewFrameCallback,
void *  aNewFrameCallbackRefcon 
)

Sets a function which is called whenever the movie has rendered a new frame during playback. Generally only necessary for advanced users.

::Movie cinder::qtime::MovieBase::getMovieHandle (  )  const

Returns the native QuickTime Movie data structure.

void cinder::qtime::MovieBase::init (  )  [protected]
void cinder::qtime::MovieBase::updateFrame (  )  [protected]
void cinder::qtime::MovieBase::updateLoadState (  )  [protected]
void cinder::qtime::MovieBase::setupFft ( FourCharCode  code,
uint32_t  bandNum,
uint8_t  channelNum 
) [protected]
int32_t cinder::qtime::MovieBase::countFrames ( ::Movie  theMovie  )  [static, protected]
TimeValue cinder::qtime::MovieBase::getStartTimeOfFirstSample (  )  const [protected]
void cinder::qtime::MovieBase::initFromPath ( const std::string &  path  )  [protected]
void cinder::qtime::MovieBase::initFromLoader ( const class MovieLoader loader  )  [protected]
void cinder::qtime::MovieBase::initFromMemory ( const void *  data,
size_t  dataSize,
const std::string &  fileNameHint,
const std::string &  mimeTypeHint 
) [protected]
void cinder::qtime::MovieBase::initFromDataSource ( DataSourceRef  dataSource,
const std::string &  mimeTypeHint 
) [protected]
virtual Obj* cinder::qtime::MovieBase::getObj (  )  const [protected, pure virtual]

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