14 #ifndef FFMPEGAUDIOCURSOR_H 15 #define FFMPEGAUDIOCURSOR_H 26 #include <libavcodec/avcodec.h> 30 struct AVFormatContext;
31 struct AVCodecContext;
45 virtual void seek(
double offset);
58 unsigned char *_packet_data;
59 AVFormatContext *_format_ctx;
60 AVCodecContext *_audio_ctx;
63 double _audio_timebase;
68 int16_t *_buffer_alloc;
72 SwrContext *_resample_ctx;
78 static void init_type() {
79 MovieAudioCursor::init_type();
81 MovieAudioCursor::get_class_type());
84 return get_class_type();
86 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
94 #endif // FFMPEGAUDIOCURSOR_H PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void read_samples(int n, Datagram *dg)
Read audio samples from the stream into a Datagram.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A stream that generates a sequence of audio samples.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Enables ffmpeg to access panda's VFS.
A stream that generates a sequence of audio samples.
The name of a file, such as a texture file or an Egg file.
A MovieAudio is actually any source that provides a sequence of audio samples.
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.
TypeHandle is the identifier used to differentiate C++ class types.
virtual void seek(double offset)
Skips to the specified offset within the file.