Panda3D
config_movies.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file config_movies.cxx
10  * @author jyelon
11  * @date 2007-07-02
12  */
13 
14 #include "config_movies.h"
15 #include "dconfig.h"
16 #include "flacAudio.h"
17 #include "flacAudioCursor.h"
18 #include "inkblotVideo.h"
19 #include "inkblotVideoCursor.h"
20 #include "microphoneAudio.h"
21 #include "movieAudio.h"
22 #include "movieAudioCursor.h"
23 #include "movieTypeRegistry.h"
24 #include "movieVideo.h"
25 #include "movieVideoCursor.h"
26 #include "opusAudio.h"
27 #include "opusAudioCursor.h"
28 #include "userDataAudio.h"
29 #include "userDataAudioCursor.h"
30 #include "vorbisAudio.h"
31 #include "vorbisAudioCursor.h"
32 #include "wavAudio.h"
33 #include "wavAudioCursor.h"
34 
35 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_MOVIES)
36  #error Buildsystem error: BUILDING_PANDA_MOVIES not defined
37 #endif
38 
39 ConfigureDef(config_movies);
40 NotifyCategoryDef(movies, "");
41 
42 ConfigureFn(config_movies) {
44 }
45 
46 ConfigVariableList load_audio_type
47 ("load-audio-type",
48  PRC_DESC("List the audio loader modules that Panda will automatically "
49  "import when a new, unknown audio type is loaded. This may be "
50  "either the name of a module, or a space-separate list of filename "
51  "extensions, followed by the name of the module."));
52 
53 ConfigVariableList load_video_type
54 ("load-video-type",
55  PRC_DESC("List the video loader modules that Panda will automatically "
56  "import when a new, unknown video type is loaded. This may be "
57  "either the name of a module, or a space-separate list of filename "
58  "extensions, followed by the name of the module."));
59 
60 ConfigVariableBool opus_enable_seek
61 ("opus-enable-seek", true,
62  PRC_DESC("Set this to false if you're having trouble with seeking while "
63  "using the Opus decoder."));
64 
65 ConfigVariableBool vorbis_enable_seek
66 ("vorbis-enable-seek", true,
67  PRC_DESC("Set this to false if you're having trouble with seeking while "
68  "using the Ogg Vorbis decoder."));
69 
70 ConfigVariableBool vorbis_seek_lap
71 ("vorbis-seek-lap", true,
72  PRC_DESC("If this is set to true, the Ogg Vorbis decoder will automatically "
73  "crosslap the transition from the previous playback position into "
74  "the new playback position when seeking in order to eliminate "
75  "clicking and boundary discontinuities."));
76 
77 /**
78  * Initializes the library. This must be called at least once before any of
79  * the functions or classes in this library can be used. Normally it will be
80  * called by the static initializers and need not be called explicitly, but
81  * special cases exist.
82  */
83 void
85  static bool initialized = false;
86  if (initialized) {
87  return;
88  }
89  initialized = true;
90 
91  FlacAudio::init_type();
92  FlacAudioCursor::init_type();
93  InkblotVideo::init_type();
94  InkblotVideoCursor::init_type();
95  MicrophoneAudio::init_type();
96  MovieAudio::init_type();
97  MovieAudioCursor::init_type();
98  MovieVideo::init_type();
99  MovieVideoCursor::init_type();
100  UserDataAudio::init_type();
101  UserDataAudioCursor::init_type();
102  WavAudio::init_type();
103  WavAudioCursor::init_type();
104 
105 #ifdef HAVE_OPUS
106  OpusAudio::init_type();
107  OpusAudioCursor::init_type();
108 #endif
109 
110 #ifdef HAVE_VORBIS
111  VorbisAudio::init_type();
112  VorbisAudioCursor::init_type();
113 #endif
114 
116  reg->register_audio_type(&FlacAudio::make, "flac");
117  reg->register_audio_type(&WavAudio::make, "wav wave");
118 
119 #ifdef HAVE_OPUS
120  reg->register_audio_type(&OpusAudio::make, "opus");
121 #endif
122 
123 #ifdef HAVE_VORBIS
124  reg->register_audio_type(&VorbisAudio::make, "ogg oga");
125 #endif
126 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libmovies()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a boolean type.
This class records the different types of MovieAudio and MovieVideo that are available for loading.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is similar to ConfigVariable, but it reports its value as a list of strings.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static MovieTypeRegistry * get_global_ptr()
Returns a pointer to the global MovieTypeRegistry instance.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_audio_type(MakeAudioFunc func, const std::string &extensions)
Registers a MovieAudio type, so that files with any of the given extensions will be loaded as this ty...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.