38 lines
695 B
C++
38 lines
695 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);
|
|
bool isKeyFrame() const;
|
|
int pts() const;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //FFCONV_FRAME_H
|