Commit graph

730 commits

Author SHA1 Message Date
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
Wim Taymans 029ac4597e pad: rework sticky events a little
Update the design docs with some clear rules for how sticky events are
handled.
Reimplement the sticky tags, use a small structure to hold the event and its
current state (active or inactive).
Events on sinkpads only become active when the event function returned success
for the event.
When linking, only update events that are different.
Avoid making a copy of the event array, use the object lock to protect the event
array and release it only to call the event function. This will need to check
if something changed, later.
Disable a test in the unit test, it can't work yet.
2011-05-18 11:08:52 +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
Wim Taymans 93a80e2d91 pad: don't push sticky events on flush
Only allow serialized and non-flush events forward the sticky events.
2011-05-17 19:03:30 +02:00
Wim Taymans ba534c6416 pad: add more debug 2011-05-17 18:23:06 +02:00
Sebastian Dröge c7789694fb gst: Update for caps/pad template related API changes 2011-05-17 13:14:04 +02: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
Wim Taymans 887838aefe pad: avoid setting NULL caps on pads 2011-05-16 19:04:35 +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
Sebastian Dröge ddf2489be4 pad: Re-implement notify::caps 2011-05-16 10:25:10 +02: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
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 bf7c80b5f6 pad: improve caps event handling
Fix replace of caps events when linking: we need to unref the old ones.
Make sure we pass error values around.
Move backward compat code into the default handler for now.
2011-05-08 12:43:26 +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 92b4c8967b pad: don't use buffer caps for negotiation
Don't use the buffer caps for negotiation anymore but use the CAPS events.
Make the _set_caps method produce the CAPS event, add some backward
compatibility code to trigger the setcaps functions on src and sinkpads.
Remove all negotiation code from the chain functions.
Don't use the GST_PAD_CAPS variable anymore to store the caps but retrieve the
caps from the sticky event array.
2011-05-06 17:39:09 +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 f663c9770b pad: simplify some more
If we get a context in the chain functions we always need to do a full update of
the context on the peer pad.
2011-05-05 19:24:46 +02:00
Wim Taymans d3e0a37900 pad: improve context passing some more
Pass the context downstream when it got updated.
Have two ways of informing downstream of events, do a full context update when
the CONTEXT_PENDING flag is set and simply forward the event otherwise.
Set the CONTENT_PENDING flag when linking pads.
We don't need to old context anymore when updating the context of a pad.
2011-05-05 19:01:21 +02:00
Sebastian Dröge 292806f60e pad: Fix refcount leak of the parent in the default event dispatch function 2011-05-05 17:05:21 +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 98d1ee4a8f gst: Update everything for the new GstIterator API 2011-05-05 15:36:03 +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
Olivier Crête 40cff0eb6d pad: Send renegotiate event on link 2011-05-05 15:04:33 +02:00
Olivier Crête 581533cd00 pad: Drop renegotiate event if there is no getcaps function on a sink pad
If there is no custom getcaps function on a sink pad, then changes in
downstream caps will never be propagated, so there is no point in trying to
renegotiate the capabilities.
2011-05-05 15:04:25 +02:00
Wim Taymans 77569e0a9a pad: pass the context around
Pass the context from srcpad to sinkpad before dataflow when something
changed.
2011-05-05 13:17:08 +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
Sebastian Dröge c6e9ce64ae 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-05 12:30:05 +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
Wim Taymans 8e76da20b6 Merge branch 'master' into 0.11 2011-04-19 19:30:28 +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
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
Sebastian Dröge 9b2a8b8480 pad: Don't allow fixating ANY caps and remove FIXME 2011-04-18 10:41:18 +02:00
Sebastian Dröge f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02: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
Wim Taymans 468ec5bc40 bufferlist: simplify bufferlists
We now have multiple memory blocks as part of the buffers and we can therefore
reduce the bufferlist to a simple array of buffers.
2011-03-31 17:51:02 +02:00
Wim Taymans 6da19ffeb2 buffer: more buffer updates 2011-03-29 11:07:36 +02:00
Wim Taymans 1eed0785af memory: more fixes
Fix span and is_span
Implement buffer memory
2011-03-28 20:08:45 +02:00
Sebastian Dröge 4e16347bfa Merge branch 'master' into 0.11
Conflicts:
	gst/gstbufferlist.c
2011-03-17 10:50:43 +01: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 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 509abb2162 pad: set boxed type correctly 2011-02-23 10:35:36 +01:00
Wim Taymans 6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01:00