root/OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp @ 9847

Revision 9847, 1.0 kB (checked in by robert, 5 years ago)

Introduce FFmpegAudioStream implementation

RevLine 
[9847]1
2#ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H
3#define HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H
4
5#include <osg/AudioStream>
6#include "FFmpegDecoder.hpp"
7
8namespace osgFFmpeg
9{
10
11    class FFmpegAudioStream : public osg::AudioStream
12    {
13    public:
14
15        FFmpegAudioStream(FFmpegDecoder* decoder=0);
16        FFmpegAudioStream(const FFmpegAudioStream & audio, const osg::CopyOp & copyop = osg::CopyOp::SHALLOW_COPY);
17
18        META_Object(osgFFmpeg, FFmpegAudioStream);
19
20        virtual void setAudioSink(osg::AudioSink* audio_sink);
21       
22        void consumeAudioBuffer(void * const buffer, const size_t size);
23       
24        bool audioStream() const;
25        int audioFrequency() const;
26        int audioNbChannels() const;
27        osg::AudioStream::SampleFormat audioSampleFormat() const;
28
29        double duration() const;
30
31    private:
32
33        virtual ~FFmpegAudioStream();
34
35        osg::ref_ptr<FFmpegDecoder>    m_decoder;
36
37    };
38
39}
40
41
42
43#endif // HEADER_GUARD_OSGFFMPEG_FFMPEG_IMAGE_STREAM_H
Note: See TracBrowser for help on using the browser.