summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Normand <philn@igalia.com>2018-10-05 12:19:46 +0200
committerPhilippe Normand <philn@igalia.com>2018-10-12 10:08:47 +0100
commitca4b61c55562a4b74f241fe54cf1e5639a2aea25 (patch)
tree8b838644beaeca667f0f9f69839b23f69dd54d23
parenta9370319b67dd60e31361cc32285835a458c96de (diff)
downloadgstreamer-ca4b61c55562a4b74f241fe54cf1e5639a2aea25.tar.gz
gstelementfactory: Add MEDIA_HARDWARE klass classifier
The Harware factory type classifier allows elements (decoders and encoders, mostly) to advertize they rely on hardware devices to perform encoding or decoding operations. This classifier can be used by applications to filter and select only the elements that use hardware devices, for instance to ensure zero-copy support is enabled for a specific pipeline. https://bugzilla.gnome.org/show_bug.cgi?id=796921
-rw-r--r--docs/gst/gstreamer-sections.txt1
-rw-r--r--gst/gstelementfactory.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt
index ecc6b04e5e..6c130a6e66 100644
--- a/docs/gst/gstreamer-sections.txt
+++ b/docs/gst/gstreamer-sections.txt
@@ -1051,6 +1051,7 @@ GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE
GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA
GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE
GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO
+GST_ELEMENT_FACTORY_TYPE_MEDIA_HARDWARE
GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY
GST_ELEMENT_FACTORY_TYPE_MUXER
GST_ELEMENT_FACTORY_TYPE_PARSER
diff --git a/gst/gstelementfactory.h b/gst/gstelementfactory.h
index c66dd3096c..505d9757b1 100644
--- a/gst/gstelementfactory.h
+++ b/gst/gstelementfactory.h
@@ -111,6 +111,7 @@ gboolean gst_element_register (GstPlugin *plug
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE: Elements handling image media types
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE: Elements handling subtitle media types
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA: Elements handling metadata media types
+ * @GST_ELEMENT_FACTORY_TYPE_MEDIA_HARDWARE: Elements interacting with hardware devices, you may need to put the element in "READY" state to test if the hardware is present in the system (Since 1.16)
*
* The type of #GstElementFactory to filter.
*
@@ -142,7 +143,7 @@ typedef guint64 GstElementFactoryListType;
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 51))
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 52))
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 53))
-
+#define GST_ELEMENT_FACTORY_TYPE_MEDIA_HARDWARE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 54))
/**
* GST_ELEMENT_FACTORY_TYPE_ANY: (value 562949953421311) (type GstElementFactoryListType)
*
@@ -209,6 +210,7 @@ typedef guint64 GstElementFactoryListType;
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_IMAGE "Image"
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE "Subtitle"
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_METADATA "Metadata"
+#define GST_ELEMENT_FACTORY_KLASS_MEDIA_HARDWARE "Hardware"
GST_API
gboolean gst_element_factory_list_is_type (GstElementFactory *factory,