Vuo
1.2.0
|
VuoVideo implementation.
Functions | |
void | VuoVideo_free (void *player) |
Destroy an instance of VuoVideoPlayer. | |
VuoVideo | VuoVideo_make (VuoUrl path, VuoVideoOptimization optimization) |
Creates a video player for path . | |
void | VuoVideo_setVideoDelegate (VuoVideo player, void(*delegate)(VuoVideoFrame)) |
Set the delgate to be called when a new video frame is available. | |
void | VuoVideo_setAudioDelegate (VuoVideo player, void(*delegate)(VuoList_VuoAudioSamples)) |
Set the delgate to be called when a new video frame is available. | |
const char * | VuoVideo_getPath (VuoVideo player) |
Return the full path to the currently playing video. | |
void | VuoVideo_play (VuoVideo player) |
Begin playback of video. | |
void | VuoVideo_pause (VuoVideo player) |
Stop playback of video. | |
bool | VuoVideo_seekToSecond (VuoVideo player, VuoReal second) |
Seek the decoder to the second. | |
double | VuoVideo_getDuration (VuoVideo player) |
Get the total duration of this movie in seconds. | |
void | VuoVideo_setPlaybackLooping (VuoVideo player, VuoLoopType loop) |
Set how the video reacts when reaching the end of playback. | |
void | VuoVideo_setPlaybackRate (VuoVideo player, VuoReal rate) |
Set the playback rate for the decoder. | |
double | VuoVideo_getLastDecodedVideoTimestamp (VuoVideo player) |
Return the timestamp of the last decoded video frame. | |
bool | VuoVideo_getFrameAtSecond (VuoVideo player, VuoReal second, VuoVideoFrame *videoFrame) |
Get the video frame at timestamp second . | |
bool | VuoVideo_nextVideoFrame (VuoVideo player, VuoVideoFrame *videoFrame) |
Steps the video one frame, returning the newly decoded image. | |
bool | VuoVideo_nextAudioFrame (VuoVideo player, VuoAudioFrame *audioFrame) |
Get the next decoded audio frame. | |
unsigned int | VuoVideo_getAudioChannels (VuoVideo player) |
Get the number of audio channels this video contains. | |
bool | VuoVideo_isReady (VuoVideo player) |
True if the video is loaded and ready to play, else false. | |
void VuoVideo_free | ( | void * | player | ) |
Destroy an instance of VuoVideoPlayer.
unsigned int VuoVideo_getAudioChannels | ( | VuoVideo | player | ) |
Get the number of audio channels this video contains.
double VuoVideo_getDuration | ( | VuoVideo | player | ) |
Get the total duration of this movie in seconds.
bool VuoVideo_getFrameAtSecond | ( | VuoVideo | player, |
VuoReal | second, | ||
VuoVideoFrame * | videoFrame | ||
) |
Get the video frame at timestamp second
.
Images contained by VuoVideoFrame have their retain count set at 1 coming from this function.
double VuoVideo_getLastDecodedVideoTimestamp | ( | VuoVideo | player | ) |
Return the timestamp of the last decoded video frame.
If no frames have been decoded yet, the timestamp of the first frame is returned.
const char* VuoVideo_getPath | ( | VuoVideo | player | ) |
Return the full path to the currently playing video.
bool VuoVideo_isReady | ( | VuoVideo | player | ) |
True if the video is loaded and ready to play, else false.
If false, some values may not yet be available (duration, channel counts, etc)
VuoVideo VuoVideo_make | ( | VuoUrl | path, |
VuoVideoOptimization | optimization | ||
) |
Creates a video player for path
.
Create a new instance of a video player.
bool VuoVideo_nextAudioFrame | ( | VuoVideo | player, |
VuoAudioFrame * | audioFrame | ||
) |
Get the next decoded audio frame.
Returns false if no audio is available, or the playhead is at the end of track. If true, the audioFrame.samples list will be populated with samples equaliing the number of audio channels. The VuoList_VuoAudioSamples()
list should be initialized and retained prior to calling.
If video is currently playing, this will always returns false.
bool VuoVideo_nextVideoFrame | ( | VuoVideo | player, |
VuoVideoFrame * | videoFrame | ||
) |
Steps the video one frame, returning the newly decoded image.
Will be forwards or backwards depending on playback rate. The image stored in videoFrame will have been registered and have a retain count of 1 - caller is responsible for release. If returning false, image will be null.
If video is currently playing, this will always returns false.
void VuoVideo_pause | ( | VuoVideo | player | ) |
Stop playback of video.
void VuoVideo_play | ( | VuoVideo | player | ) |
Begin playback of video.
Frames will be sent to delegates as set by VuoVideo_SetVideoDelegate and VuoVideo_SetAudioDelegate.
void VuoVideo_setAudioDelegate | ( | VuoVideo | player, |
void(*)(VuoList_VuoAudioSamples) | delegate | ||
) |
Set the delgate to be called when a new video frame is available.
Video frames will be send to delegates at the appropriate timestamp automatically when playing.
void VuoVideo_setPlaybackLooping | ( | VuoVideo | player, |
VuoLoopType | loop | ||
) |
Set how the video reacts when reaching the end of playback.
Set the playback rate for the decoder.
If the value is not 1, audio is discarded.
void VuoVideo_setVideoDelegate | ( | VuoVideo | player, |
void(*)(VuoVideoFrame) | delegate | ||
) |
Set the delgate to be called when a new video frame is available.
Video frames will be send to delegates at the appropriate timestamp automatically when playing.