CAPS_IS_ANY and CAPS_IS_EMPTY are the equivalent of their gst_caps_*
counterpart except that they avoid the typechecking and are inlined.
CAPS_IS_EMPTY_SIMPLE only checks for empty caps (without checking if
the caps is ANY).
Maintain a hashtable of the plugin basename. We can then use this
hashtable to speedup the search for an existing plugin and avoid
a whole lot of strcmp calls.
This patch adds gst_caps_set_value() and allows gst_caps_set_simple() to
work on non-simple caps. See the API documentation for the functions
about what they do.
The intention of these changes is to ease working with caps in caps
transform functions. An example for this would be ffmpegcolorspace,
where the caps transform function could be changed to look roughly like
this (pseudocode ahead):
result = gst_caps_copy (template_caps);
value = gst_structure_get_value (gst_caps_get_structure (caps, 0),
"widh");
gst_caps_set_value (result, value);
/* same for height, framerate and par */
return caps;
which is much cleaner and easier to understand than the current code.
https://bugzilla.gnome.org/show_bug.cgi?id=597690
This is slightly more efficient because the compiler can't do tail
recursion here and has to keep all stack frames.
Not that efficiency is that important here but I already had
the iterative version somewhere else and both are easy to read.
This allows the macosx versions to properly error out when fds are closed.
This is only a temporary fix until the pluginloader is switched to not
use GstPoll but GIOChannels.
In the plugin loader subprocess, move stdin and stdout to new fd's
so that plugins printing things during plugin init or (*gasp*)
possibly reading from stdin don't interfere with the data sent to
and from the parent.
When the plugin-scanner load fails (because the helper can't be
spawned), make sure to load the plugin that failed in-process, so
that all plugins do get loaded.
Fix an off-by-one error in the size guard for unpack_element, and
improve various debug statements in the failure paths.
Also, swap some g_new0 to g_malloc0 for the fun of it.
In most places in core and baseclasses we just need the caps to do caps-
intersections. In that case ref'ed caps are enough (no need to copy).
This patch also switches the code to use the new functions.
API: gst_pad_get_caps_refed(), gst_pad_peer_get_caps_refed()
Everyone running an uninstalled git setup is going to wonder about
this failure next time they update, so let's mention the solution
in the error message.
Reflow the code to move error handling to the end of the functions. Initialize
gvalue like we do in the setter. Add a unit-test module with two simple tests
the catche this bug.