Make the Array of structures private. This should allow us to implement
the array more efficiently or with some preallocated structures when
we want to later.
Add a new method to clean up a static structure so that we can remove some code
that pokes into the private bits of the caps.
See #651514 for details. It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new. Thus, macros and a version check.
Add gst_is_initialized() guard to gst_element_factory_make(), so
people who forgot to call gst_init() get a useful warning for what
seems to be a common enough mistake.
Add a GstStructure to GstElementClass and GstElementFactory. Add setters/getter.
Handle it in the registry code. Print items in gst-inspect.
Fixes#396774.
API: gst_element_class_set_meta_data(), gst_element_factory_get_meta_data_detail()
Adds that warning to configure.ac
Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.
https://bugzilla.gnome.org/show_bug.cgi?id=611692
Setting an object name is nice for proper debug logging. Ideally this would
still happens earlier (.e.g when pads are added to an element, its not yet set).
This avoids:
* triple-checking for the GType when type-checking is enabled (see #597260)
* Avoids going through an expensive no-argument checking which landed in
glib-2.22
* Avoids going through 2 extrac functions (g_object_new -> g_object_new_valist)
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
elementfactory field is filled in by gst_element_base_class_init,
but it needs some info set on the element's type, so have it
available prior to class structure creation spinning up.
This affects elements that have a well-known/public type (e.g. pipeline)
and can be created by other means than gst_element_factory_make
(which will also fill in the element's factory).
The first time one calls gst_element_factory_make(), gst recreates the plugin
feature and the element factory. As a side effect we ref the class to fill
in detail we already have filled from the registry cache. This patch changes
the behaviour to just update the existing entries. The factory is now attached
to the type and set in gst_element_base_class_init().