Search
SailfishOS Open Build Service
>
Projects
>
home:tangtao77
>
nemo-qtmultimedia-plugins
> videotexturebackend.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File videotexturebackend.patch of Package nemo-qtmultimedia-plugins
2015.4.17--dengyong reason:#include<private/qgstreamerelementcontrol_p.h>该头文件在qt5.2存在,但是在5.4中不存在,因此对该src原来文件进行修改 diff --git a/src/videotexturebackend/videotexturebackend.cpp b/src/videotexturebackend/videotexturebackend.cpp index 0d2f114..ce5f03a 100644 --- a/src/videotexturebackend/videotexturebackend.cpp +++ b/src/videotexturebackend/videotexturebackend.cpp @@ -45,7 +45,8 @@ #include <QSGTexture> #include <qpa/qplatformnativeinterface.h> -#include <private/qgstreamerelementcontrol_p.h> +//#include <private/qgstreamerelementcontrol_p.h> +#include <QtMultimedia/qmediacontrol.h> #include <EGL/egl.h> #include <EGL/eglext.h> @@ -465,7 +466,10 @@ private: static void frame_ready(GstElement *sink, int frame, void *data); QMutex m_mutex; - QPointer<QGStreamerElementControl> m_control; + //QPointer<QGStreamerElementControl> m_control; + + QPointer<QMediaControl> m_control; + GstElement *m_sink; EGLDisplay m_display; GStreamerVideoTexture *m_texture; @@ -556,10 +560,13 @@ bool NemoVideoTextureBackend::init(QMediaService *service) return false; } - QMediaControl *control = service->requestControl(QGStreamerVideoSinkControl_iid); + //QMediaControl *control = service->requestControl(QGStreamerVideoSinkControl_iid); + QMediaControl *control = service->requestControl("org.qt-project.qt.gstreamervideosinkcontrol/5.0"); if (control) { - m_control = qobject_cast<QGStreamerElementControl *>(control); - if (!m_control) { + //m_control = qobject_cast<QGStreamerElementControl *>(control); + m_control = qobject_cast<QMediaControl *>(control); + + if (!m_control) { service->releaseControl(control); return false; } @@ -568,7 +575,8 @@ bool NemoVideoTextureBackend::init(QMediaService *service) } m_service = service; - m_control->setElement(m_sink); + // m_control->setElement(m_sink); + connect(this, SIGNAL(nativeSizeChanged()), q, SLOT(_q_updateNativeSize())); connect(q, SIGNAL(orientationChanged()), this, SLOT(orientationChanged()));