Strings in the binary registry are NUL-terminated, so we can just use them
directly if we only need them temporarily, and avoid unnecessary mallocs
and frees.
Add a method to perform get_range typefinding that also uses the
uri/location extension as an extra hint. It will first try to call the
typefind functions of the factories that handle the given extension. The result
is that in the common case, we only call one typefind function, which speeds up
the typefinding a lot.
Protect the ->removed field with the object lock as well. Take the DYN lock
earlier so that we can mark the pad removed and avoid a race in pad_alloc.
Fixes#606435
No need to call gst_element_link_pads_filtered with filter=NULL, which would
call gst_element_link_pads() in that way. Call it directly to save a call and
expensive gobject type checks.
Fix up translated strings for some recently-added tags to match the
existing strings: we want short mnemonic-like strings here that start
with a lower case letter.
The only reason these two functions are still around is that at some
point in the past they were in a public header, so we can't really
remove them now even though they should have been private all along
(and aren't really particularly useful). Since these are just empty
stubs now that do nothing but return FALSE and will be removed in
0.11 anyway, we may just as well deprecate them formally.
Move SHAVE_INIT behind all other checks, in particular AG_GST_CHECK_CHECKS.
This should fix problems with header checking and checking for localtime_r,
which causes compilation errors with clean checkouts where common/shave has
not been created yet when those checks are run. It seems like SHAVE_INIT
changes the environment so that checks depending on a compiler need shave
to exist at that point, which will fail if AC_OUTPUT hasn't created it yet.
Fixes#605930.
Include unistd.h so that _POSIX_VERSION is actually defined when
it should be defined. Without that, stuff like fail_if(1) doesn't
actually fail, presumably because other parts of the code do include
unistd.h and then have _POSIX_VERSION defined.
Fixes#604565 even more.
Move the parent buffer pointer into the GstBuffer struct so that we can
remove the subbuffer class and type. This is interesting because it allows us to
more naturally implement methods to get the real type and parent
of a subbuffer (See #545501).
It should also be slightly faster because there is no extra object hierarchy to
initialize and free.
Make sure we take ownership of the buffer early without increasing its refcount
when we go in the collect function. This reduces the amount of copies needed in
order to make the buffer writable in most cases.
In some cases we can avoid allocating a subbuffer and instead simply ref
the buffer. Callers should perform _make_metadata_writable() in all
cases now.
Add a method to install a clipping function that is called when a buffer is
received. Users of collectpads can then perform clipping on the incomming
buffers.
Also retab the header file a little.
See #590265
When we unblock a pad with the same user_data, the destroy callback is not
called. This leads to refcounting leaks that cannot be avoided. Instead always
call the destroy notify whenever we install a new pad block.
In particular, this fixes a nasty pad leak in decodebin2.
Also update the unit test to have more accurate comments and test the required
behaviour.
Adds the following new tags:
GST_TAG_SHOW_NAME
GST_TAG_SHOW_SORTNAME
GST_TAG_SHOW_EPISODE_NUMBER
GST_TAG_SHOW_SEASON_NUMBER
GST_TAG_LYRICS
GST_TAG_COMPOSER_SORTNAME
GST_TAG_GROUPING
Fixes#599759
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).
Never skip the state change to playing, even if the element is already in the
right state. We need this because we also distribute the base_time while doing
the state change and skipping this step would leave some elements without a new
base_time.
Fixes#600313