Commit graph

672 commits

Author SHA1 Message Date
Wim Taymans b2ab72b916 pad: remove get_caps_reffed variants
Make the _get_caps functions behave like the _get_caps_reffed variants and
remove the _reffed variants. This means that _get_caps doesn't return a writable
caps anymore and an explicit _make_writable() is needed before modifying the
caps.
2010-12-07 18:14:38 +01:00
Wim Taymans f558409fdc pad: Clean up .h file 2010-12-07 16:52:47 +01:00
Wim Taymans 993eda5004 remove deprecated symbols and methods 2010-12-06 19:18:31 +01:00
Mark Nauwelaerts 58868d4218 pad: add some debug to fast push path
... so we don't loose track at times it is needed the most.
2010-12-06 11:07:38 +01:00
Edward Hervey 6aa8ca37ee micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers 2010-12-03 12:03:42 +01:00
Wim Taymans cec2a42808 pad: add push cache to bufferlists
Add the push cahce for the bufferlist push code path as well.
2010-12-03 11:28:52 +01:00
Wim Taymans 59bc71c47a pad: don't cache the peer chainfunc
There is no need to cache the peer chainfunction as we can just as efficiently
get to it from the peer object. Also not caching the chain function works better
because then we automatically get the new chainfunctions when they change.
2010-12-03 11:28:52 +01:00
Wim Taymans d3630379da pad: clear pad cache when installing probes
Move the method to clear the pad cache into _private.h
Clear the pad cache when installing pad probes.
2010-12-03 11:28:52 +01:00
Wim Taymans 2239038d76 pad: explicitly inline some functions 2010-12-03 11:28:52 +01:00
Wim Taymans 67d7c543b3 pad: remove unused variable 2010-12-03 11:28:52 +01:00
Wim Taymans 5e37ade932 pad: invalidate caches on flush and pad block 2010-12-03 11:28:52 +01:00
Wim Taymans 8abc14052a pad: don't unref NULL caps 2010-12-03 11:28:52 +01:00
Wim Taymans 14542a0d46 pad: add invalidate function
More small optimisations, remove the unneeded valid boolean.
Add function to invalide the cache.
Invalidate the cache on unlink.
2010-12-03 11:28:52 +01:00
Wim Taymans 1c79181afd pad: small cleanup 2010-12-03 11:28:52 +01:00
Wim Taymans b83e66be46 pad: improve pad push caching
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.
2010-12-03 11:28:52 +01:00
Wim Taymans d59b7f81b7 pad: prototype of pad push cache
Prototype of how we can cache the peer and caps for a pad link.
2010-12-03 11:28:52 +01:00
Stefan Kost 898583b2a0 docs: query doc improvements
More xrefs. Mentioned that some queries need a running pipeline.
2010-12-03 09:50:32 +02:00
Sebastian Dröge f2f7842f6b pad: Set the event source object if none is set yet in gst_pad_push_event()
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.
2010-12-02 19:02:08 +01:00
Tim-Philipp Müller fd6334cb7c pads: use new g_object_notify_by_pspec() for caps notifies if available
If we're building against GLib >= 2.26.0, we can use the more efficient
g_object_notify_by_caps(), which avoids the param spec lookup.
2010-10-07 19:03:42 +01:00
Stefan Kost 5550136fb2 Revert "pad: use a nested lock to avoid reffing the peer"
This reverts commit 9b424b1570.
2010-09-23 15:34:54 +03:00
Stefan Kost 9b424b1570 pad: use a nested lock to avoid reffing the peer
Fixes #503592
2010-09-22 10:22:40 +03:00
Thiago Santos 60fba4df8b gstpad: Fix flush-stop event handling
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.
2010-09-13 20:52:03 -03:00
Stefan Kost 8ef7e46d24 docs: fix warnings pointed out by gtk-doc 2010-09-13 11:18:25 +03:00
Stefan Kost 770694f0f1 pad: add a unchecked variant for pull
Add internal _get_range_unchecked thats is called from _get_range and
_pull_range.
2010-09-08 10:25:55 +03:00
Stefan Kost c94fbb5594 pad: log element:pad names with caps 2010-08-05 09:40:03 +03:00
Edward Hervey 21c8edca2a gstpad: Assume pads are compatible if we don't have templates
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).
2010-07-20 20:52:35 +02:00
Edward Hervey 7fa58dbebd GstPad: Do not call gst_pad_accept_caps() when caps change
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
2010-07-16 15:30:55 +02:00
Tim-Philipp Müller 71f3a6f0f7 Don't include <libxml/parser.h> from public headers if GST_DISABLE_DEPRECATED is defined
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.
2010-06-26 10:35:38 +01:00
Edward Hervey 27b4868157 pad: more documentation regarding the new flags 2010-06-25 18:55:18 +02:00
Sebastian Dröge 5f4a965f67 gstxml: Deprecate GstXml and related functions
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.
2010-06-25 18:25:40 +02:00
Edward Hervey 625c4e2d80 GstPad: Add new pad linking method with configurable checks.
To be used for cases where we don't need all checks to be validated.

API: gst_pad_link_full
API: GstPadLinkCheck

https://bugzilla.gnome.org/show_bug.cgi?id=622504
2010-06-23 18:42:35 +02:00
Edward Hervey 4a11063768 Revert "GstPad: Add GST_PAD_NEGOTIABLE GstPadFlag"
This reverts commit dc38e75d88.

boom
2010-06-15 11:54:19 +02:00
Edward Hervey 3df54c45bf Revert "gstpad: Return pad template in get_caps if pad is not negotiable"
This reverts commit 7460321a60.

crack
2010-06-15 11:54:19 +02:00
Edward Hervey 19334dbb85 Revert "pad: fix comment"
This reverts commit 8e92cb4a7d.

whatever...
2010-06-15 11:54:19 +02:00
Wim Taymans 8e92cb4a7d pad: fix comment 2010-06-14 17:33:16 +02:00
Edward Hervey 7460321a60 gstpad: Return pad template in get_caps if pad is not negotiable
https://bugzilla.gnome.org/show_bug.cgi?id=618644
2010-06-14 17:08:14 +02:00
Edward Hervey dc38e75d88 GstPad: Add GST_PAD_NEGOTIABLE GstPadFlag
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
2010-06-14 17:08:14 +02:00
Sebastian Dröge 6ff314c75a pad: Fix iterator aggregation of all pads in the internal links fallback
g_list_prepend() returns the new head of the list and not
using this will create a memory leak and a single-element list.
2010-06-13 16:27:39 +02:00
Stefan Kost 21b4ef4d0f pads: Improve readability for gst_pad_fixate_caps()
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().
2010-06-01 22:30:37 +03:00
Stefan Kost edfbd90b29 docs: xref function name 2010-05-22 22:45:33 +03:00
Tim-Philipp Müller 4793930efb pad: don't print WARNING debug statements for normal things like EOS, part II 2010-05-17 13:09:15 +01:00
Wim Taymans 60499306a6 Revert "pad: don't check twice for changed caps per push"
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.
2010-05-06 16:41:09 +02:00
Stefan Kost 07dc1e5b49 pad: don't check twice for changed caps per push
gst_pad_chain_data_unchecked() does the same check already.
2010-05-06 17:04:53 +03:00
Wim Taymans 6e4fde7195 docs: clarify the pull_range functions
Clarify the gst_pad_pull_range(), GstBaseSrc::create(), gst_pad_get_range()
and GstPadGetRange functions a little.

Fixes #617733
2010-05-05 12:01:50 +02:00
Benjamin Otte b878069ef7 caps: Do not allow fixating empty caps
Passing empty caps to gst_pad_fixate_caps() is invalid, as empty caps
cannot be fixated.
2010-04-29 22:41:36 +02:00
Sebastian Dröge fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Wim Taymans f089c3cceb pad: set a good name on the task of the pad
Use the element:pad names to configure a good name for the pad task.
2010-03-15 13:48:30 +01:00
Benjamin Otte 7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +01:00
Tim-Philipp Müller c802301b69 pad: don't print WARN debug statements for normal things like EOS 2010-02-15 00:08:16 +00:00
Thijs Vermeir 053ada3308 gstpad: directly set the caps when pushing buffer with different caps.
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.
2010-01-19 14:13:25 +01:00