| | |
| | | ,thread_(nullptr) |
| | | ,stop_stream_(false) |
| | | ,bridge_(NULL) |
| | | ,scale_w_(0) |
| | | ,scale_h_(0) |
| | | ,scale_f_(SWS_POINT) |
| | | { |
| | | makeTheWorld(); |
| | | } |
| | | |
| | | |
| | | Wrapper::~Wrapper() |
| | | { |
| | |
| | | if(recorder_){ |
| | | delete recorder_; recorder_ = NULL; |
| | | } |
| | | } |
| | | |
| | | void Wrapper::ScalePicture(const int w, const int h, const int flags){ |
| | | scale_w_ = w; |
| | | scale_f_ = flags; |
| | | scale_h_ = h; |
| | | } |
| | | |
| | | std::unique_ptr<ffwrapper::FormatIn> Wrapper::init_reader(const char* input){ |
| | |
| | | |
| | | AVPixelFormat pix_fmt = AV_PIX_FMT_BGR24; |
| | | bridge_ = new cvbridge( |
| | | dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, |
| | | dec_ctx->width, dec_ctx->height, pix_fmt, SWS_BICUBIC); |
| | | dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, |
| | | scale_w_?scale_w_:dec_ctx->width, scale_h_?scale_h_:dec_ctx->height, pix_fmt, |
| | | scale_f_); |
| | | |
| | | } |
| | | if (!flag){ |