ffconv/ffcpp/Frame.h

36 lines
649 B
C++

#ifndef FFCONV_FRAME_H
#define FFCONV_FRAME_H
extern "C" {
#include <libavformat/avformat.h>
#include <libavutil/imgutils.h>
}
namespace ffcpp {
class Frame {
private:
uint8_t* _buffer;
AVFrame* _frame;
public:
Frame();
Frame(int size, int channels, AVSampleFormat sampleFormat, int sampleRate);
Frame(int width, int height, AVPixelFormat pixelFormat);
Frame(Frame&& frame);
~Frame();
Frame& operator=(Frame&& frame);
operator AVFrame*();
operator const AVFrame*() const;
void guessPts();
void setPictureType(AVPictureType type);
int samplesCount() const;
void setPts(int pts);
};
}
#endif //FFCONV_FRAME_H