Commit graph

833 commits

Author SHA1 Message Date
Wim Taymans 37318a8cd2 pad: remove GstPadFixateCapsFunction
The fixate caps function was not used externally and we have vmethods in the
base classes where it is needed.
Update some docs.
simplify some fixate functions in the base classes. Also pass the untruncated
caps to the vmethod.
2011-11-10 10:58:42 +01:00
Wim Taymans b133bea426 pad: don't store events on flushing pads
check the flushing state of the pad before storing the event.
2011-11-09 17:43:49 +01:00
Wim Taymans b7966c0c7d pad: make an ACCEPT_CAPS query
Replace the acceptcaps function with a query.
2011-11-09 17:36:00 +01:00
Wim Taymans 756f6eb3f2 pad: refuse events in flushing
when we are flushing, don't store the event on the pad but simply return FALSE.
Don't deactivate the srcpad, we need it to be active in order to push the
caps. Downstream can change the scheduling mode of an active pad.
2011-11-09 17:25:30 +01:00
Wim Taymans 6cc7254166 remove query types
It was not really useful
2011-11-09 11:47:10 +01:00
Wim Taymans 642a4697fe pad: install query probes
Fire query probes according to updated design doc.
2011-11-08 17:32:11 +01:00
Wim Taymans ce09010267 pad: add pull mode probes
Allow probes to inspect the offset and size from a probe in pull mode and allow
the probe to modify the buffer.
Update design doc a little.
2011-11-08 12:47:33 +01:00
Wim Taymans ba3028aeeb pad: Add GstPadProbeInfo
Make a new GstPadProbeInfo structure and pass this in the probe callback. This
allows us to add more things later and also allow the callback to replace or
modify the passed object.
2011-11-08 11:04:19 +01:00
Wim Taymans 24e596a1fb pad: rework pad probes
Make a separate cookie to detect chancges in the list of probes and keeping
track of what hooks have been invoked yet.
Remove the requirement to have probes on srcpads in push mode and sinkpads in
pull mode.
Add some more debug.
Keep track of what callbacks got executed. If no callback is called and we are a
blocking pad, let the item pass. This allows you to block pads on selected
items only.
Explicitly have an UPSTREAM and DOWNSTREAM PadProbeType. This allows you to only
block the pad on upstream or downstream items.
Add convenience macros to only block on downstream/upstream items.
2011-11-07 17:15:17 +01:00
Wim Taymans b6fbeb8fed pad: make probes work on all pads
fixes #644907
2011-11-04 18:19:14 +01:00
Wim Taymans e91b1ee412 pad: small cleanup 2011-11-03 11:15:11 +01:00
Wim Taymans d9dc9f9d52 task: api cleanup
gst_task_create() -> gst_task_new()
2011-11-02 08:59:44 +01:00
Wim Taymans 88e12228cf bufferlist: clean up API
gst_buffer_list_len() -> gst_buffer_list_length()
gst_buffer_list_sized_new() -> gst_buffer_list_new_sized()
2011-11-02 08:59:43 +01:00
Tim-Philipp Müller 4f004eff38 pad: rename GstActivateMode to GstPadActivateMode
These might be useful:
sed -i -e 's/GstActivateMode/GstPadActivateMode/g' `git grep GstActivateMode | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_ACTIVATE_/GST_PAD_ACTIVATE_/g'    `git grep GST_ACTIVATE_   | sed -e 's/:.*//' | sort -u`
2011-11-01 00:25:02 +00:00
Tim-Philipp Müller bffc9207b5 pad: rename GstProbeType and GstProbeReturn to GstPadProbe{Type,Return}
Better now than later in the cycle. These might come in handy:

sed -i -e 's/GstProbeReturn/GstPadProbeReturn/g'   `git grep GstProbeReturn  | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_PROBE_/GST_PAD_PROBE_/g'          `git grep GST_PROBE_      | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GstProbeType/GstPadProbeType/g'       `git grep GstProbeType    | sed -e 's/:.*//' | sort -u`
2011-11-01 00:15:17 +00:00
Edward Hervey df6044f7eb Merging origin/master
Conflicts:
	gst/gstbin.c
	gst/gstbus.c
	gst/gstdebugutils.c
	gst/gstpad.c
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasesrc.c
2011-10-21 10:52:46 +02: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
René Stadler 5239679c09 pad: fix buffer/event leak when pad is flushing
Apparently this got lost while refactoring probes.
2011-10-17 21:40:46 +02:00
Wim Taymans 65a7c66053 pad: clean up parent_class handling 2011-10-16 14:19:36 +02:00
Edward Hervey 86656b44af gstpad: Specify transfer full for gst_pad_get_caps()
It increments the reference count of the returned caps.
2011-10-10 16:55:19 +02:00
Edward Hervey 42fcb1175b gstpad: Add debug to know what events are transferred between pads 2011-10-10 16:55:19 +02:00
Edward Hervey 2ba6017363 gstpad: Unset EOS event on FLUSH_STOP 2011-10-10 16:54:40 +02:00
Edward Hervey a930f67697 gstpad: Don't ignore downstream FlowReturn with IDLE probes
If pushgin downstream returned a non-ok value (like GST_FLOW_WRONG_STATE),
we don't want to end up returning a different value (GST_FLOW_OK in this
case) if IDLE probes are present.
2011-10-10 16:53:32 +02:00
Wim Taymans ea012d3dd7 pad: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS 2011-10-10 11:33:51 +02:00
Wim Taymans ee1f861ec1 Merge branch 'master' into 0.11
Conflicts:
	gst/gstpad.c
2011-10-08 09:28:02 +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
Wim Taymans 422d1245c1 pad: improve debug 2011-09-28 18:44:12 +02:00
Edward Hervey 10e7159cf8 Merge branch 'master' into 0.11
Conflicts:
	gst/gstcaps.c
	gst/gstpad.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesink.h
	libs/gst/base/gstbasetransform.c
2011-09-23 13:09:25 +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 7476186217 Revert "Revert "pad: Check for subsets, not non-empty intersections to check if caps are compatible""
This reverts commit 2bfada5581.

Conflicts:

	gst/gstpad.c

For 0.11 we want to enforce that only subsets of the pad
caps are allowed. This breaks backward compatibility for
some elements, which is why we only print a warning in
0.10.
2011-09-08 14:32:26 +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 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