forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gl/custom_shader: expose VideoRenderer.opengl()
- Loading branch information
Showing
7 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2015-2016 Wang Bin <[email protected]> | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2015) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -56,6 +56,7 @@ class QuickFBORenderer : public QQuickFramebufferObject, public VideoRenderer | |
explicit QuickFBORenderer(QQuickItem *parent = 0); | ||
VideoRendererId id() const Q_DECL_OVERRIDE; | ||
bool isSupported(VideoFormat::PixelFormat pixfmt) const Q_DECL_OVERRIDE; | ||
OpenGLVideo* opengl() const Q_DECL_OVERRIDE; | ||
|
||
QObject *source() const; | ||
void setSource(QObject *source); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2015-2016 Wang Bin <[email protected]> | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2015) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -119,6 +119,11 @@ bool QuickFBORenderer::isSupported(VideoFormat::PixelFormat pixfmt) const | |
return OpenGLVideo::isSupported(pixfmt); | ||
} | ||
|
||
OpenGLVideo* QuickFBORenderer::opengl() const | ||
{ | ||
return const_cast<OpenGLVideo*>(&d_func().glv); | ||
} | ||
|
||
bool QuickFBORenderer::receiveFrame(const VideoFrame &frame) | ||
{ | ||
DPTR_D(QuickFBORenderer); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2014-2016 Wang Bin <[email protected]> | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2014) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -47,6 +47,7 @@ class Q_AV_EXPORT OpenGLRendererBase : public VideoRenderer | |
public: | ||
virtual ~OpenGLRendererBase(); | ||
bool isSupported(VideoFormat::PixelFormat pixfmt) const Q_DECL_OVERRIDE; | ||
OpenGLVideo* opengl() const Q_DECL_OVERRIDE; | ||
protected: | ||
virtual bool receiveFrame(const VideoFrame& frame) Q_DECL_OVERRIDE; | ||
//called in paintEvent before drawFrame() when required | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2014-2016 Wang Bin <[email protected]> | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2014) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -69,6 +69,11 @@ bool OpenGLRendererBase::isSupported(VideoFormat::PixelFormat pixfmt) const | |
return OpenGLVideo::isSupported(pixfmt); | ||
} | ||
|
||
OpenGLVideo* OpenGLRendererBase::opengl() const | ||
{ | ||
return const_cast<OpenGLVideo*>(&d_func().glv); | ||
} | ||
|
||
bool OpenGLRendererBase::receiveFrame(const VideoFrame& frame) | ||
{ | ||
DPTR_D(OpenGLRendererBase); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters