diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2010-02-07 22:18:00 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2010-02-07 22:18:00 +0300 |
commit | a8a99a628f6f3bc8ddefec8dfae8a7aa27b8f863 (patch) | |
tree | cd635f8d5cec45c5c8eeb330396b05f05a492f52 /source/gameengine/VideoTexture/ImageMix.h | |
parent | 064345ad8c72d0af21b31c3da47bad6ceb3a7023 (diff) |
BGE: add audio/video synchronization capability to VideoTexture
Add optional parameter to VideoTexture.Texture refresh() method
to specify timestamp (in seconds from start of movie) of the frame
to be loaded. This value is passed down to image source and for
VideoFFmpeg source, it is used instead of current time to load
the frame from the video file.
When combined with an audio actuator, it can be used to synchronize
the sound and the image: specify the same video file in the sound
actuator and use the KX_SoundActuator time attribute as timestamp
to refresh: the frame corresponding to the sound will be loaded:
GameLogic.video.refresh(True, soundAct.time)
Diffstat (limited to 'source/gameengine/VideoTexture/ImageMix.h')
-rw-r--r-- | source/gameengine/VideoTexture/ImageMix.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/VideoTexture/ImageMix.h b/source/gameengine/VideoTexture/ImageMix.h index b4842bd6b40..47bd644860f 100644 --- a/source/gameengine/VideoTexture/ImageMix.h +++ b/source/gameengine/VideoTexture/ImageMix.h @@ -78,7 +78,7 @@ protected: virtual ImageSource * newSource (const char * id) { return new ImageSourceMix(id); } /// calculate image from sources and set its availability - virtual void calcImage (unsigned int texId); + virtual void calcImage (unsigned int texId, double ts); }; |