繁体   English   中英

将ffmpeg库与Qt框架一起使用会导致错误

[英]Using ffmpeg library with Qt framework results in error

当我包括:

extern "C" {
#include <libavcodec/avcodec.h>
}

我收到错误消息:

未定义对QVideoSurfaceFormat :: QVideoSurfaceFormat的引用(QSize const&,QVideoFrame :: AVPixelFormat,QAbstractVideoBuffer :: HandleType)

没有包含-建立成功。

我的猜测包括一些打破QVideoSurfaceFormat定义的定义。
有人遇到过类似的问题吗?

#define __STDC_CONSTANT_MACROS // to fix #include <stdint.h> issue
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}

阅读完stdint.h和网络上的相关主题后,找到了适合我的解决方案:

#define __STDC_CONSTANT_MACROS

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM