From a99d584008f80f6f5361e1af507d8ed6bdd2fffd Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Sun, 28 Mar 2010 17:50:45 +0000 Subject: VideoTexture: fix video capture lagging when CPU is busy. This problem was caused by special frame handling that was appropriate for video streaming but not for video capture: drift compensation and no frame skipping. Disable that for video capture to take into account the realtime nature of video. --- source/gameengine/VideoTexture/VideoFFmpeg.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/gameengine/VideoTexture/VideoFFmpeg.h') diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h index b9bf69039c7..a19d8969b40 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.h +++ b/source/gameengine/VideoTexture/VideoFFmpeg.h @@ -61,7 +61,7 @@ static inline AVCodecContext* get_codec_from_stream(AVStream* stream) #include "VideoBase.h" -#define CACHE_FRAME_SIZE 5 +#define CACHE_FRAME_SIZE 10 #define CACHE_PACKET_SIZE 30 // type VideoFFmpeg declaration @@ -153,6 +153,9 @@ protected: /// is image loading done in a separate thread? bool m_isThreaded; + /// is streaming or camera? + bool m_isStreaming; + /// keep last image name STR_String m_imageName; -- cgit v1.2.3