summaryrefslogtreecommitdiffstats
path: root/src/gsttools
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-07-23 15:11:23 +0200
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-08-13 13:26:26 +0000
commitc9533b5aaf4347875b8296cb6210279af9781f8a (patch)
tree56c73df0a2af8f7f9df1ce701c4d955d62f67317 /src/gsttools
parent8b85c5a28e08536d2ddb64ff1dc91bc642dad98d (diff)
GStreamer: added convenience function in QGstUtils.
-> qt_gst_element_get_factory_name(GstElement *elem) Change-Id: Icf806488b49fbcdecdd605b6316bd1ef8796a883 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/gsttools')
-rw-r--r--src/gsttools/qgstutils.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp
index 61ba09e76..b13038c21 100644
--- a/src/gsttools/qgstutils.cpp
+++ b/src/gsttools/qgstutils.cpp
@@ -1453,6 +1453,17 @@ GstCaps *qt_gst_caps_normalize(GstCaps *caps)
#endif
}
+const gchar *qt_gst_element_get_factory_name(GstElement *element)
+{
+ const gchar *name = 0;
+ const GstElementFactory *factory = 0;
+
+ if (element && (factory = gst_element_get_factory(element)))
+ name = gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(factory));
+
+ return name;
+}
+
QDebug operator <<(QDebug debug, GstCaps *caps)
{
if (caps) {