We currently do a little too much work when we push the first buffer around
resulting in excessive caps checking. We can probably make this a little less
expensive.
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.
Use g_slide instead of nomal g_new, Also don't init struct with 0 as we need to
init it anyway with the real values.
Also join the 3 flags checks into one.
The list against which we run the comparefunc will only contain
GstPluginFeature, therefore remove the 6 expensive type checks we do
for every single comparision.
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
When we quickly switch from PLAYING to PAUSED and back to PLAYING it's possible
in some cases that the task refuses to start, This is because when we go to
PAUSED, we unschedule the clock timeout, which could return UNSCHEDULED when
we're back to PLAYING, causing the task to PAUSE again with a wrong-state.
This patch checks if we are running when we return with an UNSCHEDULED return
value and if we are, try to create a new buffer.
Fixes#597550
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 test used to SIGBUS on OS/X but now SIGSEGV's instead on
Snow Leopard. It's not worth the effort to figure out which platform
should produce which error for what is fundamentally a pretty silly
test, so just disable it on OS/X
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.