#ifndef _OPENGLWIDGET_H_
#define _OPENGLWIDGET_H_

#include <QWidget>
class QImage;

struct Image_YUV420P;

extern "C" {

/* 创建窗口，返回QWidget指针 */
Q_DECL_EXPORT QWidget* createOpenGLWidget(QWidget* parent = nullptr);
/* 销毁窗口 */
Q_DECL_EXPORT void destroyOpenGLWidget(QWidget* widget);

/* 刷新一帧RGBA图片 */
Q_DECL_EXPORT void refreshRGBAImage(QWidget* widget, QImage& image);
/* 刷新一帧YUV420图片 */
Q_DECL_EXPORT void refreshYUV420Image(QWidget* widget, Image_YUV420P* yuvData);

};

#endif // _OPENGLWIDGET_H_
