diff --git a/python/pyproject.toml b/python/pyproject.toml index 8d1a4ecfd..5f5b2a626 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -30,7 +30,7 @@ libraries = [QTAV_LIB] library-dirs = [LIB_DIRS] [tool.sip.bindings.QtAVWidgets] -qmake-QT = ["widgets", "opengl"] +qmake-QT = ["widgets", "opengl", "openglwidgets"] include-dirs = [INCLUDE_DIRS] libraries = [QTAV_LIB, QTAV_WIDGETS_LIB] library-dirs = [LIB_DIRS] diff --git a/python/sip/QtAV/VideoFormat.sip b/python/sip/QtAV/VideoFormat.sip index 3d2515cd3..394f09e19 100644 --- a/python/sip/QtAV/VideoFormat.sip +++ b/python/sip/QtAV/VideoFormat.sip @@ -104,7 +104,6 @@ public: static QImage::Format imageFormatFromPixelFormat(PixelFormat format); static PixelFormat pixelFormatFromFFmpeg(int ff); //AVPixelFormat static int pixelFormatToFFmpeg(PixelFormat fmt); - static QVector pixelFormatsFFmpeg(); VideoFormat(PixelFormat format = Format_Invalid); VideoFormat(int formatFF /Constrained/); diff --git a/python/sip/QtAVWidgets/GLWidgetRenderer2.sip b/python/sip/QtAVWidgets/GLWidgetRenderer2.sip deleted file mode 100644 index 3f983d6d4..000000000 --- a/python/sip/QtAVWidgets/GLWidgetRenderer2.sip +++ /dev/null @@ -1,64 +0,0 @@ -namespace QtAV -{ - -class GLWidgetRenderer2 : public QGLWidget, public QtAV::OpenGLRendererBase -{ -%TypeHeaderCode -#include -%End - -public: - void setBrightness(qreal brightness); - qreal brightness(); - void setContrast(qreal contrast); - qreal contrast(); - void setHue(qreal hue); - qreal hue(); - void setSaturation(qreal saturation); - qreal saturation(); - void setBackgroundColor(QColor color); - QColor backgroundColor(); - - QRectF regionOfInterest(); - void setRegionOfInterest(QRectF region); - qreal sourceAspectRatio(); - qreal outAspectRatio(); - void setOutAspectRatio(qreal ratio); - OutAspectRatioMode outAspectRatioMode(); - void setOutAspectRatioMode(OutAspectRatioMode mode); - - int orientation(); - void setOrientation(int orientation); - QRect videoRect(); - QSize videoFrameSize(); - -public: - GLWidgetRenderer2(QWidget* parent /TransferThis/ = 0, const QGLWidget* shareWidget = 0, Qt::WindowFlags f = 0); - VideoRendererId id(); - virtual QWidget* widget(); - -signals: - void sourceAspectRatioChanged(qreal value) final; - void regionOfInterestChanged(); - void outAspectRatioChanged(); - void outAspectRatioModeChanged(); - void brightnessChanged(qreal value); - void contrastChanged(qreal); - void hueChanged(qreal); - void saturationChanged(qreal); - void orientationChanged(); - void videoRectChanged(); - void videoFrameSizeChanged(); - void backgroundColorChanged(); - -protected: - virtual void initializeGL(); - virtual void paintGL(); - virtual void resizeGL(int w, int h); - virtual void resizeEvent(QResizeEvent *); // not virtual in QGLWidget (Qt<5.5) - virtual void showEvent(QShowEvent *); - -}; -typedef GLWidgetRenderer2 VideoRendererGLWidget2; - -}; diff --git a/python/sip/QtAVWidgets/QtAVWidgetsmod.sip b/python/sip/QtAVWidgets/QtAVWidgetsmod.sip index 0df00da0c..f42fa3781 100644 --- a/python/sip/QtAVWidgets/QtAVWidgetsmod.sip +++ b/python/sip/QtAVWidgets/QtAVWidgetsmod.sip @@ -3,6 +3,7 @@ %Import QtGui/QtGuimod.sip %Import QtWidgets/QtWidgetsmod.sip %Import QtOpenGL/QtOpenGLmod.sip +%Import QtOpenGLWidgets/QtOpenGLWidgetsmod.sip %Import QtAV/QtAVmod.sip %Timeline {QtAVWidgets_1_11_0 QtAVWidgets_1_12_0} @@ -35,7 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA %Include global.sip %If (FULL_QTWIDGETS_API) -%Include GLWidgetRenderer2.sip %Include GraphicsItemRenderer.sip // NOTE: We don't expose QOpenGLWidget because it is present in Qt >= 5.4.0 %Include OpenGLWidgetRenderer.sip diff --git a/src/libQtAV.pro b/src/libQtAV.pro index c6cbcc374..eaf2419db 100644 --- a/src/libQtAV.pro +++ b/src/libQtAV.pro @@ -3,7 +3,7 @@ MODULE_INCNAME = QtAV # for mac framework. also used in install_sdk.pro TARGET = QtAV QT += core gui #CONFIG *= ltcg -greaterThan(QT_MAJOR_VERSION, 5): QT += opengl +greaterThan(QT_MAJOR_VERSION, 5): QT += opengl openglwidgets greaterThan(QT_MAJOR_VERSION, 4) { contains(QT_CONFIG, opengl) { CONFIG *= config_opengl diff --git a/widgets/QtAVWidgets/OpenGLWidgetRenderer.h b/widgets/QtAVWidgets/OpenGLWidgetRenderer.h index dffc65548..6620762d2 100644 --- a/widgets/QtAVWidgets/OpenGLWidgetRenderer.h +++ b/widgets/QtAVWidgets/OpenGLWidgetRenderer.h @@ -24,7 +24,7 @@ #include #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) -#include +#include #else #include #endif //QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)