15 #ifndef FFMPEGAUDIOCURSOR_H
16 #define FFMPEGAUDIOCURSOR_H
18 #include "pandabase.h"
20 #include "movieAudioCursor.h"
23 #include "pointerTo.h"
24 #include "ffmpegVirtualFile.h"
27 #include "libavcodec/avcodec.h"
31 struct AVFormatContext;
32 struct AVCodecContext;
36 #ifdef HAVE_SWRESAMPLE
50 virtual void seek(
double offset);
63 unsigned char *_packet_data;
64 AVFormatContext *_format_ctx;
65 AVCodecContext *_audio_ctx;
68 double _audio_timebase;
73 PN_int16 *_buffer_alloc;
77 #ifdef HAVE_SWRESAMPLE
78 SwrContext *_resample_ctx;
85 static void init_type() {
86 MovieAudioCursor::init_type();
87 register_type(_type_handle,
"FfmpegAudioCursor",
88 MovieAudioCursor::get_class_type());
91 return get_class_type();
93 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
99 #include "ffmpegAudioCursor.I"
101 #endif // FFMPEGAUDIOCURSOR_H
void read_samples(int n, Datagram *dg)
Read audio samples from the stream into a Datagram.
A stream that generates a sequence of audio samples.
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.
TypeHandle is the identifier used to differentiate C++ class types.
virtual void seek(double offset)
Skips to the specified offset within the file.