Commit graph

144 commits

Author SHA1 Message Date
Thiago Santos
5bb45ffbfc inputselector: handle gap events
Use gap events to advance the selector's pad position.

This is relevant to keep sync_streams mode working when one of the
streams doesn't have data all the time.
2013-11-29 15:03:44 -03:00
Arnaud Vrac
9bc26c5f25 input-selector: Fix missing pad activation notification
A new active pad might not be notified in some cases, which results
in the current track number not being set in playbin.

The active-pad notification is only sent in the chain and sink_event
functions, and only when the buffer or event that triggered the active
pad selection is from the newly activated pad. So in the other case
the notification will never be sent.

https://bugzilla.gnome.org/show_bug.cgi?id=704691
2013-07-23 08:59:07 +02:00
Sebastian Dröge
eaf333248a inputselector: Don't push new stream-start events on stream change unless they all have group ids
https://bugzilla.gnome.org/show_bug.cgi?id=704408
2013-07-22 15:30:10 +02:00
Sebastian Dröge
717ad20912 inputselector: Deactivate and remove pad without the inputselector lock
Otherwise we might get deadlocks caused by lock order inversion:
During the chain function the stream lock is first locked and then the
inputselector lock. During pad release we first locked the inputselector
lock and then deactivating the pad would lock the stream lock.

There's no reason why the inputselector lock should be required while
deactivating and removing the pad, it's only needed before.

https://bugzilla.gnome.org/show_bug.cgi?id=704002
2013-07-12 10:08:26 +02:00
Sebastian Dröge
c8cfaff1ff inputselector: Keep previous active sinkpad around until we're done with it
Otherwise we'll send a new segment event downstream for each buffer.
2013-07-10 14:30:31 +02:00
Brendan Long
f0a3d8bb09 input-selector: send notify::active signal for input-selector pads.
https://bugzilla.gnome.org/show_bug.cgi?id=701319
2013-06-06 17:16:47 +02:00
Brendan Long
76f0e18f92 input-selector: return FALSE for "active" property if selector is NULL
https://bugzilla.gnome.org/show_bug.cgi?id=701323
2013-06-04 17:46:25 +02:00
Sebastian Dröge
1d40478014 inputselector: Forward all sticky events, including stream-start 2013-05-09 12:15:48 +02:00
Sebastian Dröge
a257cb6f5b inputselector: Try to not push read-only buffers
We should only increase the refcount before pushing if we're
really going to use the buffer afterwards.
2013-04-25 16:39:52 +02:00
Arnaud Vrac
b4a91de1be inputselector: fix clock leak in wait_running_time
https://bugzilla.gnome.org/show_bug.cgi?id=688477
2012-11-17 10:17:58 +00: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
Jan Schmidt
8d8608c23b ghostpad: Make some debugging more verbose
Also, remove an unnecessary #include in input-selector
2012-08-31 06:25:37 -07:00
Arnaud Vrac
dc86e65265 inputselector: fix clock leak
https://bugzilla.gnome.org/show_bug.cgi?id=682997
2012-08-30 19:47:57 +01:00
Edward Hervey
0eb13f146f inputselector: Wait for other streams to advance on unselected pads
Otherwise we end up dropping a lot of data in the case where data starts
arriving on the non-selected pad, resulting in big gaps in stream switching
2012-08-14 18:44:38 +02:00
Edward Hervey
6b447acc3c inputselector: More debug statements 2012-08-14 18:43:54 +02:00
Edward Hervey
c33d2f7aba inputselector: Don't forward stream-start sticky events
Only one STREAM_START event should be let through, else it will
confuse downstream elements that think a new stream is starting
whereas in fact we are just switching to a different input.

In the future we might want to let them through but with the same
sequence number.
2012-08-14 18:42:31 +02:00
Edward Hervey
ea761a24b4 inputselector: Use the first created pad by default
This guarantees a bit more consistency in which input stream will
be selected by default. It would previously be the first pad on which
an event/buffer/query was received ... which was racy and non-predictable.
2012-08-06 11:36:29 +02:00
Tim-Philipp Müller
a9d1c529f6 input-selector: use generic marshaller for "block" action signal 2012-08-05 16:48:27 +01:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Tim-Philipp Müller
31976c426e inputselector: remove some dead code for old GLib versions 2012-06-26 17:30:19 +01:00
Thiago Santos
42fab9db45 inputselector: avoid notify-tags holding lock
unlock before issuing this notification to prevent
deadlocks when other elements reacts to new tags.

Fixes #678220
2012-06-21 11:15:07 -03:00
Sebastian Dröge
7b966e4577 inputselector: Only proxy the allocation query for the active pad and send reconfigure events to the old/new pad when switching pads 2012-06-19 10:32:10 +01:00
Andre Moreira Magalhaes (andrunko)
83559a5970 inputselector: Correctly get current running time when syncing to the segment information
Fixes bug #677263.
2012-06-01 16:37:50 +02:00
Andre Moreira Magalhaes (andrunko)
0dca0dac71 inputselector: Don't try to sync on the segment if it has no TIME format
...and wait until it is actually configured and has a format before
trying to sync.
2012-05-31 17:46:23 +02:00
Sebastian Dröge
7aff9dba0e inputselector: No need to broadcast the signal in flush-stop
Everything stopped at this point already.

Conflicts:

	plugins/elements/gstinputselector.c
2012-05-31 17:05:08 +02:00
Andre Moreira Magalhaes (andrunko)
2f6dadaa7c inputselector: Properly sync when changing streams
This adds properties to use the clock time for deciding when
to drop buffers for inactive pads and a property to buffer all
not rendered buffers for the active pad to allow pad switching
without losing any buffers at all.

Conflicts:

	plugins/elements/gstinputselector.c
2012-05-31 12:38:20 +02:00
Tim-Philipp Müller
cd3875857e gst_tag_list_free() -> gst_tag_list_unref() 2012-05-28 00:08:18 +01:00
Sebastian Dröge
014d10391c inputselector: Set sequence number on segment events 2012-04-16 10:27:29 +02:00
Sebastian Dröge
3146282d48 inputselector: Forward all sticky events when switching pads 2012-04-16 10:22:53 +02:00
Sebastian Dröge
655bfbf776 inputselector: Send reconfigure event on the new active pad when pads are switched 2012-04-16 09:46: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
Sebastian Dröge
4b6c3c7fea Merge remote-tracking branch 'origin/0.10'
Conflicts:
	plugins/elements/gstmultiqueue.c
2012-03-29 14:54:53 +02:00
Sebastian Dröge
d03e3d7772 inputselector: Only wait until the active pad's running time is reached if the active pad already saw data
Otherwise we might block forever because upstream (e.g. multiqueue) is waiting
for the previously active stream to return forever (which is waiting here
in inputselector) before pushing something on the newly selected stream.
2012-03-29 14:47:57 +02:00
Tim-Philipp Müller
654b074477 input-selector: default to sync-streams=true
I think this is the expected behaviour, and we couldn't do this
in 0.10 for backwards-compatibility reasons, so change it now.
2012-02-21 21:07:49 +00:00
Wim Taymans
7ab1d62c24 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:18:04 +01:00
Wim Taymans
87b805a639 plugins: proxy allocation query 2012-02-02 12:32:07 +01:00
Tim-Philipp Müller
13d91d1f6c Use recent GLib API unconditionally now that we depend on the latest GLib 2012-01-22 01:25:22 +00:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Sebastian Dröge
148bf27ce3 Merge branch 'master' into 0.11 2012-01-10 13:00:07 +01:00
Idar Tollefsen
b9b3795c3c plugins: explicitly cast initialization values to the correct type
https://bugzilla.gnome.org/show_bug.cgi?id=667288
2012-01-04 23:59:57 +00:00
Tim-Philipp Müller
eaa2d81474 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstindexfactory.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstfakesink.c
	plugins/elements/gstfakesrc.c
	plugins/elements/gstidentity.c
	plugins/elements/gstinputselector.c
	plugins/elements/gstoutputselector.c

Note: did not merge any of the basetransform changes from 0.10.
2011-12-08 00:39:10 +00:00
Sebastian Dröge
47de97df84 inputselector: Don't send a NEWSEGMENT event if a buffer arrived before the segment was configured 2011-12-07 11:01:49 +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
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
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