From 108dda7a90bd0f0337358b0db47ae55acd16dea6 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 20 Nov 2014 17:54:18 +0100 Subject: GStreamer: port to 1.0. 0.10 is still used by default. To enable GStreamer 1.0, pass GST_VERSION=1.0 to qmake for qtmultimedia.pro. Contributions from: Andrew den Exter Ilya Smelykh Jim Hodapp Sergio Schvezov Change-Id: I72a46d1170a8794a149bdb5e20767afcc5b7587c Reviewed-by: Andrew den Exter --- src/gsttools/qgstcodecsinfo.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gsttools/qgstcodecsinfo.cpp') diff --git a/src/gsttools/qgstcodecsinfo.cpp b/src/gsttools/qgstcodecsinfo.cpp index f584fbe69..888722aee 100644 --- a/src/gsttools/qgstcodecsinfo.cpp +++ b/src/gsttools/qgstcodecsinfo.cpp @@ -32,7 +32,7 @@ ****************************************************************************/ #include "qgstcodecsinfo_p.h" - +#include "qgstutils_p.h" #include #ifdef QMEDIA_GSTREAMER_CAMERABIN @@ -146,7 +146,7 @@ GstCaps* QGstCodecsInfo::supportedElementCaps(GstElementFactoryListType elementT if (fakeEncoderMimeTypes.contains(gst_structure_get_name(structure))) continue; - GstStructure *newStructure = gst_structure_new(gst_structure_get_name(structure), NULL); + GstStructure *newStructure = qt_gst_structure_new_empty(gst_structure_get_name(structure)); //add structure fields to distinguish between formats with similar mime types, //like audio/mpeg @@ -166,7 +166,11 @@ GstCaps* QGstCodecsInfo::supportedElementCaps(GstElementFactoryListType elementT } } +#if GST_CHECK_VERSION(1,0,0) + res = +#endif gst_caps_merge_structure(res, newStructure); + } gst_caps_unref(caps); } -- cgit v1.2.3