factory: Add "Timestamper" as new factory type

This will be used by elements that correct timestamps (like the
h264timestamper for example)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3779>
This commit is contained in:
Thibault Saunier 2023-01-24 09:24:03 -03:00 committed by Sebastian Dröge
parent 4c4245d6a8
commit 095a5ba425
2 changed files with 12 additions and 0 deletions

View file

@ -1084,6 +1084,10 @@ gst_element_factory_list_is_type (GstElementFactory * factory,
res = ((strstr (klass, "Parser") != NULL)
&& (strstr (klass, "Codec") != NULL));
if (!res && (type & GST_ELEMENT_FACTORY_TYPE_TIMESTAMPER))
res = ((strstr (klass, "Timestamper") != NULL)
&& (strstr (klass, "Codec") != NULL));
if (!res && (type & GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER))
res = (strstr (klass, "Depayloader") != NULL);

View file

@ -165,6 +165,14 @@ typedef guint64 GstElementFactoryListType;
#define GST_ELEMENT_FACTORY_TYPE_DECRYPTOR ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 10))
#define GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 11))
#define GST_ELEMENT_FACTORY_TYPE_HARDWARE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 12))
/**
* GST_ELEMENT_FACTORY_TYPE_TIMESTAMPER:
*
* Timestamp correcting elements
*
* Since: 1.24
*/
#define GST_ELEMENT_FACTORY_TYPE_TIMESTAMPER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 13))
#define GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 48))