mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-24 09:52:21 +08:00
feat: VideoStack支持等比缩放 (#4191)
feat: VideoStack支持等比缩放 (目前以宏VIDEOSTACK_KEEP_ASPECT_RATIO 方式控制开启,后续考虑是否添加到配置文件中来控制)
This commit is contained in:
@@ -62,12 +62,24 @@ protected:
|
||||
|
||||
void copyData(const mediakit::FFmpegFrame::Ptr& buf, const Param::Ptr& p);
|
||||
|
||||
void resizeFrame(const mediakit::FFmpegFrame::Ptr &frame);
|
||||
|
||||
void resizeFrameImplWithAspectRatio(const mediakit::FFmpegFrame::Ptr &frame);
|
||||
|
||||
void resizeFrameImplWithoutAspectRatio(const mediakit::FFmpegFrame::Ptr &frame);
|
||||
|
||||
private:
|
||||
std::string _id;
|
||||
int _width;
|
||||
int _height;
|
||||
AVPixelFormat _pixfmt;
|
||||
|
||||
int _lastWidht;
|
||||
int _lastHeight;
|
||||
bool _keepAspectRatio;
|
||||
int _offsetX;
|
||||
int _offsetY;
|
||||
|
||||
mediakit::FFmpegFrame::Ptr _tmp;
|
||||
|
||||
std::recursive_mutex _mx;
|
||||
|
||||
Reference in New Issue
Block a user