Commit graph

326 commits

Author SHA1 Message Date
Wim Taymans 54e1174060 GstPadFlags: rename flags GST_PAD_* -> GST_PAD_FLAG_* 2011-11-16 12:36:51 +01:00
Wim Taymans fe3af1d67b pad: keep the parent alive when requested
Add a new pad flag NEED_PARENT that ensures that the parent of a pad is
reffed and not NULL when the event, query and internal links functions
are called.
When a pad is added to an element automatically make sure the NEED_PARENT flag
is enabled.
2011-11-16 12:08:22 +01:00
Wim Taymans f746174c10 pad: move query convenience functions together
Move the caps convenience functions to the other query functions.
2011-11-15 18:16:24 +01:00
Wim Taymans 2358938dbd _accept_caps() -> _query_accept_caps() 2011-11-15 17:40:19 +01:00
Wim Taymans c55962c2d3 _peer_get_caps() -> peer_query_caps() 2011-11-15 17:11:46 +01:00
Wim Taymans d805f0f034 pad: _get_caps() -> _query_caps() 2011-11-15 16:46:37 +01:00
Wim Taymans 9b98ef4fed pad: improve some flag macros 2011-11-15 16:13:28 +01:00
Wim Taymans b5c3e254b1 pad: remove getcaps and use caps query
Remove the getcaps function on the pad and use the CAPS query for
the same effect.
Add PROXY_CAPS to the pad flags. This instructs the default caps event and query
handlers to pass on the CAPS related queries and events. This simplifies a lot
of elements that passtrough caps negotiation.
Make two utility functions to proxy caps queries and aggregate the result. Needs
to use the pad forward function instead later.
Make the _query_peer_ utility functions use the gst_pad_peer_query() function to
make sure the probes are emited properly.
2011-11-15 11:20:48 +01:00
Wim Taymans d1a8695470 fix docs 2011-11-14 10:27:01 +01:00
Wim Taymans 4a7c3b929a .h: fix header files
Ensure correct indentation and :retab.
Make sure all structures have padding
Fix up some old ABI additions.
2011-11-11 17:30:03 +01:00
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 b7966c0c7d pad: make an ACCEPT_CAPS query
Replace the acceptcaps function with a query.
2011-11-09 17:36:00 +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 4660beaba8 pad: remove lock/unlock_full versions of stream-lock 2011-11-08 15:51:48 +01:00
Wim Taymans 1013c6c79b pad: add defines for query probes 2011-11-08 15:48:34 +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
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
Wim Taymans ea012d3dd7 pad: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS 2011-10-10 11:33:51 +02:00
Wim Taymans 8a1f401dfd docs: fix docs 2011-09-26 20:47:35 +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
Piotr Fusik 14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01: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 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
Wim Taymans 99d4880f31 pad: add method to mark reconfigure 2011-08-04 17:12:21 +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 9d2953288c pad: fix header 2011-06-09 13:34:19 +02:00
Wim Taymans 98fdfa1815 pad: fix spurious include 2011-06-09 12:31:47 +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 44b4312d96 fix some circular includes
typedef some structs before including other files to avoid circular dependencies
in the header files.
2011-06-07 13:25:26 +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
Tim-Philipp Müller 4b920eb5d2 docs: update for API changes
Also remove GST_PAD_CHECKGETRANGEFUNC macro
2011-06-05 18:57:56 +01:00
Edward Hervey 20d1ee87cb gstpad: Small doc fixup 2011-06-03 18:10:24 +02:00
Wim Taymans 07aca4a698 pad: clean up probe flags 2011-06-03 17:24:45 +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 50a8e0431c pad: remove deprecated have-data signal 2011-06-02 12:39:34 +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 f4f4fa5e8f pad: remove old gst_pad_set_blocked methods 2011-05-26 16:17:31 +02:00
Wim Taymans 7e6d579301 scheduling: port to new scheduling query 2011-05-24 17:39:56 +02:00