diff options
Diffstat (limited to 'src/plugins/gstreamer')
7 files changed, 20 insertions, 24 deletions
diff --git a/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp b/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp index 3a921ece0..2ff0bd8d0 100644 --- a/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp @@ -34,6 +34,7 @@ #include "camerabinaudioencoder.h" #include "camerabincontainer.h" #include <private/qgstcodecsinfo_p.h> +#include <private/qgstutils_p.h> #include <QtCore/qdebug.h> @@ -120,8 +121,7 @@ GstEncodingProfile *CameraBinAudioEncoder::createProfile() void CameraBinAudioEncoder::applySettings(GstElement *encoder) { GObjectClass * const objectClass = G_OBJECT_GET_CLASS(encoder); - const char * const name = gst_plugin_feature_get_name( - GST_PLUGIN_FEATURE(gst_element_get_factory(encoder))); + const char * const name = qt_gst_element_get_factory_name(encoder); const bool isVorbis = qstrcmp(name, "vorbisenc") == 0; diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.cpp b/src/plugins/gstreamer/camerabin/camerabinservice.cpp index 25fd44817..a22301e2e 100644 --- a/src/plugins/gstreamer/camerabin/camerabinservice.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinservice.cpp @@ -124,8 +124,8 @@ CameraBinService::CameraBinService(GstElementFactory *sourceFactory, QObject *pa #else m_videoWindow = new QGstreamerVideoWindow(this); #endif - // If the GStreamer sink element is not available (xvimagesink), don't provide - // the video window control since it won't work anyway. + // If the GStreamer video sink is not available, don't provide the video window control since + // it won't work anyway. if (!m_videoWindow->videoSink()) { delete m_videoWindow; m_videoWindow = 0; @@ -133,9 +133,8 @@ CameraBinService::CameraBinService(GstElementFactory *sourceFactory, QObject *pa #if defined(HAVE_WIDGETS) m_videoWidgetControl = new QGstreamerVideoWidgetControl(this); - // If the GStreamer sink element is not available (xvimagesink or ximagesink), don't provide - // the video widget control since it won't work anyway. - // QVideoWidget will fall back to QVideoRendererControl in that case. + // If the GStreamer video sink is not available, don't provide the video widget control since + // it won't work anyway. QVideoWidget will fall back to QVideoRendererControl in that case. if (!m_videoWidgetControl->videoSink()) { delete m_videoWidgetControl; m_videoWidgetControl = 0; diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp index da317740b..a0e9f753b 100644 --- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp @@ -388,7 +388,7 @@ void CameraBinSession::setupCaptureResolution() gst_caps_unref(caps); // Special case when using mfw_v4lsrc - if (m_videoSrc && qstrcmp(gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(gst_element_get_factory(m_videoSrc))), "mfw_v4lsrc") == 0) { + if (m_videoSrc && qstrcmp(qt_gst_element_get_factory_name(m_videoSrc), "mfw_v4lsrc") == 0) { int capMode = 0; if (viewfinderResolution == QSize(320, 240)) capMode = 1; @@ -472,9 +472,7 @@ GstElement *CameraBinSession::buildCameraSource() #if CAMERABIN_DEBUG qDebug() << "set camera device" << m_inputDevice; #endif - const char *const cameraSrcName = gst_plugin_feature_get_name( - GST_PLUGIN_FEATURE(gst_element_get_factory(m_cameraSrc))); - m_usingWrapperCameraBinSrc = qstrcmp(cameraSrcName, "wrappercamerabinsrc") == 0; + m_usingWrapperCameraBinSrc = qstrcmp(qt_gst_element_get_factory_name(m_cameraSrc), "wrappercamerabinsrc") == 0; if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_cameraSrc), "video-source")) { if (!m_videoSrc) { diff --git a/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp b/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp index aad059df0..f80ba4a41 100644 --- a/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp @@ -34,6 +34,7 @@ #include "camerabinvideoencoder.h" #include "camerabinsession.h" #include "camerabincontainer.h" +#include <private/qgstutils_p.h> #include <QtCore/qdebug.h> @@ -178,8 +179,7 @@ GstEncodingProfile *CameraBinVideoEncoder::createProfile() void CameraBinVideoEncoder::applySettings(GstElement *encoder) { GObjectClass * const objectClass = G_OBJECT_GET_CLASS(encoder); - const char * const name = gst_plugin_feature_get_name( - GST_PLUGIN_FEATURE(gst_element_get_factory(encoder))); + const char * const name = qt_gst_element_get_factory_name(encoder); const int bitRate = m_actualVideoSettings.bitRate(); if (bitRate == -1) { diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp index bf9b474d6..a29c1d26f 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp @@ -102,8 +102,8 @@ QGstreamerCaptureService::QGstreamerCaptureService(const QString &service, QObje m_videoRenderer = new QGstreamerVideoRenderer(this); m_videoWindow = new QGstreamerVideoWindow(this); - // If the GStreamer sink element is not available (xvimagesink), don't provide - // the video window control since it won't work anyway. + // If the GStreamer video sink is not available, don't provide the video window control since + // it won't work anyway. if (!m_videoWindow->videoSink()) { delete m_videoWindow; m_videoWindow = 0; @@ -112,9 +112,8 @@ QGstreamerCaptureService::QGstreamerCaptureService(const QString &service, QObje #if defined(HAVE_WIDGETS) m_videoWidgetControl = new QGstreamerVideoWidgetControl(this); - // If the GStreamer sink element is not available (xvimagesink or ximagesink), don't provide - // the video widget control since it won't work anyway. - // QVideoWidget will fall back to QVideoRendererControl in that case. + // If the GStreamer video sink is not available, don't provide the video widget control since + // it won't work anyway. QVideoWidget will fall back to QVideoRendererControl in that case. if (!m_videoWidgetControl->videoSink()) { delete m_videoWidgetControl; m_videoWidgetControl = 0; diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp index 3238e5c21..77d8987f9 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp @@ -776,11 +776,11 @@ void QGstreamerCaptureSession::setState(QGstreamerCaptureSession::State newState if (!m_waitingForEos) { m_waitingForEos = true; //qDebug() << "Waiting for EOS"; + // Unless gstreamer is in GST_STATE_PLAYING our EOS message will not be received. + gst_element_set_state(m_pipeline, GST_STATE_PLAYING); //with live sources it's necessary to send EOS even to pipeline //before going to STOPPED state gst_element_send_event(m_pipeline, gst_event_new_eos()); - // Unless gstreamer is in GST_STATE_PLAYING our EOS message will not be received. - gst_element_set_state(m_pipeline, GST_STATE_PLAYING); return; } else { diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp index 48cbd937a..69250c0b3 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp @@ -99,8 +99,8 @@ QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent): #else m_videoWindow = new QGstreamerVideoWindow(this); #endif - // If the GStreamer sink element is not available (xvimagesink), don't provide - // the video window control since it won't work anyway. + // If the GStreamer video sink is not available, don't provide the video window control since + // it won't work anyway. if (!m_videoWindow->videoSink()) { delete m_videoWindow; m_videoWindow = 0; @@ -109,8 +109,8 @@ QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent): #if defined(HAVE_WIDGETS) m_videoWidget = new QGstreamerVideoWidgetControl(this); - // If the GStreamer sink element is not available (xvimagesink or ximagesink), don't provide - // the video widget control since it won't work anyway. + // If the GStreamer video sink is not available, don't provide the video widget control since + // it won't work anyway. // QVideoWidget will fall back to QVideoRendererControl in that case. if (!m_videoWidget->videoSink()) { delete m_videoWidget; |