Commit graph

696 commits

Author SHA1 Message Date
Tim-Philipp Müller
2666450864 Suppress deprecation warnings in selected files, for g_static_rec_mutex_* mostly
GStaticRecMutex is part of our API/ABI, not much we can do here in 0.10.
2011-12-04 14:38:26 +00:00
Sebastian Dröge
0280a3c29f pad: Remove g_warning() if pad accepted caps that are not a subset of the pad caps
This check is correct but unfortunately it's impossible to implement
in a threadsafe way because the caps could have changed in the meantime.

Fixes bug #659606.
2011-11-24 11:15:29 +01:00
Stefan Sauer
ad438461a6 pad: not only describe conditions in the docs, also check them in the code
When blocking pads, check if the pad is in the rigt direction. Log some info
for the developer and return FALSE, instead of just locking up.
2011-10-20 09:51:11 +02:00
Robert Swain
138bb17bf9 GST_PTR_FORMAT: Add GstBuffer ptr format and use in GST_SCHEDULING
GstBuffer pointers can now be printed using GST_PTR_FORMAT. This is used
in the very useful GST_SCHEDULING debug logs in gstpad.c and allows for
easier and more information tracking of buffer progress through a
pipeline with just debug logging.
2011-10-07 16:38:52 +02:00
Stas Sergeev
b090a376d4 pad: Set caps on pad before checking if the pad is linked
This allows the setcaps handler and notify::caps to link
the pad downstream and doesn't require hacks to always
provide a peer to the pad, like in decodebin2.
2011-09-19 14:08:16 +02:00
Tim-Philipp Müller
b15ae28ad2 pad: add more debug logging for other chain function code path as well 2011-09-16 13:38:41 +01:00
Tim-Philipp Müller
a08402bdfd pad: fix up printf format in debug message
Which I messed up.
2011-09-16 13:13:30 +01:00
Vincent Penquerc'h
91c217c714 pad: make some debug traces more useful
https://bugzilla.gnome.org/show_bug.cgi?id=659139
2011-09-16 12:07:21 +01:00
Sebastian Dröge
22ba786807 pad: Only do the subset check in gst_pad_accept_caps() if the pad claims to accept the caps 2011-09-09 12:56:20 +02:00
Sebastian Dröge
7a82ed41f8 Revert "pad: Use gst_pad_accept_caps() instead of manually checking when configuring a sinkpad"
This reverts commit d3cad28da9.

It causes performance problems because acceptcaps() propagates downstream.
2011-09-08 14:29:00 +02:00
Sebastian Dröge
d3cad28da9 pad: Use gst_pad_accept_caps() instead of manually checking when configuring a sinkpad 2011-09-08 13:42:53 +02:00
Sebastian Dröge
79b5e89015 pad: Print a g_warning() if pad accept caps that are not a subset of its caps
In 0.11 only subsets are supported again as documented instead of also
allowing non-empty intersections.
2011-09-08 13:42:53 +02:00
Sebastian Dröge
2bfada5581 Revert "pad: Check for subsets, not non-empty intersections to check if caps are compatible"
This reverts commit 0c5d502073.

See bug #658541.
2011-09-08 13:42:52 +02:00
Piotr Fusik
14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Sebastian Dröge
0c5d502073 pad: Check for subsets, not non-empty intersections to check if caps are compatible
Pads should only accept caps that are a subset of the pad caps, e.g.
they should accept only caps that have a non-empty intersection and
at least all fields of the pad caps.

Without this a pad that wants for example
  "video/x-h264,stream-format=byte-stream"
will be happy to accept
  "video/x-h264".
2011-09-06 12:35:41 +02:00
Josep Torra
746813344d pad: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Javier Jardón
5d25e4a204 Use "const" instead G_CONST_RETURN
G_CONST_RETURN will be deprecated soon.

https://bugzilla.gnome.org/show_bug.cgi?id=652211
2011-06-09 17:54:27 +01:00
Stefan Kost
9ff4ec3104 docs: add deprecation guards
Move GstPadIntLinkFunction to private header to avoid a dozen #ifdefs. Use a
gpointer in public header instead.
2011-05-18 09:55:57 +03:00
Sebastian Dröge
f07b637d86 pad: Remove unnecessary FIXME
Resetting the result is not necessary when resyncing because
pads that previously got the event will be skipped and we
need to consider the results of the previous pushes.
2011-05-14 11:39:33 +02:00
Havard Graff
547d451772 pad: unlock before freeing the cache to avoid deadlock
https://bugzilla.gnome.org/show_bug.cgi?id=648199
2011-04-19 15:15:34 +01:00
Robert Swain
fd5aa095da pad: Allow tracking of buffers in GST_SCHEDULING debug output
As GST_SCHEDULING reports when buffers pass through pads due to
gst_pad_push calls, they are a good way of tracking the progress of
buffers through pipelines. As such, adding output of the buffer pointers
to these messages allows tracking of specific buffers, easing debugging.
2011-04-11 11:05:24 +02:00
Sebastian Dröge
b8d83f4e01 pad: Document that pad blocks only make sense for sink pads in pull mode and src pads in push mode
See bug #644907.
2011-03-16 12:01:21 +01:00
Wim Taymans
12d2d01663 pad: Check sinkpad for flushing
Check the sinkpad for the flushing state before calling the chainfunction on the
pad. We do this by checking the cache (which is also cleared on the srcpad when
the sink is set to flushing).

Fixes #641928
2011-02-14 17:31:25 +01:00
Tim-Philipp Müller
8a7fc1d8c9 Revert "micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers"
This reverts commit 6aa8ca37ee.

See http://article.gmane.org/gmane.comp.video.gstreamer.devel/32282
2010-12-26 21:21:43 +00:00
Edward Hervey
3efb73c121 gst: documentation fixups and annotation
Reported by enabling the --warn-all option of g-ir-scanner
2010-12-17 19:14:41 +01:00
Tim-Philipp Müller
3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Tim-Philipp Müller
0eaa25cbf5 pad: register gst_pad_get_fixed_caps_func() with the debug log system 2010-12-07 18:37:04 +00: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