Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2014-07-17 17:29:09 +0400
committerDalai Felinto <dfelinto@gmail.com>2014-07-17 17:30:44 +0400
commit6f846da2fb8eb0791c7c7bfb1f666e6b584d37c1 (patch)
treef2632d586f977e546b43abf382929b8b629ea5af /source/gameengine
parent70453c578dcdce5577015e1cd7be99d1b810215d (diff)
BGE: rtsp support for VideoTexture (video streaming)
In collaboration with Benoit Bolsee (mainly doing it under his directions). Note: FFmpeg lib needs to be compiled with rtsp support for this to work. Bug 1/2 of T41004
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
index 179f1ced03b..edf3c58bcbe 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
@@ -545,6 +545,7 @@ void VideoFFmpeg::openFile (char *filename)
// but it is really not desirable to seek on http file, so force streaming.
// It would be good to find this information from the context but there are no simple indication
!strncmp(filename, "http://", 7) ||
+ !strncmp(filename, "rtsp://", 7) ||
(m_formatCtx->pb && !m_formatCtx->pb->seekable)
)
{
@@ -680,6 +681,12 @@ bool VideoFFmpeg::play (void)
{
// set video position
setPositions();
+
+ if (m_isStreaming)
+ {
+ av_read_play(m_formatCtx);
+ }
+
// return success
return true;
}
@@ -696,6 +703,10 @@ bool VideoFFmpeg::pause (void)
{
if (VideoBase::pause())
{
+ if (m_isStreaming)
+ {
+ av_read_pause(m_formatCtx);
+ }
return true;
}
}