Miam-Player  0.8.0
A nice music player
ConvolutionShader.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 #ifndef QTAV_CONVOLUTIONSHADER_H
22 #define QTAV_CONVOLUTIONSHADER_H
23 #include <QtAV/VideoShader.h>
24 
25 namespace QtAV {
26 class ConvolutionShaderPrivate;
32 {
34 public:
42  int kernelRadius() const;
44  void setKernelRadius(int value);
45  int kernelSize() const;
46 protected:
47  virtual const float* kernel() const = 0;
48  const QByteArray& kernelUniformHeader() const; //can be used in your userFragmentShaderHeader();
49  const QByteArray& kernelSample() const; //can be in your userSample();
50  void setKernelUniformValue(); // can be used in your setUserUniformValues()
51 private:
53  const char* userShaderHeader(QOpenGLShader::ShaderType t) const Q_DECL_OVERRIDE;
54  const char* userSample() const Q_DECL_OVERRIDE;
55  bool setUserUniformValues() Q_DECL_OVERRIDE;
56 protected:
57  ConvolutionShader(ConvolutionShaderPrivate &d);
58 };
59 } //namespace QtAV
60 #endif // QTAV_CONVOLUTIONSHADER_H
#define Q_AV_EXPORT
Definition: QtAV_Global.h:40
#define DPTR_DECLARE_PRIVATE(Class)
Definition: dptr.h:107
The ConvolutionShader class Uniform u_Kernel is used.
Definition: ConvolutionShader.h:31
The VideoShader class Represents a shader for rendering a video frame.
Definition: VideoShader.h:53
ShaderType
Definition: VideoShader_p.h:48
AudioOutput ao; ao.setAudioFormat(fmt); ao.open(); while (has_data) { data = read_data(ao->bufferSize...
Definition: AudioDecoder.h:31
#define Q_DECL_OVERRIDE
Definition: QtAV_Global.h:177