ffconv/include/ffcpp/Scaler.h

29 lines
594 B
C++

#ifndef FFCONV_SCALER_H
#define FFCONV_SCALER_H
extern "C" {
#include <libswscale/swscale.h>
}
#include "Frame.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(AVCodecContext *decoderCtx, AVCodecContext *encoderCtx);
Frame scale(Frame& inFrame);
static bool needScaling(AVCodecContext *decoderCtx, AVCodecContext *encoderCtx);
};
}
#endif //FFCONV_SCALER_H