1 Star 1 Fork 1

孙全/QFFmpeg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
QFFmpegGLWidget.h 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
liu-wenwu 提交于 2015-04-26 17:18 . First Commit
#ifndef QFFMPEGGLWidget_H
#define QFFMPEGGLWidget_H
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QOpenGLBuffer>
#include <QVector3D>
#include <QMatrix4x4>
#include <QTime>
#include <QVector>
#include <QOpenGLTexture>
QT_FORWARD_DECLARE_CLASS(QOpenGLTexture)
QT_FORWARD_DECLARE_CLASS(QOpenGLShader)
QT_FORWARD_DECLARE_CLASS(QOpenGLShaderProgram)
#define BUF_SIZE 2
class QFFmpegGLWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
Q_OBJECT
public:
QFFmpegGLWidget();
~QFFmpegGLWidget();
void updateData(unsigned char*);
void updateData(unsigned char**);
void initShader(int w,int h);
public slots:
void setTransparent(bool transparent);
protected:
void resizeGL(int w, int h) Q_DECL_OVERRIDE;
void paintGL() Q_DECL_OVERRIDE;
void initializeGL() Q_DECL_OVERRIDE;
private:
QTimer *timer;
//--------------------
QOpenGLShader *m_vshaderA;
QOpenGLShader *m_fshaderA;
QOpenGLShaderProgram *m_programA;
QOpenGLBuffer m_vboA;
//-------------------
QOpenGLTexture *m_texture;
bool m_transparent;
QColor m_background;
bool isShaderInited;
int width;
int height;
quint8 *buffer[BUF_SIZE];
int bufIndex;
void InitializeTexture( int id, int width, int height);
};
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sunshengquan110/QFFmpeg.git
git@gitee.com:sunshengquan110/QFFmpeg.git
sunshengquan110
QFFmpeg
QFFmpeg
master

搜索帮助