Commit graph

276 commits

Author SHA1 Message Date
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
Sebastian Dröge 0bcb5a421a pad: Add gst_pad_sticky_events_iterate() function 2011-05-24 16:17:53 +02:00
Wim Taymans 31a314ac5b pad: add pending event for sticky events
Change the sticky event array so that it contains a pending and an active event.
Events on the sinkpad are copied to the pending array and after the eventfunc
returned TRUE, moved to the active event. This allows us to queue new events
like when we do per-pad offsets without removing the currently active event.
Remove the active argument from the gst_pad_get_sticky_event() method, the
pending events are not something we want to expose.
2011-05-20 11:36:25 +02:00
Wim Taymans c8340e7762 pad: add methods to adjust the offset
Add methods to adjust the offset. This will be used to change the segment events
with an offset so that we can tweak the timing of the stream on a per-pad base.
2011-05-19 18:34:43 +02:00
Sebastian Dröge 6b30f0b056 pad: Add function to get sticky events from a pad
API: gst_pad_get_sticky_event()
2011-05-18 16:26:54 +02:00
Wim Taymans e39182a085 Merge branch 'master' into 0.11
Conflicts:
	gst/gstminiobject.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstplugin.h
	libs/gst/base/gstbaseparse.c
2011-05-18 13:14:57 +02: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 b5bc5b459a pad: Let template related functions return new references
gst_pad_template_get_caps(), gst_pad_get_pad_template_caps()
and gst_pad_get_pad_template() return a new reference of the
caps or template now and the return value needs to be
unreffed after usage.
2011-05-17 12:00:18 +02:00
Sebastian Dröge 3d2127f865 Revert "query: allow _make_writable on query handlers"
This reverts commit cf4fbc005c.

This change did not improve the situation for bindings because
queries are usually created, then directly passed to a function
and not stored elsewhere, and the writability problem with
miniobjects usually happens with buffers or caps instead.
2011-05-17 11:21:41 +02:00
Sebastian Dröge 3fa1594aaf gst: Add a filter caps parameter to all get_caps() functions
This is used to pass the possible caps and preferences to
the pad and to allow better negotiation decisions.
2011-05-16 15:33:10 +02:00
Wim Taymans cf4fbc005c query: allow _make_writable on query handlers
Pass a GstQuery ** to the query handlers so that they can make the query
writable before using a setter on it.
Port code to new API.
2011-05-10 18:36:33 +02:00
Wim Taymans b5456cc6f4 caps: remove caps from buffers and pads
Remove the GstCaps from buffers and pads. We now use CAPS events to negotiate
formats between element.
2011-05-09 16:21:28 +02:00
Wim Taymans 62b1a5a7be pad: add 2 new caps methods
Add method to get the currently configured caps on the pad.
Add a method to check if caps are configured on a pad.
2011-05-06 19:03:33 +02:00
Wim Taymans b35a700d3e pad: implement fixed caps with an object flag
Implement fixed caps with an object flag instead of a custom getcaps function.
2011-05-06 17:59:33 +02:00
Wim Taymans 0637aa95c5 pad: clean up the .h file a bit 2011-05-06 12:09:00 +02:00
Wim Taymans 4372869e80 pad: implement more sticky events
Remove the context again, adding an extra layer of refcounting and object
creation to manage an array is too complicated and inefficient. Use a simple
array again.
Also implement event updates when calling gst_pad_chain() and
gst_event_send_event() directly.
2011-05-06 11:14:02 +02:00
Wim Taymans dfef1d027d pad: improve passing around the context
Improve passing around the context, only send the context to the peer element
when the CONTEXT_PENDING flag is set.
2011-05-05 16:34:29 +02:00
Sebastian Dröge 5a7ec99214 pad: Keep track of reconfigure events and the pad-needs-reconfiguring status 2011-05-05 15:11:51 +02:00
Wim Taymans f16180a761 pad: update the context lazyly 2011-05-05 13:17:08 +02:00
Wim Taymans c4751ec8c1 Revert "context: use context on buffers instead of caps"
This reverts commit 9ef1346b1f.

Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Wim Taymans 9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Wim Taymans 9136abf623 pad: use the context to store sticky events
Store the sticky events in the context of a source pad.
2011-05-04 15:53:21 +02:00
Wim Taymans bc9cffda90 pad: more sticky events work
Copy the sticky events from the srcpad to the sinkpad when linking pads. Set the
STICKY_PENDING flag to make sure that the sticky events are dispatched before
pushing the next buffer to the element.
2011-05-03 18:58:18 +02:00
Wim Taymans 2243adffa1 event: add sticky flags to events
Add the sticky flag to events and a sticky index.
Keep sticky events in an array on each pad.
Remove GST_EVENT_SRC(), it is causing refcycles with sticky events, was not used
and is not very interesting anyway.
2011-05-02 18:34:18 +02:00
Wim Taymans 6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Sebastian Dröge 6e41a3cf2f pad: Make the size parameter of gst_pad_alloc_buffer() unsigned
Internally guints were used everywhere already.
2011-04-18 10:47:26 +02:00
Wim Taymans f505f778cc pad: more preroll lock to basesink
Move the preroll lock to basesink where it belongs.
2011-03-04 17:25:02 +01:00
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
Sebastian Dröge d7f59ca0c4 pad: Deprecate GST_FLOW_IS_FATAL() and GST_FLOW_IS_SUCCESS()
The problem with both macros is, that they suggest something that isn't true.
If GST_FLOW_IS_FATAL is true, there could still be a problem for many elements
and they should stop what they're currently doing and return that value
upstream (e.g. not-linked in a parser). If GST_FLOW_IS_SUCCESS is false, it
could still be that this is "ok" for the element (e.g. not-linked for a demuxer
on a few of its pads but not all).

It's better to not have these "convenience" macros but instead let people
*think* about the handling of different flow returns, that makes sense for
their element. And we should document the expected handling of flow returns for
different classes of elements in the plugin writer's guide.

Fixes bug #628014.
2010-08-27 16:59:08 +02:00
Stefan Kost 9d2292acaa pad: remove comma at the end of the last enum value
Fixes the build for c++.
2010-07-15 12:03:04 +03:00
Stefan Kost 8df1fdab57 docs: improve the api docs for new GstPadLinkChecks and its use 2010-07-05 17:53:42 +03:00
Edward Hervey 27b4868157 pad: more documentation regarding the new flags 2010-06-25 18:55:18 +02:00
Wim Taymans d4e1fdb0c7 pad: make the NOTHING link check flag be 0
Make the pad link check of NOTHING be 0. This way we have a flag for each
feature and 0 when no flags are set.
2010-06-25 18:28:07 +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
Johan Dahlin 23faba0190 Add gobject-introspection annotations for GstPadIntLinkFunction
Fixes build with latest gobject-introspection from git.

https://bugzilla.gnome.org/show_bug.cgi?id=622025
2010-06-22 15:01:20 +01: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 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
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
Tim-Philipp Müller 126d9cfce8 pad: add enums for custom flow return success and error codes
This way people can just #define their own custom flow returns to
one of these without having the compiler (esp. gcc-4.5) complain
about comparing integers to an enum or the enum not being listed

Fixes #615880.

API: GST_FLOW_CUSTOM_SUCCESS_1
API: GST_FLOW_CUSTOM_SUCCESS_2
API: GST_FLOW_CUSTOM_ERROR_1
API: GST_FLOW_CUSTOM_ERROR_2
2010-04-16 14:52:32 +01:00
Wim Taymans 64a4037f63 pad: indentation fix 2009-11-05 12:36:10 +01:00
Stefan Kost f63ecd04a8 pad: rename new api from _refed to _reffed.
Due to popular demand rename the new api as we still can.
API: gst_pad_get_caps_reffed(), gst_pad_peer_get_caps_reffed()
2009-11-05 12:54:32 +02:00
Stefan Kost fcc5d783df pad: add variants of gst_pad_get_caps() that don't copy caps. Fixes #590941
In most places in core and baseclasses we just need the caps to do caps-
intersections. In that case ref'ed caps are enough (no need to copy).
This patch also switches the code to use the new functions.
API: gst_pad_get_caps_refed(), gst_pad_peer_get_caps_refed()
2009-10-07 22:41:30 +03:00
Sebastian Dröge 884467d493 gstpad: Add some DISABLE_DEPRECATED markers in the header too
The internal links function is deprecated since some time and
there already were GST_REMOVE_DEPRECATED markers in the source file,
now add them to the header too.

Fixes bug #592209.
2009-08-18 14:57:08 +02:00
Wim Taymans 8f7c59936e pad: add pad private structure
Add pad private structure and move the new chainlistfunc into the private
struct. This avoids ABI breakage and allows us to expand in the future.
2009-05-28 16:36:32 +02:00
Jonas Holmberg 22a48fb08c bufferlist: hook up the pad functions
Reuse buffer code for bufferlists. Not sure if this measurably impacts performance
for the simple buffer case, if it does after doing some benchmarks, we can
decouple it later.

Fixes #572285
2009-05-12 15:18:53 +02:00
Zeeshan Ali (Khattak) 8af9d58ea7 gstpad: fix gst_pad_can_link()
Move the gst_pad_can_link() implementation from gstutils to gstpad and use
gst_pad_link_prepare() to make it work correctly and also check the caps.

Make the broken implementation in gstutils static.

Small cleanups in the _get_fixed_caps() function.

Fixes #575682.
2009-03-18 17:01:16 +01:00