ffconv/ffcpp/FifoQueue.h

27 lines
481 B
C++

#ifndef FFCONV_FIFOQUEUE_H
#define FFCONV_FIFOQUEUE_H
#include "Frame.h"
extern "C" {
#include "libavutil/audio_fifo.h"
}
namespace ffcpp {
class FifoQueue {
private:
AVAudioFifo* _fifo;
int _frameSize;
public:
FifoQueue(AVSampleFormat sampleFormat, int channels, int frameSize);
void addSamples(const Frame& frame);
void addSamples(void** data, int samplesCount);
bool enoughSamples() const;
void readFrame(Frame& frame);
};
}
#endif //FFCONV_FIFOQUEUE_H