Build the cache while we push data. When we don't have a cache, we run the
slowpath and collect cacheable properties. When all conditions are met, keep the
cached data around so that we can more efficiently push data around.
Otherwise the source will stay at NULL, the event is passed to the
peerpad via gst_pad_send_event() and then the peerpad is set as
source of the event instead of the originating pad.
A flush-stop event would make a pad unflushing, causing it
to start acting as an activated pad. This, for example,
could lead to the chain function being called when stuff
isn't initialized.
This could happend when setting qtdemux to NULL while a seek
was being handled in the upstream filesrc (in push mode).
This patch makes it check if it is activated before setting
it to unflushing.
This is the same behaviour as if we had a pad template caps of
GST_CAPS_ANY on any of the pads (i.e. the actual check will be done
during caps negotiation).
Instead just check that the caps intersect with the pad template.
The elements should properly accept/refuse the caps in setcaps().
Shaves off calling the default implementation of acceptcaps which does
an expensive gst_pad_get_caps() (so if you have 50 of those elements in
a row, you'd be doing factorial(50) gst_pad_get_caps...).
Does not break any module unit test and most apps work fine.
https://bugzilla.gnome.org/show_bug.cgi?id=622740
Since everything GstXML related has been deprecated, we can now skip the
libxml includes from the public headers when GST_DISABLE_DEPRECATED is
defined.
See #463435.
Pipeline serialisation to and from XML is horribly broken for all
but the most simple use cases, and will likely never be fixed.
Make sure everyone playing around with these tools is aware of
this, to avoid frustration. See countless bug reports in bugzilla.
Fixes bug #622685.
A pad is 'negotiable' when its container element is in a state greater
than GST_STATE_READY
API:gst_pad_is_negotiable
API:gst_pad_set_negotiable
API:GST_PAD_NEGOTIABLE
https://bugzilla.gnome.org/show_bug.cgi?id=618644
Just truncate and then fixate. We check for empty caps in the begin and a
fixate-func that empties a caps would be broken. It also helps lazy caps impl.
in bug 618853 by avoiding the gst_caps_get_size().
We need to check the pad caps on the srcpad as well as on the sinkpad. Revert
this commit as it removes the check on the srcpad and can leave the srcpad
unnegotiated (or negotiated with wrong caps)
This reverts commit 07dc1e5b49.
This check is not necesarry as we are not negotiating anymore. And it can
be wrong if upstream can't produce this caps anymore, but downstream can
process them fine.
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.
The default gst_pad_fixate_caps() previously would only fixate each individual
struct. In case there are multiple structs, the resulting caps would still not
be fixed. In the spirit of how individual structs are fixated, this patch
changes gst_pad_fixate_caps() to remove all but the first struct.
Fixes#595886
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.
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()
Post the structure change messages on the sinkpads of the elements. This allows
us to catch unlinked pads earlier without ending up with inconsistent element
degrees.
The internal links function is deprecated since some time and
there already were GST_REMOVE_DEPRECATED markers in the source file,
now add them to the header too.
Fixes bug #592209.