ffconv/include/ffcpp/Scaler.h

30 lines
573 B
C++

#ifndef FFCONV_SCALER_H
#define FFCONV_SCALER_H
#include "Frame.h"
#include "Codec.h"
extern "C" {
#include <libswscale/swscale.h>
}
namespace ffcpp {
class Scaler {
private:
SwsContext* _swsContext;
int _dstHeight;
int _dstWidth;
AVPixelFormat _dstPixFmt;
public:
Scaler(int srcWidth, int srcHeight, AVPixelFormat srcPixFmt, int dstWidth, int dstHeight, AVPixelFormat dstPixFmt);
Scaler(CodecPtr decoder, CodecPtr encoder);
Frame scale(Frame& inFrame);
static bool needScaling(CodecPtr decoder, CodecPtr encoder);
};
}
#endif //FFCONV_SCALER_H