diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-20 13:19:36 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-20 13:20:44 +0200 |
commit | ee8aca6c8771a92d558003ea5cf62e5236f21bb5 (patch) | |
tree | af9524ab0ee20930181f590fc6b3fb495028e7fd /src/plugins/gstreamer/mediacapture | |
parent | f5235af0dc3aa433435dbd42b716776097af5acf (diff) | |
parent | 3d3d2a4967ba079a3e6df82cdc89f839865e6649 (diff) |
Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: Ie1e478eca1cdfd99ccd3a3c8a07aefbfa27ccbdb
Diffstat (limited to 'src/plugins/gstreamer/mediacapture')
3 files changed, 15 insertions, 10 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp index 0018209c2..fca38ecf8 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp @@ -77,9 +77,7 @@ static const QGstreamerMetaDataKeyLookup *qt_gstreamerMetaDataKeys() metadataKeys->insert(QMediaMetaData::AlbumTitle, GST_TAG_ALBUM); metadataKeys->insert(QMediaMetaData::AlbumArtist, GST_TAG_ARTIST); metadataKeys->insert(QMediaMetaData::ContributingArtist, GST_TAG_PERFORMER); -#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) metadataKeys->insert(QMediaMetaData::Composer, GST_TAG_COMPOSER); -#endif //metadataKeys->insert(QMediaMetaData::Conductor, 0); //metadataKeys->insert(QMediaMetaData::Lyrics, 0); //metadataKeys->insert(QMediaMetaData::Mood, 0); diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp index a9c66f836..8cbdb6717 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp @@ -113,8 +113,15 @@ QMultimedia::SupportEstimate QGstreamerCaptureServicePlugin::hasSupport(const QS static bool isEncoderOrMuxer(GstElementFactory *factory) { +#if GST_CHECK_VERSION(0, 10, 31) return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_MUXER) || gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_ENCODER); +#else + return (factory + && (qstrcmp(factory->details.klass, "Codec/Encoder/Audio") == 0 + || qstrcmp(factory->details.klass, "Codec/Encoder/Video") == 0 + || qstrcmp(factory->details.klass, "Codec/Muxer") == 0 )); +#endif } void QGstreamerCaptureServicePlugin::updateSupportedMimeTypes() const diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp index 77d8987f9..31ffa5065 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp @@ -628,12 +628,12 @@ bool QGstreamerCaptureSession::rebuildGraph(QGstreamerCaptureSession::PipelineMo } dumpGraph( QString("rebuild_graph_%1_%2").arg(m_pipelineMode).arg(newMode) ); +#ifdef QT_GST_CAPTURE_DEBUG if (m_encodeBin) { QString fileName = QString("rebuild_graph_encode_%1_%2").arg(m_pipelineMode).arg(newMode); -#if !(GST_DISABLE_GST_DEBUG) && (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) - _gst_debug_bin_to_dot_file(GST_BIN(m_encodeBin), GST_DEBUG_GRAPH_SHOW_ALL, fileName.toLatin1()); -#endif + GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_encodeBin), GST_DEBUG_GRAPH_SHOW_ALL, fileName.toLatin1()); } +#endif if (ok) { addAudioBufferProbe(); @@ -657,12 +657,12 @@ bool QGstreamerCaptureSession::rebuildGraph(QGstreamerCaptureSession::PipelineMo void QGstreamerCaptureSession::dumpGraph(const QString &fileName) { -#if !(GST_DISABLE_GST_DEBUG) && (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19) - _gst_debug_bin_to_dot_file(GST_BIN(m_pipeline), - GstDebugGraphDetails(/*GST_DEBUG_GRAPH_SHOW_ALL |*/ GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES), - fileName.toLatin1()); +#ifdef QT_GST_CAPTURE_DEBUG + GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_pipeline), + GstDebugGraphDetails(/*GST_DEBUG_GRAPH_SHOW_ALL |*/ GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES), + fileName.toLatin1()); #else - Q_UNUSED(fileName); + Q_UNUSED(fileName) #endif } |