Commit graph

11842 commits

Author SHA1 Message Date
Wim Taymans
ba6b915651 base: avoid using buffer caps
Comment all code using buffer caps.
Rework capsfilter code a little.
Fix some unit tests
2011-05-08 12:46:17 +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
e444493793 selector: don't unset caps 2011-05-06 17:39:09 +02:00
Wim Taymans
8ca3f9e71a typefind: don't unset caps 2011-05-06 17:39:08 +02:00
Wim Taymans
5f06f3b0ae check: let the normal code unset caps 2011-05-06 17:39:08 +02:00
Wim Taymans
cac9e8fee2 outputselector: handle NULL pads in some cases 2011-05-06 17:39:08 +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
ac1e42402a porting: update porting doc 2011-05-06 12:23:01 +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
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
0069dc08ec basetransform: Don't get the parent twice in the setcaps function 2011-05-05 18:21: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
53d5a38a21 win32: Update exports 2011-05-05 16:05:20 +02:00
Sebastian Dröge
8ce0fea199 tests: Update for new GstIterator API 2011-05-05 15:36:04 +02:00
Sebastian Dröge
3d807c228c docs/def: Add new symbols, remove old symbols 2011-05-05 15:36:04 +02:00
Sebastian Dröge
caa16f2fa9 elements: Update everything for the new GstIterator API 2011-05-05 15:36:04 +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
aebe4a3c13 basetransform: In getcaps() prefer the caps order and caps of downstream if possible 2011-05-05 15:22:08 +02:00
Sebastian Dröge
a6c1cbe69a basetransform: Prefer caps order given by the subclass of the template caps order 2011-05-05 15:20:10 +02:00
Sebastian Dröge
07f59f5404 basesrc: Use the reconfigure flag on the pad instead of the event 2011-05-05 15:20:02 +02:00
Sebastian Dröge
1cc95da945 basetransform: Use new reconfigure flag on the pads instead of the reconfigure event 2011-05-05 15:19:56 +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
Sebastian Dröge
0179530bf1 basesrc: Only renegotiate once after receiving a renegotiate event
Also make this threadsafe.
2011-05-05 15:04:16 +02:00
Thiago Santos
93904ef3ad basesrc: Handle the new renegotiate event
Makes basesrc handle the new renegotiate event by using a
renegotiate flag.
2011-05-05 15:03:54 +02:00
Sebastian Dröge
24cef7aa2f basetransform: Also call gst_base_transform_reconfigure() on renegotiate events 2011-05-05 15:02:56 +02:00
Thiago Santos
3baed25383 basetransform: Handle the new renegotiate event
Let basetransform push a renegotiate event upstream
when it gets a new suggestion
2011-05-05 15:02:46 +02:00
Thiago Santos
a3dd59e97a event: Adding new renegotiate event 2011-05-05 15:02:39 +02:00