Miam-Player  0.8.0
A nice music player
GLSLFilter.h
Go to the documentation of this file.
1 /******************************************************************************
2  QtAV: Multimedia framework based on Qt and FFmpeg
3  Copyright (C) 2012-2016 Wang Bin <wbsecg1@gmail.com>
4 
5 * This file is part of QtAV (from 2016)
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 ******************************************************************************/
21 
22 #ifndef QTAV_GLSLFILTER_H
23 #define QTAV_GLSLFILTER_H
24 
25 #include <QtAV/QtAV_Global.h>
26 #include <QtAV/Filter.h>
27 
28 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
29 #undef QOpenGLFramebufferObject
30 #define QOpenGLFramebufferObject QGLFramebufferObject
31 #endif
32 QT_BEGIN_NAMESPACE
33 class QOpenGLFramebufferObject;
34 QT_END_NAMESPACE
35 
36 namespace QtAV {
37 class OpenGLVideo;
38 class GLSLFilterPrivate;
40 {
41  Q_OBJECT
43  Q_PROPERTY(QSize outputSize READ outputSize WRITE setOutputSize NOTIFY outputSizeChanged)
44 public:
45  GLSLFilter(QObject* parent = 0);
46  bool isSupported(VideoFilterContext::Type ct) const Q_DECL_OVERRIDE {
47  return ct == VideoFilterContext::OpenGL;
48  }
49 
54  OpenGLVideo* opengl() const;
55  QOpenGLFramebufferObject* fbo() const;
61  QSize outputSize() const;
62  void setOutputSize(const QSize& value);
63  void setOutputSize(int width, int height);
64 Q_SIGNALS:
65  void outputSizeChanged(const QSize& size);
66 protected:
67  GLSLFilter(GLSLFilterPrivate& d, QObject *parent = 0);
75  void process(Statistics* statistics, VideoFrame* frame = 0) Q_DECL_OVERRIDE;
76 };
77 } //namespace QtAV
78 #endif // QTAV_GLSLFILTER_H
Definition: Filter.h:77
#define Q_AV_EXPORT
Definition: QtAV_Global.h:40
#define DPTR_DECLARE_PRIVATE(Class)
Definition: dptr.h:107
size_t size
Definition: mem.h:207
Definition: FilterContext.h:46
Definition: FilterContext.h:41
Definition: VideoFrame.h:32
Definition: Statistics.h:35
AudioOutput ao; ao.setAudioFormat(fmt); ao.open(); while (has_data) { data = read_data(ao->bufferSize...
Definition: AudioDecoder.h:31
Definition: GLSLFilter.h:39
The OpenGLVideo class high level api for renderering a video frame.
Definition: OpenGLVideo.h:51
#define Q_DECL_OVERRIDE
Definition: QtAV_Global.h:177