diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-26 15:01:14 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-26 15:01:14 +0400 |
commit | 1b487e994850c0acb647aaa9a36464d613f89f51 (patch) | |
tree | bf3a591c736690b113b897caf8a986a5bda44b02 /source/gameengine | |
parent | aa17fc367bbd8a5a5834c07f3b225547dae11ee5 (diff) |
Some FFmpeg changes
- Make FFmpeg initialization called from creator, not from functions
which requires FFmpeg. Makes it easier to follow when initialization
should happen.
- Enable DNxHD codec. It was commented a while ago due to some strange
behavior on some platforms. Re-tested it on Linux and Windows and
it seemd to be working quite nice. Would let it be tested further,
if it wouldn't be stable enough, easy to comment it again.
- Make non-error messages from writeffmpeg.c printed only if ffmpeg
debug argument was passed to blender. Reduces console pollution
with messages which are not useful for general troubleshooting.
Error messages would still be printed to the console.
- Show FFmpeg error message when video stream failed to allocate.
makes it easier to understand what exactly is wrong from Blender
interface, no need to restart blender with FFmpeg debug flag and
check for console messages.
Used custom log callback for this which stores last error message
in static variable. This is not thread safe, but with current
design FFmpeg routines could not be called form several threads
anyway, so think it's fine solution/
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/VideoTexture/VideoFFmpeg.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp index 4586a50e6a9..1ba944aa955 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp +++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp @@ -52,8 +52,6 @@ const long timeScale = 1000; #define CATCH_EXCP catch (Exception & exp) \ { exp.report(); m_status = SourceError; } -extern "C" void do_init_ffmpeg(); - // class RenderVideo // constructor @@ -521,8 +519,6 @@ void VideoFFmpeg::releaseFrame(AVFrame* frame) // open video file void VideoFFmpeg::openFile (char * filename) { - do_init_ffmpeg(); - if (openStream(filename, NULL, NULL) != 0) return; @@ -586,8 +582,6 @@ void VideoFFmpeg::openCam (char * file, short camIdx) char filename[28], rateStr[20]; char *p; - do_init_ffmpeg(); - #ifdef WIN32 // video capture on windows only through Video For Windows driver inputFormat = av_find_input_format("vfwcap"); |