Commit graph

798 commits

Author SHA1 Message Date
Sebastian Dröge
43538e2e75 Merge branch 'master' into 0.11
Conflicts:
	docs/design/draft-buffer2.txt
	docs/design/part-TODO.txt
	docs/design/part-block.txt
	docs/design/part-bufferlist.txt
	docs/design/part-caps.txt
	docs/design/part-element-transform.txt
	docs/design/part-events.txt
	docs/design/part-negotiation.txt
	gst/gstcaps.c
	gst/gstevent.h
	gst/gstghostpad.c
	gst/gstinterface.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstutils.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gstcapsfilter.c
	plugins/elements/gsttee.c
	tests/check/generic/sinks.c
	tools/gst-launch.1.in
2011-09-08 14:28:23 +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
Wim Taymans
5cf8e68944 Merge branch 'master' into 0.11
Conflicts:
	gst/gstmessage.c
	gst/gstquery.c
	gst/gstregistrychunks.c
	gst/gstsegment.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +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
Wim Taymans
e4db8d0f55 docs: improve some docs 2011-08-17 09:25:04 +02:00
Wim Taymans
d22192474a pad: make fixate caps behave like other functions
Install a default fixate caps function on pads like all the other pad functions.
2011-08-15 16:45:33 +02:00
Wim Taymans
49fc4249e5 caps: add fixate function
Add a fixate function and use it in gstpad.c
2011-08-15 14:40:38 +02:00
Wim Taymans
bd20d2d199 structure: add function to fixate
Add a function to fixate a structure and use it for the default fixate function
in gstpad.c.
2011-08-15 14:32:17 +02:00
Wim Taymans
d12738b4fa pad: fix default acceptcaps
Make the acceptcaps function behave like all the other functions with a default
implementation. Don't try to chain up to the default implementation when it was
set to NULL explicitly but return FALSE instead.
Fix some docs
2011-08-15 14:19:09 +02:00
Wim Taymans
cbccf7d5bf pad: fix some macros
Remove a rather usless macro to check if a pad mode is active and
add GST_PAD_IS_ACTIVE().
2011-08-15 13:24:11 +02:00
Wim Taymans
1c16ff94fc pad: remove gst_pad_get_negotiated_caps()
Remove gst_pad_get_negotiated_caps(), it does not realy do what it says,
gst_pad_get_current_caps() returns the currently negotiated caps on the pad
correctly.
2011-08-15 12:16:30 +02:00
Josep Torra
178bdccb76 Fix and clarify debug statements
Fixes build on MacOSX

Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
2011-08-10 11:01:58 +02:00
Wim Taymans
99d4880f31 pad: add method to mark reconfigure 2011-08-04 17:12:21 +02:00
Wim Taymans
5e330fa456 pad: improve the getcaps function
Refactor calling the GETCAPS function and checks.
Move the filter code in one place.
When using fixed pad caps, get the currently configured caps and then fallback
to the GETCAPS function. We used to simply ignore the GETCAPS function, which
resulted in transform elements returning the template caps instead of doing the
caps transform.
2011-07-26 18:48:20 +02:00
Wim Taymans
cea4b4c7d5 pad: only update caps when changed
Only call the event function with the caps event when the caps changed.
2011-07-26 16:10:42 +02:00
Wim Taymans
61481ac9e5 pad: add allocation query just because 2011-07-26 12:20:04 +02:00
Mark Nauwelaerts
b3bf6cdfd8 pad: avoid inadvertently dropping an event
... particularly a non-sticky serialized event that happens to pass
when an event update is pending.
2011-07-11 11:59:18 +02:00
Wim Taymans
872e7d52df pad: use event function directly
We will never go in this code path for CAPS events so directly call the event
function.
2011-06-21 12:31:57 +02:00
Wim Taymans
de3b6e733f pad: notify caps after we store the new caps
notify caps after we store the new caps so that the new caps are actually
visible for the app.
2011-06-21 10:29:51 +02:00
Edward Hervey
a885082a16 gstpad: Remove unused variable do_event_actions
do_event_actions was always used as TRUE
2011-06-18 17:35:41 +02:00
Wim Taymans
a59defb90f pad: don't forward scheduling query
The scheduling query should not be forwarded, because elements need to implement
special code to handle different scheduling methods.
2011-06-13 16:30:22 +02:00
Wim Taymans
2d6a59aa83 pad: add _check_reconfigure() method
Add a method to check and clear the RECONFIGURE flag on a pad.
2011-06-10 17:32:20 +02:00
Wim Taymans
2d28891528 Merge branch 'master' into 0.11
Conflicts:
	gst/gstelementfactory.c
	gst/gstelementfactory.h
	gst/gstpad.h
	gst/gstpluginfeature.c
	gst/gstpluginfeature.h
2011-06-10 12:09:49 +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
Wim Taymans
ab0ab2fbca pad: use new event methods to replace events
Using the new event methods, we can atomically transfer the event from the
pending list to the active list.
2011-06-09 13:37:28 +02:00
Wim Taymans
d8212d941c pad: forward events by default
Always forward all events in the default handler. Previously it used to not
forward caps events by default. It makes more sense to forward the caps events,
if the element is interested in the caps, it will implement an event handler to
retrieve the caps and then it can decide to forward or not. If the element has
no event handler, it probably just doesn't care about caps and it probably is
also not going to modify the data in a way that needs a caps change.
2011-06-09 11:49:20 +02:00
Wim Taymans
14a0e31e69 pad: remove setcaps function
Remove the setcaps function, elements should use the caps event to be informed
of the format.
2011-06-08 12:58:29 +02:00
Wim Taymans
b5351dadcd pad: Improve pad event forward code
Return TRUE when the pad has no parent or when there are no internally linked
pads.
2011-06-07 10:49:34 +02:00
Wim Taymans
9058499eeb pad: Rename and rework the dispatcher function
Rename gst_pad_dispatcher() to gst_pad_forward() and make it more useful by
iterating the internal links of a pad and handling resync properly.
Add a method gst_pad_event_forward() that unconditionally forwards an event to
all internally linked pads.
Update some pad code to use the new forward function.
2011-06-07 10:02:06 +02:00
Wim Taymans
f851685f92 pad: check flushing in pullrange too 2011-06-03 16:46:26 +02:00
Wim Taymans
8dda6b462d pad: cleanups
Use defines instead of hardcoded values for masks.
2011-06-03 13:56:04 +02:00
Wim Taymans
b5d35162ae pad: inline the recursive stream lock 2011-06-02 13:46:26 +02:00
Wim Taymans
fde7d867bd pad: remove unused fields and methods and signals 2011-06-02 13:35:52 +02:00
Wim Taymans
d863976e59 pad: use new gst_value_fixate instead
Use the new gst_value_fixate() function instead of our own version.
2011-06-02 13:23:53 +02:00
Wim Taymans
2b9c34cd70 pad: optimize linking
Optimize linking by only releasing the pad locks when there are link functions
installed on the pads.
Add some G_LIKELY here and there.
Move error paths out of the main code flow.
2011-06-02 12:40:05 +02:00
Wim Taymans
50a8e0431c pad: remove deprecated have-data signal 2011-06-02 12:39:34 +02:00
Wim Taymans
541258f0e9 pad: add idle probe for pull method too 2011-06-02 11:21:09 +02:00
Wim Taymans
e2eae110a9 pad: more cleanups
Use miniobject unref when we can
Reuse existing data type identifier instead of an extra boolean.
2011-06-02 11:01:31 +02:00
Wim Taymans
3f51563319 pad: further improve probes and pad blocking
Keep track of installed number of probes to shortcut emission.
Allow NULL callbacks, this is useful for blocking probes.
Improve probe selection based on the mask, an empty mask for the data or the
scheduling flags equals that all probes match.
Add some more debug info.
Don't check the flushing flag in the probe callback handler, this needs to be
done before calling the handler.
Fix blocking probes.
Fix unit tests
2011-06-01 19:39:20 +02:00
Wim Taymans
8abc457a3b pad: implement pad block with probes 2011-06-01 19:39:16 +02:00
Wim Taymans
fce85f75ff pad: Rework pad blocking, another attempt
Make the PadBlock callback take a GstBlockType parameter to handle the different
kind of stages in the pad block. This provides for more backwards compatibility
in the pad block API.
Separate blocking and unblocking into different methods, only blocking can do a
callback, unblock is always immediately. Also removed synchronous blocking, it
can always be implemented with a callback.
2011-05-30 18:29:06 +02:00
Wim Taymans
565f492af2 Revert "pad: rework pad blocking, first part"
This reverts commit 415da89f3c.

Conflicts:

	gst/gstpad.c
2011-05-30 13:40:04 +02:00
Wim Taymans
9f2424123f pad: improve debugging 2011-05-30 12:27:52 +02:00
Wim Taymans
415da89f3c pad: rework pad blocking, first part
Make pad block call the callback as soon as the pad is not in use. This makes it
possible to make sure that when the callback is called, no activity is happening
on the pad and that no activity will ever happen until the pad is unblocked
again. This makes pad blocking work when there is no dataflow or after EOS and
greatly helps dynamic pipelines.
Move the probe handling right where we wait on the pad block. The two are
related but not the same and the probe can eventually influence the pad
blocking as we'll se later.
Fix up some broken unit tests or tests that fail with the new behaviour.
2011-05-27 17:37:20 +02:00
Sebastian Dröge
26ca7546a7 pad: Drop sticky events pushed on flushing srcpads instead of activating them immediately 2011-05-27 11:45:16 +02:00
Wim Taymans
86c8b721b2 pad: refactor _push_event
Rework _push_event() a little so that it drops events on blocking pads.
Make sure that events are forwarded when we unblock.
Add counter on the pad to keep track of busy pads.
2011-05-26 19:45:14 +02:00