core/vidl/vidl_ffmpeg_init.cxx
Go to the documentation of this file.
00001 // This is core/vidl/vidl_ffmpeg_init.cxx
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005 //:
00006 // \file
00007 // \author Matt Leotta
00008 // \date   21 Dec 2005
00009 //
00010 //-----------------------------------------------------------------------------
00011 // some versions of FFMPEG require this definition before including
00012 // the headers for C++ compatibility
00013 #define __STDC_CONSTANT_MACROS
00014 
00015 #include "vidl_ffmpeg_init.h"
00016 #include <vidl/vidl_config.h>
00017 extern "C" {
00018 #if FFMPEG_IN_SEVERAL_DIRECTORIES
00019 #include <libavformat/avformat.h>
00020 #else
00021 #include <ffmpeg/avformat.h>
00022 #endif
00023 }
00024 
00025 //--------------------------------------------------------------------------------
00026 
00027 void vidl_ffmpeg_init()
00028 {
00029   static bool initialized = false;
00030   if ( ! initialized ) {
00031     av_register_all();
00032     av_log_set_level(AV_LOG_ERROR);
00033     initialized = true;
00034   }
00035 }