Commit graph

354 commits

Author SHA1 Message Date
Thiago Santos
3ed2507ebc queue: queue2: preserve last flow result when pushing events
Avoids mistakenly returning _OK when downstream is still
_NOT_LINKED on subsequent received pad pushes

https://bugzilla.gnome.org/show_bug.cgi?id=725917
2014-03-10 10:10:20 -03:00
Edward Hervey
af6fd4f5bb queue: Remove unneeded checks
item is guaranteed to be non-null.

COVERITY CID 1037152
COVERITY CID 1037153
2013-12-30 16:51:01 +01:00
Wim Taymans
e5a73cc2ff queue: don't ignore event return value
Pass the event return value upstream.
Remove strange goto construct.
2013-12-11 14:52:25 +01:00
Sebastian Rasmussen
53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Edward Hervey
74a1970101 queue: Don't use gst_buffer_get_size() when possible
Makes qst_queue_locked_dequeue 20% faster
2013-11-11 13:28:14 +01:00
Sebastian Dröge
14f817d723 queue: Properly unlock the sinkpad streaming thread when deactivating the pad
https://bugzilla.gnome.org/show_bug.cgi?id=705835
2013-08-20 10:16:41 +02:00
Sebastian Dröge
ec1dd125c7 queue: Clean up after the streaming thread has stopped
https://bugzilla.gnome.org/show_bug.cgi?id=705835
2013-08-19 16:38:16 +02:00
Sebastian Dröge
2f8e572887 queue: Don't hold the queue mutex while doing serialized queries downstream
https://bugzilla.gnome.org/show_bug.cgi?id=702520
2013-06-19 10:53:21 +02:00
Sebastian Dröge
ab6a1085ee (multi)queue: Don't access query items during flushing 2013-05-27 16:38:18 +02:00
Sebastian Dröge
6f042f13ae queue: Fix handling of serialized queries
During FLUSH_START the query needs to be unblocked already, otherwise
it can lead to deadlocks if the FLUSH_START is the result of something
done from the streaming thread of the srcpad (the queue will never be
emptied!).
2013-05-27 15:59:07 +02:00
Sebastian Dröge
b6fac17502 queue/queue2/multiqueue: When flushing, make sure to not lose any sticky events
https://bugzilla.gnome.org/show_bug.cgi?id=688824
2013-05-27 13:01:43 +02:00
Sebastian Dröge
46270f8925 queue: Set the last serialized query result to FALSE when flushing 2013-05-24 18:47:24 +02:00
Sebastian Dröge
8e1f70473b queue: Store sticky events on the srcpad if we're dropping them because of leaking 2013-05-09 12:50:20 +02:00
Wim Taymans
c955ddc712 queue: start pushing again on RECONFIGURE
When we got NOT_LINKED before and we receive a RECONFIGURE event, start pushing
again on the source pad.

See https://bugzilla.gnome.org/show_bug.cgi?id=676304
2013-04-04 19:06:35 +02:00
Alexander Schrab
09bb0c2cdb queue: remove query from queue if queue is flushing
When querying a queue that is flushing we end up adding
a query to the queuearray without taking a reference to
that query (because the normal functionality is to block
until that query is done and discarded from the queue).
This later causes problem if the query is unreffed outside
of the queue before we discard the queue. There is a check
to avoid unreffing any lingering query-objects, but since
the query has been deleted that check fails.

This commit depends on other fixes done to gst_queue_array_find()
and gst_queue_array_drop_element().

https://bugzilla.gnome.org/show_bug.cgi?id=692691
2013-01-30 12:07:52 +00:00
Alessandro Decina
a47e5c72d0 queue: remove unused label. Fixes compiler warning. 2012-11-10 09:51:10 +01:00
Alessandro Decina
c257b19ead queue: don't fail in _sink_event for sticky events
Implement the same behaviour as gst_pad_push_event when pushing sticky events
fails, that is don't fail immediately but fail when data flow resumes and upstream
can aggregate properly.

This fixes segment seeks with decodebin and unlinked audio or video branches.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=687899
2012-11-09 18:42:16 +01:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Tim-Philipp Müller
af2482b170 queue: add "flush-on-eos" property
In flush-on-eos=true mode any data remaining in the queue is
discarded when an EOS event is received, and the EOS passed
downstream as soon as possible (instead of waiting for all
buffers in the queue to get processed by downstream first).

May or may not be useful in capture/encoding scenarios.
2012-10-31 19:33:30 +00:00
Sebastian Dröge
09982c3c13 dataqueue/queuearray: Make public API again
These are actually used outside of coreelements nowadays.
Also hide lots of internals and add padding and documentation.
2012-10-25 14:03:01 +02:00
Tim-Philipp Müller
eecaca9140 queue: answer SCHEDULING query
Instead of letting the default query handler fail.
2012-07-18 09:15:51 +01:00
Tim-Philipp Müller
22d78bad25 queue: embed GstQueueArray structure 2012-07-14 20:26:23 +01:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Sebastian Dröge
af73f3fc02 queue: Fix handling of min-threshold and serialized queries
Only consider the queue empty if the minimum thresholds
are not reached and data is at the queue head. Otherwise
we would block forever on serialized queries.

This also makes sending of serialized events, like caps, happen
faster and potentially improves negotiation performance.

Fixes bug #679458.
2012-07-09 15:40:29 +02:00
Edward Hervey
96b9ae287e queue: Use new GstQueueArray for local storage.
Makes _chain() and _loop() 25% faster
2012-07-04 17:46:54 +02:00
Wim Taymans
76e8b2ecda task: add GDestroyNotify to _new
Add a GDestroyNotify to the user_data we pass to gst_task_new()
Change gst_pad_start_task() to also take the notify
2012-06-20 10:31:49 +02:00
Tim-Philipp Müller
a63829b4ff plugins: use new gst_element_class_set_static_metadata() 2012-04-09 13:05:07 +01:00
Edward Hervey
2bdd71a710 queue: Flush the internal queue when we see GST_FLOW_FLUSHING
Ensures that we don't end up with stale contents (like GstQuery) in
the internal GQueue after any blocking upstream thread returns.
2012-03-29 17:46:35 +02:00
Edward Hervey
c36748177f queue: Don't unref GstQuery travelling through the queue
Unlike events and buffers, the reference is not given to us
2012-03-29 17:46:35 +02:00
Wim Taymans
0addca0810 queue: remove useless PROXY_ALLOCATION flag 2012-03-15 13:42:12 +01:00
Wim Taymans
2e864c4722 queue: add support for serialized queries 2012-03-14 15:42:33 +01:00
Wim Taymans
9a074e0e11 queue: remove some old code 2012-02-21 16:38:37 +01:00
Wim Taymans
ef5292c2ab queue: remove weird link behaviour
Remove the link functions and always start the pad task on the srcpad. If
applications need to autoplug they can put a blocking probe on the srcpad like
they would with any other element.
2012-02-21 12:52:44 +01:00
Wim Taymans
7ab1d62c24 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:18:04 +01:00
Mark Nauwelaerts
9f2077918c queue: use default query function to optionally forward query
... rather than querying peer unconditionally with possibly undesirable
outcome in case of e.g. SCHEDULING query.
2012-02-08 15:38:37 +01:00
Wim Taymans
87b805a639 plugins: proxy allocation query 2012-02-02 12:32:07 +01:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Tim-Philipp Müller
a1daf846f3 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstobject.h
	libs/gst/check/gstcheck.h
	libs/gst/controller/gstcontroller.c
	plugins/elements/gstidentity.c
	tools/gst-xmlinspect.c
2011-12-04 15:38:09 +00:00
Tim-Philipp Müller
5889260d5a Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We can't change most of
these in 0.10 because they're part of our API and ABI.
2011-12-04 13:35:38 +00:00
Edward Hervey
9d6b8d14c3 queue: source and sink pads proxy caps 2011-11-29 11:47:34 +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
39a5e26ea9 pad: add parent to activate functions 2011-11-18 13:54:29 +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
09a8294d36 pad: add parent to the query function 2011-11-16 17:22:56 +01:00
Wim Taymans
06d4828df3 plugins: remove obsolete parent checks 2011-11-16 12:11:12 +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
b7966c0c7d pad: make an ACCEPT_CAPS query
Replace the acceptcaps function with a query.
2011-11-09 17:36:00 +01:00
Wim Taymans
c2c9776027 Merge branch 'master' into 0.11
Conflicts:
	gst/gstbin.c
2011-11-04 19:11:19 +01:00
Tim-Philipp Müller
2f8ac67726 queue: use statically allocated GQueue 2011-11-03 23:08:52 +00:00
Wim Taymans
ea012d3dd7 pad: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS 2011-10-10 11:33:51 +02:00