diff options
| author | Gerhard de Clercq <gerharddeclercq@outlook.com> | 2015-12-16 07:14:39 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-12-18 13:12:53 +0100 |
| commit | 2aa63cc542656f3db138ca161e375c33afd275db (patch) | |
| tree | dae2237fd4640814f12c09e7b1280add04abdc90 | |
| parent | a610beeee7dd973e544dc67e3598977f5f050b76 (diff) | |
| download | meta-qt5-fido-next.tar.gz | |
gstreamer1.0-patch: fixed breaking of 0.1 supportupstream/fido-nextfido-next
The old patch that added support for gstreamer 1.0 broke support for 0.1.
This new patch tries to support both.
Signed-off-by: Gerhard de Clercq <gerharddeclercq@outlook.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | recipes-qt/qt5/qtmultimedia/0001-Initial-porting-effort-to-GStreamer-1.0.patch | 107 |
1 files changed, 56 insertions, 51 deletions
diff --git a/recipes-qt/qt5/qtmultimedia/0001-Initial-porting-effort-to-GStreamer-1.0.patch b/recipes-qt/qt5/qtmultimedia/0001-Initial-porting-effort-to-GStreamer-1.0.patch index e2a46df6..9ad6f4af 100644 --- a/recipes-qt/qt5/qtmultimedia/0001-Initial-porting-effort-to-GStreamer-1.0.patch +++ b/recipes-qt/qt5/qtmultimedia/0001-Initial-porting-effort-to-GStreamer-1.0.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 8b306a5a70d431b8e142b3a7efb32d897cb79ab5 Mon Sep 17 00:00:00 2001 | 1 | From d7e8fb5532d36fc31d1440e13237524e75ab77c0 Mon Sep 17 00:00:00 2001 |
| 2 | From: Yoann Lopes <yoann.lopes@digia.com> | 2 | From: Yoann Lopes <yoann.lopes@digia.com> |
| 3 | Date: Thu, 31 Oct 2013 15:06:30 +0100 | 3 | Date: Thu, 31 Oct 2013 15:06:30 +0100 |
| 4 | Subject: [PATCH] Initial porting effort to GStreamer 1.0. | 4 | Subject: [PATCH] Initial porting effort to GStreamer 1.0. |
| @@ -31,12 +31,12 @@ Conflicts: | |||
| 31 | src/gsttools/gsttools.pro | 22 +-- | 31 | src/gsttools/gsttools.pro | 22 +-- |
| 32 | src/gsttools/gstvideoconnector.c | 199 +++++++++++++++++++-- | 32 | src/gsttools/gstvideoconnector.c | 199 +++++++++++++++++++-- |
| 33 | src/gsttools/qgstappsrc.cpp | 29 ++- | 33 | src/gsttools/qgstappsrc.cpp | 29 ++- |
| 34 | src/gsttools/qgstreameraudioprobecontrol.cpp | 19 +- | 34 | src/gsttools/qgstreameraudioprobecontrol.cpp | 18 ++ |
| 35 | src/gsttools/qgstreamerbushelper.cpp | 8 + | 35 | src/gsttools/qgstreamerbushelper.cpp | 8 + |
| 36 | src/gsttools/qgstreamervideoprobecontrol.cpp | 9 + | 36 | src/gsttools/qgstreamervideoprobecontrol.cpp | 9 + |
| 37 | src/gsttools/qgstreamervideorenderer.cpp | 3 +- | 37 | src/gsttools/qgstreamervideorenderer.cpp | 3 +- |
| 38 | src/gsttools/qgstreamervideowidget.cpp | 29 ++- | 38 | src/gsttools/qgstreamervideowidget.cpp | 29 ++- |
| 39 | src/gsttools/qgstreamervideowindow.cpp | 79 +++++++- | 39 | src/gsttools/qgstreamervideowindow.cpp | 80 ++++++++- |
| 40 | src/gsttools/qgstutils.cpp | 27 ++- | 40 | src/gsttools/qgstutils.cpp | 27 ++- |
| 41 | src/gsttools/qgstvideobuffer.cpp | 18 +- | 41 | src/gsttools/qgstvideobuffer.cpp | 18 +- |
| 42 | src/gsttools/qvideosurfacegstsink.cpp | 136 +++++++++++++- | 42 | src/gsttools/qvideosurfacegstsink.cpp | 136 +++++++++++++- |
| @@ -47,7 +47,7 @@ Conflicts: | |||
| 47 | src/multimedia/gsttools_headers/qgstutils_p.h | 4 + | 47 | src/multimedia/gsttools_headers/qgstutils_p.h | 4 + |
| 48 | .../gsttools_headers/qgstvideobuffer_p.h | 3 + | 48 | .../gsttools_headers/qgstvideobuffer_p.h | 3 + |
| 49 | .../gsttools_headers/qvideosurfacegstsink_p.h | 6 +- | 49 | .../gsttools_headers/qvideosurfacegstsink_p.h | 6 +- |
| 50 | .../qgstreameraudiodecoderserviceplugin.cpp | 27 ++- | 50 | .../qgstreameraudiodecoderserviceplugin.cpp | 29 ++- |
| 51 | .../audiodecoder/qgstreameraudiodecodersession.cpp | 33 +++- | 51 | .../audiodecoder/qgstreameraudiodecodersession.cpp | 33 +++- |
| 52 | .../gstreamer/camerabin/camerabinsession.cpp | 25 +++ | 52 | .../gstreamer/camerabin/camerabinsession.cpp | 25 +++ |
| 53 | src/plugins/gstreamer/common.pri | 21 ++- | 53 | src/plugins/gstreamer/common.pri | 21 ++- |
| @@ -56,10 +56,10 @@ Conflicts: | |||
| 56 | src/plugins/gstreamer/mediaplayer/mediaplayer.pro | 1 - | 56 | src/plugins/gstreamer/mediaplayer/mediaplayer.pro | 1 - |
| 57 | .../mediaplayer/qgstreamerplayercontrol.cpp | 2 + | 57 | .../mediaplayer/qgstreamerplayercontrol.cpp | 2 + |
| 58 | .../mediaplayer/qgstreamerplayerservice.cpp | 9 +- | 58 | .../mediaplayer/qgstreamerplayerservice.cpp | 9 +- |
| 59 | .../mediaplayer/qgstreamerplayerserviceplugin.cpp | 27 ++- | 59 | .../mediaplayer/qgstreamerplayerserviceplugin.cpp | 31 +++- |
| 60 | .../mediaplayer/qgstreamerplayersession.cpp | 154 ++++++++++++++-- | 60 | .../mediaplayer/qgstreamerplayersession.cpp | 152 ++++++++++++++-- |
| 61 | .../mediaplayer/qgstreamerplayersession.h | 9 + | 61 | .../mediaplayer/qgstreamerplayersession.h | 9 + |
| 62 | 36 files changed, 871 insertions(+), 129 deletions(-) | 62 | 36 files changed, 879 insertions(+), 125 deletions(-) |
| 63 | 63 | ||
| 64 | diff --git a/config.tests/gstreamer/gstreamer.pro b/config.tests/gstreamer/gstreamer.pro | 64 | diff --git a/config.tests/gstreamer/gstreamer.pro b/config.tests/gstreamer/gstreamer.pro |
| 65 | index 02a7e34..6b9843a 100644 | 65 | index 02a7e34..6b9843a 100644 |
| @@ -245,7 +245,7 @@ index 7c809a7..6b9bf5d 100644 | |||
| 245 | 245 | ||
| 246 | config_linux_v4l: DEFINES += USE_V4L | 246 | config_linux_v4l: DEFINES += USE_V4L |
| 247 | diff --git a/src/gsttools/gstvideoconnector.c b/src/gsttools/gstvideoconnector.c | 247 | diff --git a/src/gsttools/gstvideoconnector.c b/src/gsttools/gstvideoconnector.c |
| 248 | index 3ed539e..ed0ed3c 100644 | 248 | index 3ed539e..f14e68d 100644 |
| 249 | --- a/src/gsttools/gstvideoconnector.c | 249 | --- a/src/gsttools/gstvideoconnector.c |
| 250 | +++ b/src/gsttools/gstvideoconnector.c | 250 | +++ b/src/gsttools/gstvideoconnector.c |
| 251 | @@ -59,26 +59,93 @@ GST_STATIC_PAD_TEMPLATE ("src", | 251 | @@ -59,26 +59,93 @@ GST_STATIC_PAD_TEMPLATE ("src", |
| @@ -486,12 +486,15 @@ index 3ed539e..ed0ed3c 100644 | |||
| 486 | 486 | ||
| 487 | GstVideoConnector *element = GST_VIDEO_CONNECTOR (object); | 487 | GstVideoConnector *element = GST_VIDEO_CONNECTOR (object); |
| 488 | 488 | ||
| 489 | @@ -327,16 +456,23 @@ static gboolean gst_video_connector_new_buffer_probe(GstObject *pad, GstBuffer * | 489 | @@ -327,16 +456,27 @@ static gboolean gst_video_connector_new_buffer_probe(GstObject *pad, GstBuffer * |
| 490 | if (element->relinked) | 490 | if (element->relinked) |
| 491 | GST_LOG_OBJECT(element, "rejected buffer because of new segment request"); | 491 | GST_LOG_OBJECT(element, "rejected buffer because of new segment request"); |
| 492 | 492 | ||
| 493 | - return !element->relinked; | 493 | +#if GST_CHECK_VERSION(1,0,0) |
| 494 | + return element->relinked ? GST_PAD_PROBE_DROP : GST_PAD_PROBE_OK; | 494 | + return element->relinked ? GST_PAD_PROBE_DROP : GST_PAD_PROBE_OK; |
| 495 | +#else | ||
| 496 | return !element->relinked; | ||
| 497 | +#endif | ||
| 495 | } | 498 | } |
| 496 | 499 | ||
| 497 | - | 500 | - |
| @@ -512,7 +515,7 @@ index 3ed539e..ed0ed3c 100644 | |||
| 512 | element = GST_VIDEO_CONNECTOR (gst_pad_get_parent (pad)); | 515 | element = GST_VIDEO_CONNECTOR (gst_pad_get_parent (pad)); |
| 513 | 516 | ||
| 514 | do { | 517 | do { |
| 515 | @@ -348,20 +484,29 @@ gst_video_connector_chain (GstPad * pad, GstBuffer * buf) | 518 | @@ -348,20 +488,29 @@ gst_video_connector_chain (GstPad * pad, GstBuffer * buf) |
| 516 | */ | 519 | */ |
| 517 | while (element->relinked) { | 520 | while (element->relinked) { |
| 518 | element->relinked = FALSE; | 521 | element->relinked = FALSE; |
| @@ -544,7 +547,7 @@ index 3ed539e..ed0ed3c 100644 | |||
| 544 | 547 | ||
| 545 | GST_DEBUG_OBJECT (element, "Pushing new segment event"); | 548 | GST_DEBUG_OBJECT (element, "Pushing new segment event"); |
| 546 | if (!gst_pad_push_event (element->srcpad, ev)) { | 549 | if (!gst_pad_push_event (element->srcpad, ev)) { |
| 547 | @@ -424,8 +569,11 @@ gst_video_connector_change_state (GstElement * element, | 550 | @@ -424,8 +573,11 @@ gst_video_connector_change_state (GstElement * element, |
| 548 | GstStateChangeReturn result; | 551 | GstStateChangeReturn result; |
| 549 | 552 | ||
| 550 | connector = GST_VIDEO_CONNECTOR(element); | 553 | connector = GST_VIDEO_CONNECTOR(element); |
| @@ -557,7 +560,7 @@ index 3ed539e..ed0ed3c 100644 | |||
| 557 | switch (transition) { | 560 | switch (transition) { |
| 558 | case GST_STATE_CHANGE_PAUSED_TO_READY: | 561 | case GST_STATE_CHANGE_PAUSED_TO_READY: |
| 559 | gst_video_connector_reset (connector); | 562 | gst_video_connector_reset (connector); |
| 560 | @@ -440,9 +588,32 @@ gst_video_connector_change_state (GstElement * element, | 563 | @@ -440,8 +592,29 @@ gst_video_connector_change_state (GstElement * element, |
| 561 | return result; | 564 | return result; |
| 562 | } | 565 | } |
| 563 | 566 | ||
| @@ -587,12 +590,9 @@ index 3ed539e..ed0ed3c 100644 | |||
| 587 | +static gboolean gst_video_connector_handle_sink_event (GstPad * pad, | 590 | +static gboolean gst_video_connector_handle_sink_event (GstPad * pad, |
| 588 | + GstEvent * event) | 591 | + GstEvent * event) |
| 589 | { | 592 | { |
| 590 | + (void)parent; | ||
| 591 | + | ||
| 592 | if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) { | 593 | if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) { |
| 593 | GstVideoConnector *element = GST_VIDEO_CONNECTOR (gst_pad_get_parent (pad)); | 594 | GstVideoConnector *element = GST_VIDEO_CONNECTOR (gst_pad_get_parent (pad)); |
| 594 | 595 | @@ -453,7 +626,6 @@ gst_video_connector_handle_sink_event (GstPad * pad, GstEvent * event) | |
| 595 | @@ -453,7 +624,6 @@ gst_video_connector_handle_sink_event (GstPad * pad, GstEvent * event) | ||
| 596 | 596 | ||
| 597 | gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format, | 597 | gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format, |
| 598 | &start, &stop, &time); | 598 | &start, &stop, &time); |
| @@ -600,7 +600,7 @@ index 3ed539e..ed0ed3c 100644 | |||
| 600 | GST_LOG_OBJECT (element, | 600 | GST_LOG_OBJECT (element, |
| 601 | "NEWSEGMENT update %d, rate %lf, applied rate %lf, " | 601 | "NEWSEGMENT update %d, rate %lf, applied rate %lf, " |
| 602 | "format %d, " "%" G_GINT64_FORMAT " -- %" G_GINT64_FORMAT ", time %" | 602 | "format %d, " "%" G_GINT64_FORMAT " -- %" G_GINT64_FORMAT ", time %" |
| 603 | @@ -461,9 +631,10 @@ gst_video_connector_handle_sink_event (GstPad * pad, GstEvent * event) | 603 | @@ -461,9 +633,10 @@ gst_video_connector_handle_sink_event (GstPad * pad, GstEvent * event) |
| 604 | 604 | ||
| 605 | gst_segment_set_newsegment_full (&element->segment, update, | 605 | gst_segment_set_newsegment_full (&element->segment, update, |
| 606 | rate, arate, format, start, stop, time); | 606 | rate, arate, format, start, stop, time); |
| @@ -666,10 +666,10 @@ index 561a96f..d5e106f 100644 | |||
| 666 | } else { | 666 | } else { |
| 667 | sendEOS(); | 667 | sendEOS(); |
| 668 | diff --git a/src/gsttools/qgstreameraudioprobecontrol.cpp b/src/gsttools/qgstreameraudioprobecontrol.cpp | 668 | diff --git a/src/gsttools/qgstreameraudioprobecontrol.cpp b/src/gsttools/qgstreameraudioprobecontrol.cpp |
| 669 | index 3baca53..be3de3f 100644 | 669 | index 3baca53..497fafe 100644 |
| 670 | --- a/src/gsttools/qgstreameraudioprobecontrol.cpp | 670 | --- a/src/gsttools/qgstreameraudioprobecontrol.cpp |
| 671 | +++ b/src/gsttools/qgstreameraudioprobecontrol.cpp | 671 | +++ b/src/gsttools/qgstreameraudioprobecontrol.cpp |
| 672 | @@ -45,9 +45,14 @@ QGstreamerAudioProbeControl::~QGstreamerAudioProbeControl() | 672 | @@ -45,9 +45,15 @@ QGstreamerAudioProbeControl::~QGstreamerAudioProbeControl() |
| 673 | 673 | ||
| 674 | } | 674 | } |
| 675 | 675 | ||
| @@ -679,13 +679,13 @@ index 3baca53..be3de3f 100644 | |||
| 679 | +#else | 679 | +#else |
| 680 | void QGstreamerAudioProbeControl::bufferProbed(GstBuffer* buffer) | 680 | void QGstreamerAudioProbeControl::bufferProbed(GstBuffer* buffer) |
| 681 | { | 681 | { |
| 682 | - GstCaps* caps = gst_buffer_get_caps(buffer); | ||
| 683 | + gst_buffer_get_caps(buffer); | 682 | + gst_buffer_get_caps(buffer); |
| 683 | GstCaps* caps = gst_buffer_get_caps(buffer); | ||
| 684 | +#endif | 684 | +#endif |
| 685 | if (!caps) | 685 | if (!caps) |
| 686 | return; | 686 | return; |
| 687 | 687 | ||
| 688 | @@ -56,8 +61,20 @@ void QGstreamerAudioProbeControl::bufferProbed(GstBuffer* buffer) | 688 | @@ -56,8 +62,20 @@ void QGstreamerAudioProbeControl::bufferProbed(GstBuffer* buffer) |
| 689 | if (!format.isValid()) | 689 | if (!format.isValid()) |
| 690 | return; | 690 | return; |
| 691 | 691 | ||
| @@ -851,23 +851,24 @@ index b26369a..23674bb 100644 | |||
| 851 | 851 | ||
| 852 | QWidget *QGstreamerVideoWidgetControl::videoWidget() | 852 | QWidget *QGstreamerVideoWidgetControl::videoWidget() |
| 853 | diff --git a/src/gsttools/qgstreamervideowindow.cpp b/src/gsttools/qgstreamervideowindow.cpp | 853 | diff --git a/src/gsttools/qgstreamervideowindow.cpp b/src/gsttools/qgstreamervideowindow.cpp |
| 854 | index a373dcc..587b010 100644 | 854 | index a373dcc..4b08332 100644 |
| 855 | --- a/src/gsttools/qgstreamervideowindow.cpp | 855 | --- a/src/gsttools/qgstreamervideowindow.cpp |
| 856 | +++ b/src/gsttools/qgstreamervideowindow.cpp | 856 | +++ b/src/gsttools/qgstreamervideowindow.cpp |
| 857 | @@ -37,8 +37,12 @@ | 857 | @@ -37,8 +37,13 @@ |
| 858 | #include <QtCore/qdebug.h> | 858 | #include <QtCore/qdebug.h> |
| 859 | 859 | ||
| 860 | #include <gst/gst.h> | 860 | #include <gst/gst.h> |
| 861 | +#include <gst/video/videooverlay.h> | ||
| 862 | + | 861 | + |
| 863 | +#if !GST_CHECK_VERSION(1,0,0) | 862 | +#if !GST_CHECK_VERSION(1,0,0) |
| 864 | #include <gst/interfaces/xoverlay.h> | 863 | #include <gst/interfaces/xoverlay.h> |
| 865 | #include <gst/interfaces/propertyprobe.h> | 864 | #include <gst/interfaces/propertyprobe.h> |
| 865 | +#else | ||
| 866 | +#include <gst/video/videooverlay.h> | ||
| 866 | +#endif | 867 | +#endif |
| 867 | 868 | ||
| 868 | 869 | ||
| 869 | QGstreamerVideoWindow::QGstreamerVideoWindow(QObject *parent, const char *elementName) | 870 | QGstreamerVideoWindow::QGstreamerVideoWindow(QObject *parent, const char *elementName) |
| 870 | @@ -49,18 +53,25 @@ QGstreamerVideoWindow::QGstreamerVideoWindow(QObject *parent, const char *elemen | 871 | @@ -49,18 +54,25 @@ QGstreamerVideoWindow::QGstreamerVideoWindow(QObject *parent, const char *elemen |
| 871 | , m_fullScreen(false) | 872 | , m_fullScreen(false) |
| 872 | , m_colorKey(QColor::Invalid) | 873 | , m_colorKey(QColor::Invalid) |
| 873 | { | 874 | { |
| @@ -895,7 +896,7 @@ index a373dcc..587b010 100644 | |||
| 895 | } | 896 | } |
| 896 | 897 | ||
| 897 | QGstreamerVideoWindow::~QGstreamerVideoWindow() | 898 | QGstreamerVideoWindow::~QGstreamerVideoWindow() |
| 898 | @@ -82,11 +93,15 @@ void QGstreamerVideoWindow::setWinId(WId id) | 899 | @@ -82,11 +94,15 @@ void QGstreamerVideoWindow::setWinId(WId id) |
| 899 | WId oldId = m_windowId; | 900 | WId oldId = m_windowId; |
| 900 | 901 | ||
| 901 | m_windowId = id; | 902 | m_windowId = id; |
| @@ -913,7 +914,7 @@ index a373dcc..587b010 100644 | |||
| 913 | if (!oldId) | 914 | if (!oldId) |
| 914 | emit readyChanged(true); | 915 | emit readyChanged(true); |
| 915 | 916 | ||
| 916 | @@ -97,7 +112,20 @@ void QGstreamerVideoWindow::setWinId(WId id) | 917 | @@ -97,7 +113,20 @@ void QGstreamerVideoWindow::setWinId(WId id) |
| 917 | bool QGstreamerVideoWindow::processSyncMessage(const QGstreamerMessage &message) | 918 | bool QGstreamerVideoWindow::processSyncMessage(const QGstreamerMessage &message) |
| 918 | { | 919 | { |
| 919 | GstMessage* gm = message.rawMessage(); | 920 | GstMessage* gm = message.rawMessage(); |
| @@ -934,7 +935,7 @@ index a373dcc..587b010 100644 | |||
| 934 | if ((GST_MESSAGE_TYPE(gm) == GST_MESSAGE_ELEMENT) && | 935 | if ((GST_MESSAGE_TYPE(gm) == GST_MESSAGE_ELEMENT) && |
| 935 | gst_structure_has_name(gm->structure, "prepare-xwindow-id") && | 936 | gst_structure_has_name(gm->structure, "prepare-xwindow-id") && |
| 936 | m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) { | 937 | m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) { |
| 937 | @@ -110,7 +138,7 @@ bool QGstreamerVideoWindow::processSyncMessage(const QGstreamerMessage &message) | 938 | @@ -110,7 +139,7 @@ bool QGstreamerVideoWindow::processSyncMessage(const QGstreamerMessage &message) |
| 938 | 939 | ||
| 939 | return true; | 940 | return true; |
| 940 | } | 941 | } |
| @@ -943,7 +944,7 @@ index a373dcc..587b010 100644 | |||
| 943 | return false; | 944 | return false; |
| 944 | } | 945 | } |
| 945 | 946 | ||
| 946 | @@ -122,7 +150,19 @@ QRect QGstreamerVideoWindow::displayRect() const | 947 | @@ -122,7 +151,19 @@ QRect QGstreamerVideoWindow::displayRect() const |
| 947 | void QGstreamerVideoWindow::setDisplayRect(const QRect &rect) | 948 | void QGstreamerVideoWindow::setDisplayRect(const QRect &rect) |
| 948 | { | 949 | { |
| 949 | m_displayRect = rect; | 950 | m_displayRect = rect; |
| @@ -964,7 +965,7 @@ index a373dcc..587b010 100644 | |||
| 964 | if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) { | 965 | if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) { |
| 965 | #if GST_VERSION_MICRO >= 29 | 966 | #if GST_VERSION_MICRO >= 29 |
| 966 | if (m_displayRect.isEmpty()) | 967 | if (m_displayRect.isEmpty()) |
| 967 | @@ -136,6 +176,7 @@ void QGstreamerVideoWindow::setDisplayRect(const QRect &rect) | 968 | @@ -136,6 +177,7 @@ void QGstreamerVideoWindow::setDisplayRect(const QRect &rect) |
| 968 | repaint(); | 969 | repaint(); |
| 969 | #endif | 970 | #endif |
| 970 | } | 971 | } |
| @@ -972,7 +973,7 @@ index a373dcc..587b010 100644 | |||
| 972 | } | 973 | } |
| 973 | 974 | ||
| 974 | Qt::AspectRatioMode QGstreamerVideoWindow::aspectRatioMode() const | 975 | Qt::AspectRatioMode QGstreamerVideoWindow::aspectRatioMode() const |
| 975 | @@ -157,6 +198,16 @@ void QGstreamerVideoWindow::setAspectRatioMode(Qt::AspectRatioMode mode) | 976 | @@ -157,6 +199,16 @@ void QGstreamerVideoWindow::setAspectRatioMode(Qt::AspectRatioMode mode) |
| 976 | 977 | ||
| 977 | void QGstreamerVideoWindow::repaint() | 978 | void QGstreamerVideoWindow::repaint() |
| 978 | { | 979 | { |
| @@ -989,7 +990,7 @@ index a373dcc..587b010 100644 | |||
| 989 | if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) { | 990 | if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) { |
| 990 | //don't call gst_x_overlay_expose if the sink is in null state | 991 | //don't call gst_x_overlay_expose if the sink is in null state |
| 991 | GstState state = GST_STATE_NULL; | 992 | GstState state = GST_STATE_NULL; |
| 992 | @@ -165,6 +216,7 @@ void QGstreamerVideoWindow::repaint() | 993 | @@ -165,6 +217,7 @@ void QGstreamerVideoWindow::repaint() |
| 993 | gst_x_overlay_expose(GST_X_OVERLAY(m_videoSink)); | 994 | gst_x_overlay_expose(GST_X_OVERLAY(m_videoSink)); |
| 994 | } | 995 | } |
| 995 | } | 996 | } |
| @@ -997,7 +998,7 @@ index a373dcc..587b010 100644 | |||
| 997 | } | 998 | } |
| 998 | 999 | ||
| 999 | QColor QGstreamerVideoWindow::colorKey() const | 1000 | QColor QGstreamerVideoWindow::colorKey() const |
| 1000 | @@ -296,11 +348,22 @@ QSize QGstreamerVideoWindow::nativeSize() const | 1001 | @@ -296,11 +349,22 @@ QSize QGstreamerVideoWindow::nativeSize() const |
| 1001 | return m_nativeSize; | 1002 | return m_nativeSize; |
| 1002 | } | 1003 | } |
| 1003 | 1004 | ||
| @@ -1020,7 +1021,7 @@ index a373dcc..587b010 100644 | |||
| 1020 | } | 1021 | } |
| 1021 | 1022 | ||
| 1022 | void QGstreamerVideoWindow::updateNativeVideoSize() | 1023 | void QGstreamerVideoWindow::updateNativeVideoSize() |
| 1023 | @@ -311,7 +374,11 @@ void QGstreamerVideoWindow::updateNativeVideoSize() | 1024 | @@ -311,7 +375,11 @@ void QGstreamerVideoWindow::updateNativeVideoSize() |
| 1024 | if (m_videoSink) { | 1025 | if (m_videoSink) { |
| 1025 | //find video native size to update video widget size hint | 1026 | //find video native size to update video widget size hint |
| 1026 | GstPad *pad = gst_element_get_static_pad(m_videoSink,"sink"); | 1027 | GstPad *pad = gst_element_get_static_pad(m_videoSink,"sink"); |
| @@ -1561,10 +1562,10 @@ index 11b305d..01935f7 100644 | |||
| 1561 | 1562 | ||
| 1562 | static GstFlowReturn buffer_alloc( | 1563 | static GstFlowReturn buffer_alloc( |
| 1563 | diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp | 1564 | diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp |
| 1564 | index 3098aab..9c54663 100644 | 1565 | index 3098aab..6aa8c89 100644 |
| 1565 | --- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp | 1566 | --- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp |
| 1566 | +++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp | 1567 | +++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp |
| 1567 | @@ -74,29 +74,42 @@ void QGstreamerAudioDecoderServicePlugin::updateSupportedMimeTypes() const | 1568 | @@ -74,29 +74,46 @@ void QGstreamerAudioDecoderServicePlugin::updateSupportedMimeTypes() const |
| 1568 | gst_init(NULL, NULL); | 1569 | gst_init(NULL, NULL); |
| 1569 | 1570 | ||
| 1570 | GList *plugins, *orig_plugins; | 1571 | GList *plugins, *orig_plugins; |
| @@ -1583,14 +1584,17 @@ index 3098aab..9c54663 100644 | |||
| 1583 | +#if GST_CHECK_VERSION(1,0,0) | 1584 | +#if GST_CHECK_VERSION(1,0,0) |
| 1584 | + if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED)) | 1585 | + if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED)) |
| 1585 | + continue; | 1586 | + continue; |
| 1587 | + | ||
| 1588 | + GstRegistry *registry = gst_registry_get(); | ||
| 1586 | +#else | 1589 | +#else |
| 1587 | if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED | 1590 | if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED |
| 1588 | continue; | 1591 | continue; |
| 1589 | - | 1592 | |
| 1590 | - orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get_default (), | 1593 | - orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get_default (), |
| 1591 | - plugin->desc.name); | 1594 | - plugin->desc.name); |
| 1595 | + GstRegistry *registry = gst_registry_get_default(); | ||
| 1592 | +#endif | 1596 | +#endif |
| 1593 | + orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get (), | 1597 | + orig_features = features = gst_registry_get_feature_list_by_plugin(registry, |
| 1594 | + gst_plugin_get_name(plugin)); | 1598 | + gst_plugin_get_name(plugin)); |
| 1595 | while (features) { | 1599 | while (features) { |
| 1596 | if (!G_UNLIKELY(features->data == NULL)) { | 1600 | if (!G_UNLIKELY(features->data == NULL)) { |
| @@ -1889,7 +1893,7 @@ index ddc828e..00bee36 100644 | |||
| 1889 | m_videoRenderer = new QGstreamerVideoRenderer(this); | 1893 | m_videoRenderer = new QGstreamerVideoRenderer(this); |
| 1890 | #endif | 1894 | #endif |
| 1891 | diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp | 1895 | diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp |
| 1892 | index 7d20b6d..bf2f9f8 100644 | 1896 | index 7d20b6d..ea804af 100644 |
| 1893 | --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp | 1897 | --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp |
| 1894 | +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp | 1898 | +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp |
| 1895 | @@ -87,7 +87,11 @@ void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const | 1899 | @@ -87,7 +87,11 @@ void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const |
| @@ -1904,21 +1908,25 @@ index 7d20b6d..bf2f9f8 100644 | |||
| 1904 | 1908 | ||
| 1905 | while (plugins) { | 1909 | while (plugins) { |
| 1906 | GList *features, *orig_features; | 1910 | GList *features, *orig_features; |
| 1907 | @@ -95,22 +99,33 @@ void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const | 1911 | @@ -95,22 +99,37 @@ void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const |
| 1908 | GstPlugin *plugin = (GstPlugin *) (plugins->data); | 1912 | GstPlugin *plugin = (GstPlugin *) (plugins->data); |
| 1909 | plugins = g_list_next (plugins); | 1913 | plugins = g_list_next (plugins); |
| 1910 | 1914 | ||
| 1911 | +#if GST_CHECK_VERSION(1,0,0) | 1915 | +#if GST_CHECK_VERSION(1,0,0) |
| 1912 | + if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED)) | 1916 | + if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED)) |
| 1913 | + continue; | 1917 | + continue; |
| 1918 | + | ||
| 1919 | + GstRegistry *registry = gst_registry_get(); | ||
| 1914 | +#else | 1920 | +#else |
| 1915 | if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED | 1921 | if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED |
| 1916 | continue; | 1922 | continue; |
| 1917 | +#endif | ||
| 1918 | 1923 | ||
| 1919 | - orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get_default (), | 1924 | - orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get_default (), |
| 1920 | - plugin->desc.name); | 1925 | - plugin->desc.name); |
| 1921 | + orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get(), | 1926 | + GstRegistry *registry = gst_registry_get_default(); |
| 1927 | +#endif | ||
| 1928 | + | ||
| 1929 | + orig_features = features = gst_registry_get_feature_list_by_plugin(registry, | ||
| 1922 | + gst_plugin_get_name(plugin)); | 1930 | + gst_plugin_get_name(plugin)); |
| 1923 | while (features) { | 1931 | while (features) { |
| 1924 | if (!G_UNLIKELY(features->data == NULL)) { | 1932 | if (!G_UNLIKELY(features->data == NULL)) { |
| @@ -1945,7 +1953,7 @@ index 7d20b6d..bf2f9f8 100644 | |||
| 1945 | GstStaticPadTemplate *padtemplate = (GstStaticPadTemplate*)(pads->data); | 1953 | GstStaticPadTemplate *padtemplate = (GstStaticPadTemplate*)(pads->data); |
| 1946 | pads = g_list_next (pads); | 1954 | pads = g_list_next (pads); |
| 1947 | diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp | 1955 | diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp |
| 1948 | index 15924a6..8013d0d 100644 | 1956 | index 15924a6..f77220a 100644 |
| 1949 | --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp | 1957 | --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp |
| 1950 | +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp | 1958 | +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp |
| 1951 | @@ -85,6 +85,16 @@ typedef enum { | 1959 | @@ -85,6 +85,16 @@ typedef enum { |
| @@ -2204,11 +2212,10 @@ index 15924a6..8013d0d 100644 | |||
| 2204 | } | 2212 | } |
| 2205 | 2213 | ||
| 2206 | //listen for queue2 element added to uridecodebin/decodebin2 as well. | 2214 | //listen for queue2 element added to uridecodebin/decodebin2 as well. |
| 2207 | @@ -1727,7 +1798,27 @@ void QGstreamerPlayerSession::removeProbe(QGstreamerVideoProbeControl* probe) | 2215 | @@ -1727,6 +1798,26 @@ void QGstreamerPlayerSession::removeProbe(QGstreamerVideoProbeControl* probe) |
| 2208 | // Assume user releases any outstanding references to video frames. | 2216 | // Assume user releases any outstanding references to video frames. |
| 2209 | } | 2217 | } |
| 2210 | 2218 | ||
| 2211 | -gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data) | ||
| 2212 | +#if GST_CHECK_VERSION(1,0,0) | 2219 | +#if GST_CHECK_VERSION(1,0,0) |
| 2213 | +GstPadProbeReturn QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstPadProbeInfo *info, gpointer user_data) | 2220 | +GstPadProbeReturn QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstPadProbeInfo *info, gpointer user_data) |
| 2214 | +{ | 2221 | +{ |
| @@ -2229,10 +2236,9 @@ index 15924a6..8013d0d 100644 | |||
| 2229 | + | 2236 | + |
| 2230 | +#else | 2237 | +#else |
| 2231 | + | 2238 | + |
| 2232 | +static gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data) | 2239 | gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data) |
| 2233 | { | 2240 | { |
| 2234 | Q_UNUSED(pad); | 2241 | Q_UNUSED(pad); |
| 2235 | |||
| 2236 | @@ -1742,6 +1833,7 @@ gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *bu | 2242 | @@ -1742,6 +1833,7 @@ gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *bu |
| 2237 | 2243 | ||
| 2238 | return TRUE; | 2244 | return TRUE; |
| @@ -2365,5 +2371,4 @@ index f2e760a..50bda3d 100644 | |||
| 2365 | 2371 | ||
| 2366 | QT_END_NAMESPACE | 2372 | QT_END_NAMESPACE |
| 2367 | -- | 2373 | -- |
| 2368 | 2.3.5 | 2374 | 2.6.2 |
| 2369 | |||
