Panda3D
|
00001 // Filename: config_movies.cxx 00002 // Created by: jyelon (02Jul07) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "config_movies.h" 00016 #include "dconfig.h" 00017 00018 #ifdef HAVE_FFMPEG 00019 extern "C" { 00020 #include "libavcodec/avcodec.h" 00021 } 00022 #endif 00023 00024 ConfigureDef(config_movies); 00025 NotifyCategoryDef(movies, ""); 00026 00027 ConfigureFn(config_movies) { 00028 init_libmovies(); 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: init_libmovies 00033 // Description: Initializes the library. This must be called at 00034 // least once before any of the functions or classes in 00035 // this library can be used. Normally it will be 00036 // called by the static initializers and need not be 00037 // called explicitly, but special cases exist. 00038 //////////////////////////////////////////////////////////////////// 00039 void 00040 init_libmovies() { 00041 static bool initialized = false; 00042 if (initialized) { 00043 return; 00044 } 00045 initialized = true; 00046 00047 MovieVideo::init_type(); 00048 MovieVideoCursor::init_type(); 00049 MovieAudio::init_type(); 00050 MovieAudioCursor::init_type(); 00051 InkblotVideo::init_type(); 00052 InkblotVideoCursor::init_type(); 00053 UserDataAudio::init_type(); 00054 UserDataAudioCursor::init_type(); 00055 MicrophoneAudio::init_type(); 00056 #ifdef HAVE_FFMPEG 00057 FfmpegVideo::init_type(); 00058 FfmpegVideoCursor::init_type(); 00059 FfmpegAudio::init_type(); 00060 FfmpegAudioCursor::init_type(); 00061 av_register_all(); 00062 FfmpegVirtualFile::register_protocol(); 00063 #endif 00064 } 00065