32 lines
632 B
C++
32 lines
632 B
C++
#ifndef FFCONV_SCALER_H
|
|
#define FFCONV_SCALER_H
|
|
|
|
#include "Frame.h"
|
|
#include "Codec.h"
|
|
|
|
extern "C" {
|
|
#include <libswscale/swscale.h>
|
|
}
|
|
|
|
namespace ffcpp {
|
|
|
|
typedef std::shared_ptr<class Scaler> ScalerPtr;
|
|
|
|
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);
|
|
FramePtr scale(FramePtr inFrame);
|
|
static bool needScaling(CodecPtr decoder, CodecPtr encoder);
|
|
};
|
|
|
|
}
|
|
|
|
#endif //FFCONV_SCALER_H
|