Commit graph

17 commits

Author SHA1 Message Date
Thiago Santos
88a898080a inputselector: Only try to push the first EOS received
Subsequent EOS will push on the source pad that already received
EOS and that will make the event function return FALSE. It needs
only to push the first one and only return TRUE for the subsequent
ones.
2015-04-24 17:19:49 -03:00
Jan Alexander Steffens (heftig)
0a3ded1932 input-selector: Remove 'blocked' flag
With the disappearance of the 'block' signal, this
flag cannot be set to TRUE.

gst_input_selector_wait disappears as it never waits
and just returns self->flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=736891
2015-03-24 09:42:14 -03:00
Jan Alexander Steffens (heftig)
7a1ebbe0e3 input-selector: Remove obsolete 'block' signal
This signal blocks the input-selector with no means of unblocking
other than a state change back to READY. It seems this signal was
part of an old way of synchronously switching the selector,
together with the already-removed 'switch' signal.

Removing the signal is safe, as attempting to use it could only
end in deadlocks. Attempting to emit an unknown signal just causes
g_criticals.

https://bugzilla.gnome.org/show_bug.cgi?id=736891
2015-03-24 09:42:14 -03:00
Song Bing
11e4b744f5 inputselector: Block when receiving an EOS event on a deactivated pad
... and only unblock when either a) the pad becomes active and the event
should be forwarded or b) the active pad went EOS itself.

Otherwise it can happen that we switch from a longer track that is not EOS yet
to a shorter track that already is EOS, but the shorter track won't have any
possibility to send its EOS event downstream anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=740949
2014-12-24 13:33:12 +01:00
Stefan Sauer
d8bee3c769 inputselector: fix printf format
The padcount is uint. Also add comments to the instance vars.
2014-10-03 13:47:42 +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
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
14632db174 plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01: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
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Sebastian Dröge
9c4ce4ae16 inputselector: Port to the new segment API
The switch action signal with the stop and start running times
is not necessary anymore. Closing of segments is not necessary
and adjusting the start running time of a segment can later be
done with new GstPad API.
2011-05-19 12:17:30 +02:00
Sebastian Dröge
5229a26a76 inputselector: Add sync mode that syncs inactive pads to the running time of the active pad
Fixes bug #645017.
2011-05-14 11:39:35 +02:00
Tim-Philipp Müller
c57934d7bf inputselector: remove "select-all" property
select-all mode is a bit broken (e.g. newsegment event
handling), so remove that for now. The funnel element
in farsight provides similar functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=539042
https://bugzilla.gnome.org/show_bug.cgi?id=638381
2011-01-05 15:53:28 +00:00
Wim Taymans
a7c7574dcf plugins/elements/gstinputselector.*: Figure out the locking a bit more.
Original commit message from CVS:
* plugins/elements/gstinputselector.c:
(gst_selector_pad_get_running_time), (gst_selector_pad_reset),
(gst_selector_pad_event), (gst_selector_pad_bufferalloc),
(gst_input_selector_wait), (gst_selector_pad_chain),
(gst_input_selector_class_init), (gst_input_selector_init),
(gst_input_selector_dispose), (gst_segment_set_start),
(gst_input_selector_set_active_pad),
(gst_input_selector_set_property),
(gst_input_selector_get_property),
(gst_input_selector_get_linked_pad),
(gst_input_selector_is_active_sinkpad),
(gst_input_selector_activate_sinkpad),
(gst_input_selector_request_new_pad),
(gst_input_selector_release_pad),
(gst_input_selector_change_state), (gst_input_selector_block),
(gst_input_selector_switch):
* plugins/elements/gstinputselector.h:
Figure out the locking a bit more.
Mark buffers with discont after switching.
Fix initial segment forwarding, make sure to only forward one segment
regardless of what the sequence of buffers/segments is. See #522203.
Improve flushing when blocked.
Return NOT_LINKED when a stream is not selected.
Not API change for the switch signal in the docs.
Fix start/time/accum values of the new segment.
Correctly unlock and flush a blocking selector when going to READY.
2010-12-31 00:53:16 +00:00
Wim Taymans
3fcc406815 plugins/elements/gstinputselector.*: Various cleanups.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_finalize), (gst_selector_pad_get_property),
(gst_selector_pad_event), (gst_input_selector_class_init),
(gst_input_selector_init), (gst_input_selector_set_active_pad),
(gst_input_selector_set_property),
(gst_input_selector_get_property),
(gst_input_selector_request_new_pad),
(gst_input_selector_release_pad),
(gst_input_selector_push_pending_stop),
(gst_input_selector_switch):
* plugins/elements/gstinputselector.h:
Various cleanups.
Added tags to the pads.
Select active pad based on the pad object instead of its name.
Fix refcount in set_active_pad.
Add property to get the number of pads.
* plugins/elements/gstoutputselector.c:
(gst_output_selector_class_init),
(gst_output_selector_set_property),
(gst_output_selector_get_property):
Various cleanups.
Select the active pad based on the pad object instead of its name.
Fix locking when setting the active pad.
* plugins/elements/gstselector-marshal.list:
* tests/check/elements/selector.c: (cleanup_pad),
(selector_set_active_pad), (run_input_selector_buffer_count):
Fixes for pad instead of padname for pad selection.
2010-12-31 00:53:14 +00:00
Stefan Kost
7b742d1cf4 plugins/elements/gstinputselector.*: Added "select-all" property to make it work like aggregator in 0.8.
Original commit message from CVS:
* plugins/elements/gstinputselector.c:
* plugins/elements/gstinputselector.h:
Added "select-all" property to make it work like aggregator in 0.8.
* plugins/elements/gstoutputselector.c:
Fix resend-latest behavoiur.
* tests/check/Makefile.am:
* tests/check/elements/.cvsignore:
* tests/check/elements/selector.c:
Add unit tests for selector.
2010-12-31 00:52:48 +00:00
Stefan Kost
c9f97beda7 Replace the switch plugin with the selector plugin. Add output- selector as the opposite of input-selectoo (was switc...
Original commit message from CVS:
* configure.ac:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/gst-plugins-bad-plugins.args:
* docs/plugins/gst-plugins-bad-plugins.hierarchy:
* docs/plugins/gst-plugins-bad-plugins.interfaces:
* docs/plugins/gst-plugins-bad-plugins.signals:
* docs/plugins/inspect/plugin-metadata.xml:
* docs/plugins/inspect/plugin-selector.xml:
* docs/plugins/inspect/plugin-soundtouch.xml:
* docs/plugins/inspect/plugin-switch.xml:
* plugins/elements/.cvsignore:
* plugins/elements/Makefile.am:
* plugins/elements/gstinputselector.c:
* plugins/elements/gstinputselector.h:
* plugins/elements/gstoutputselector.c:
* plugins/elements/gstoutputselector.h:
* plugins/elements/gstselector-marshal.list:
* plugins/elements/gstselector.c:
* plugins/elements/selector.vcproj:
* gst/switch/.cvsignore:
* gst/switch/Makefile.am:
* gst/switch/gstswitch-marshal.list:
* gst/switch/gstswitch.c:
* gst/switch/gstswitch.h:
* gst/switch/switch.vcproj:
* tests/icles/.cvsignore:
* tests/icles/Makefile.am:
* tests/icles/output-selector-test.c:
Replace the switch plugin with the selector plugin. Add output-
selector as the opposite of input-selectoo (was switch). Add a test
for output-selector. Add docs for the elements. The vcproj needs
update. Fixes #500142.
2010-12-31 00:51:12 +00:00