Commit graph

6320 commits

Author SHA1 Message Date
Wim Taymans
407f45dc7f event: add STICKY_MULTY events
Add a new event flag for sticky events so that multiple events of that type can
be stored on a pad at the same time. Change the _get_sticky_event() function to
loop over the multiple events of a type.
Change the foreach function to make it possible to removed and modify the sticky
events on a pad.
Use an variable size array now to store the events. This could later be
optimized some more.
2011-11-23 18:05:00 +01:00
Wim Taymans
b7e4eeb0b0 bus: handle NULL message src in debug 2011-11-23 18:05:00 +01:00
Wim Taymans
03cdd32b33 bufferlist: avoid reading past the array
When the foreach function told us to remove the buffer from the list, decrease
the length of the array or else we might read past the last item in the array.
2011-11-23 18:05:00 +01:00
Wim Taymans
31b79556b8 pad: take peerpad correctly
Don't take the peerpad too early, it might change because of the
probes.
2011-11-23 08:17:36 +01:00
Wim Taymans
dd65aae9a1 pad: rework sticky events
Rewrite sticky events, trying to make it a bit more simple.
When sticky events are pushed on a srcpad, store them in the sticky event
array and mark the event with received = FALSE.
When the sticky event is successfully sent to the peer pad, make
received = TRUE.
Keep a PENDING_EVENTS pad flag that is set when one of the events is in
the received = FALSE state for some reason.
when activating a sinkpad, mark all events received = FALSE on the peer
srcpad.
When pushing a buffer, check the PENDING_EVENTS flag and if it is set, push all
events to the peer pad first.
2011-11-22 18:40:49 +01:00
Wim Taymans
165af7c903 gst: add new flags 2011-11-22 18:40:49 +01:00
Wim Taymans
9c8d323d07 padd return value from _mini_object_replace() 2011-11-22 12:45:41 +01:00
Matej Knopp
6ea74a0572 Fix printf format compiler warnings on OSX/64bit
https://bugzilla.gnome.org/show_bug.cgi?id=664491
2011-11-22 00:51:06 +00:00
Wim Taymans
d890017021 pad: fix locking order error 2011-11-21 17:43:51 +01:00
Wim Taymans
fda5685a15 ghostpad: fix print format 2011-11-21 17:43:04 +01:00
Wim Taymans
6e0a724394 pad: Add destroy notify to pad functions
Add _full variants of the pad function setters that take a destroy notify.
Make some macros that make the old method name pass NULL to this new
function.
2011-11-21 15:47:01 +01:00
Wim Taymans
2f1ed65339 pad: Merge pad mode activation functions
Add the pad mode to the activate function so that we can reuse the same function
for all activation modes. This makes the core logic smaller and allows for some
elements to make their activation code easier. It would allow us to add more
scheduling modes later without having to add more activate functions.
2011-11-21 13:29:05 +01:00
Wim Taymans
9e3aa102d7 docs: update design doc
also fix default alignment value (0 == no-alignment)
2011-11-18 18:08:21 +01:00
Wim Taymans
770159fb1c query: improve scheduling query
Turns some boolean arguments in the scheduling query to flags, which are easier
to extend and makes the code easier to read.
Make extra methods for configuring and querying the supported scheduling modes.
This should make it easier to add new modes later.
2011-11-18 17:27:16 +01:00
Wim Taymans
016d404ccf query: move flags closer to buffering query 2011-11-18 14:08:45 +01:00
Wim Taymans
39a5e26ea9 pad: add parent to activate functions 2011-11-18 13:54:29 +01:00
Wim Taymans
12d5f03453 pad: fix scheduling mode enums
GstPadActivateMode -> GstPadMode
GST_PAD_ACTIVATE_* -> GST_PAD_MODE_*
2011-11-18 12:39:55 +01:00
Wim Taymans
612b1fbb14 pad: add parent to other functions
Add parent to chain, chain_list, getrange and event functions.
2011-11-17 12:40:45 +01:00
Wim Taymans
361a7ae44d add parent to internal links 2011-11-16 17:49:46 +01:00
Wim Taymans
09a8294d36 pad: add parent to the query function 2011-11-16 17:22:56 +01:00
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
a641b0ce39 don't require parent element to proxy 2011-11-16 10:31:40 +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
e85198bc32 _query_peer_*() -> _peer_query_*() 2011-11-15 17:50:34 +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
28b14092d2 utils: fix docs 2011-11-15 16:16:53 +01:00
Wim Taymans
0796586fce utils: fix the proxy functions
fix the proxy functions for query_accept_caps and query_caps to use the pad
forward helper functions which correctly forwards on the internally linked pads.
2011-11-15 16:13:59 +01:00
Wim Taymans
9b98ef4fed pad: improve some flag macros 2011-11-15 16:13:28 +01:00
Wim Taymans
9f00a24b5e pad: fix debug line 2011-11-15 16:13:15 +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
d162d97e1f query: add caps query 2011-11-14 11:26:17 +01:00
Tim-Philipp Müller
32e7c5d1ef query: remove GST_QUERY_LAST 2011-11-14 09:57:32 +00:00
Wim Taymans
d1a8695470 fix docs 2011-11-14 10:27:01 +01:00
Stefan Sauer
faf31366ab controller: remove functions to add/remove controlled properties
Make that implizit with attaching/detaching controlsources. This is a lot easier
and has less invalid state (controlled property without control source).
2011-11-14 10:02:55 +01:00
Tim-Philipp Müller
de3e83759e uri: clean up header files
Tabs to spaces.
2011-11-13 23:14:15 +00:00
Tim-Philipp Müller
df20630d78 urihandler: fix return type of get_protocols() 2011-11-13 23:07:58 +00:00
Tim-Philipp Müller
7652df7352 urihandler: fix return type of _get_uri_type()
Return a GstURIType and not a plain guint.
2011-11-13 20:56:02 +00:00
Tim-Philipp Müller
682704750c urihandler: pass GError argument to gst_uri_handler_set_uri()
Also let gst_uri_handler_set_uri check already if the protocol
is supported, so that not every uri handler has to do that
itself.
2011-11-13 18:04:55 +00:00
Tim-Philipp Müller
35df64357f urihandler: make _get_uri() return a copy
For thread-safety.
2011-11-13 15:51:44 +00:00
Tim-Philipp Müller
34e3e26467 urihandler: remove "new-uri" signal
No one but filesrc used that API. Should probably be replaced by
requiring an "uri" property instead, and then objects can do a
notify on that. Also removed interface structure padding, it's
not needed.
2011-11-13 15:37:40 +00:00
Tim-Philipp Müller
bb18ca7fa4 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tools/gst-inspect.c
2011-11-13 13:23:09 +00:00
Tim-Philipp Müller
4d6795dcd1 gst, controller: replace g_list_prepend + reverse with GQueue 2011-11-12 14:57:48 +00:00
Tim-Philipp Müller
ae5e44bfb3 docs: fix typo in buffer docs 2011-11-12 14:04:10 +00:00
René Stadler
4d58535d7c query: do not return a ref from parse_accept_caps
Makes this exactly like gst_event_parse_caps. This is what current code
expects, so it fixes some leaks.
2011-11-12 01:53:13 +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
Stefan Sauer
870a5b0e12 docs: fix invalid xml 2011-11-11 17:08:19 +02:00
Wim Taymans
5be6ad56a5 buffer: avoid < -1 sizes 2011-11-11 10:00:35 +01:00