Commit graph

5756 commits

Author SHA1 Message Date
Wim Taymans 22d64af104 tools: avoid using pad caps
Avoid directly accessing the pad caps, use gst_pad_get_current_caps() instead.
2011-05-09 10:54:10 +02:00
Wim Taymans 24573211c6 Merge branch 'master' into 0.11 2011-05-08 13:14:55 +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 73f3b3fb75 event: don't ref the caps
Use a different way of getting the caps from the caps event so that no
refcounting happens.
2011-05-08 12:38:05 +02:00
Wim Taymans d43cdfbf37 buffer: avoid using buffer caps 2011-05-08 12:37:44 +02:00
Wim Taymans 02e5feb2bf pad: avoid using the old GST_PAD_CAPS
Don't use GST_PAD_CAPS but instead use the new gst_pad_get_current_caps()
method.
Avoid setting caps on buffers.
2011-05-06 19:04:54 +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 dcc5570f7f bin: let the pad clean up in activate 2011-05-06 17:39:08 +02:00
Wim Taymans 3d949e988b element: don't mess with pad caps in activate
When deactivating a pad, let the pad decide what fields to clear.
2011-05-06 17:39:08 +02:00
Wim Taymans 3122f429cd event: only allow fixed caps in caps event 2011-05-06 17:39:08 +02:00
Sebastian Dröge 903dadef17 event: Improve documentation of gst_event_new_reconfigure() 2011-05-06 13:01:24 +02:00
Wim Taymans fb3da828e5 element: rename gst_element_lost_state_full()
Rename gst_element_lost_state_full() to gst_element_lost_state() and
remove the old method name.
2011-05-06 12:19:16 +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
Stefan Kost 218bc52c7f info: avoid redefinition of symbols when debugging is off
The refactoring of gst_debug_add_log_function() now causes build failure when
debug-logging is turned off. Just move it to the conditional part of the header.
2011-05-06 12:02:52 +03:00
Wim Taymans 14b619c170 event: reorder events
Reorder the sticky events so that they are in the order they should be pushed.
2011-05-06 11:00:18 +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 348563bc19 iterator: Refactor GstIterator to be more binding friendly and have saner refcounting
Fixes bug #638987.
2011-05-05 15:33:29 +02:00
Johan Dahlin 62c7339847 iterator: register as a boxed type
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:29 +02:00
Johan Dahlin b5a4aad134 iterator: use GSlice
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:29 +02:00
Johan Dahlin 0e2cf0caa1 iterator: free struct in gst_iterator_free
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:28 +02:00
Johan Dahlin 47ebd0755b iterator: store size in the struct
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:28 +02:00
Sebastian Dröge dc63e38219 caps: Merge structures when intersecting instead of appending them
This prevents adding duplicates over and over again to the resulting
caps if they already describe the new intersection result.

While this changes intersection from O(n*m) to O(n^2*m), it results in
smaller caps, which in the end will decrease further processing times.

For example in an audioconvert ! audioconvert ! audioconvert pipeline,
when forwarding the downstream caps preference in basetransform
(see e26da72de25a91c3eaad9f7c8b2f53ba888a0394) this results in
16 instead of 191 caps structures.
2011-05-05 15:22:14 +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
Sebastian Dröge 25916cff66 event: Rename renegotiate event to reconfigure
In 0.11 this event will also do reconfiguration of buffer pools
and similar things, not just renegotiation.
2011-05-05 15:06:00 +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
Thiago Santos a3dd59e97a event: Adding new renegotiate event 2011-05-05 15:02:39 +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 e72d062b33 gst: init the GType early 2011-05-05 13:17:08 +02:00
Wim Taymans 08dbe37f6f context: add foreach function
Add a function to iterate over all stored events.
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
Miguel Angel Cabrera Moya 419f48d0d1 parse: don't unescape inside quotes
Escaped characters inside quoted strings are supposed to be unescaped by
deserialization functions, not by parsing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=648025
2011-05-05 12:30:05 +02:00
Sebastian Dröge e22f5d8a68 bin: Only post EOS messages after reaching the PLAYING state
Fixes bug #647756.
2011-05-05 12:30:05 +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
Sebastian Dröge 5a6ef6408f element: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-05 12:30:05 +02:00
Sebastian Dröge 5c84883f2e bin: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-05 12:30:05 +02:00
Sebastian Dröge 65eafd9340 Merge branch 'master' into 0.11
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/gstelementfactory.c
	gst/gstminiobject.c
2011-05-05 12:27:51 +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 0fee137dbc context: add helper object to manage events
Add a helper object to manage the events that define the context of a buffer and
a stream.
2011-05-04 15:20:10 +02:00
Wim Taymans 6cfd9d57e2 event: add new CAPS event
Add a new CAPS event that will be used to negotiate downstream elements. It'll
also stick on pad so that we can remove the GstCaps field on pads and the
GstCaps field on buffers.
2011-05-04 11:03:05 +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