Blender Git Loki

Git Commits -> Revision a8a99a6

Revision a8a99a6 by Benoit Bolsee (master)
February 7, 2010, 19:18 (GMT)
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)

Commit Details:

Full Hash: a8a99a628f6f3bc8ddefec8dfae8a7aa27b8f863
SVN Revision: 26689
Parent Commit: 064345a
Lines Changed: +122, -41

12 Modified Paths:

/source/gameengine/PyDoc/VideoTexture.py (+76, -15) (Diff)
/source/gameengine/VideoTexture/ImageBase.cpp (+5, -5) (Diff)
/source/gameengine/VideoTexture/ImageBase.h (+3, -3) (Diff)
/source/gameengine/VideoTexture/ImageMix.cpp (+1, -1) (Diff)
/source/gameengine/VideoTexture/ImageMix.h (+1, -1) (Diff)
/source/gameengine/VideoTexture/ImageRender.cpp (+2, -2) (Diff)
/source/gameengine/VideoTexture/ImageRender.h (+1, -1) (Diff)
/source/gameengine/VideoTexture/ImageViewport.cpp (+1, -1) (Diff)
/source/gameengine/VideoTexture/ImageViewport.h (+1, -1) (Diff)
/source/gameengine/VideoTexture/Texture.cpp (+4, -2) (Diff)
/source/gameengine/VideoTexture/VideoFFmpeg.cpp (+22, -7) (Diff)
/source/gameengine/VideoTexture/VideoFFmpeg.h (+5, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021