Commit graph

173 commits

Author SHA1 Message Date
Sebastian Dröge
e40d20c845 inputselector: Notify when the tags property of the selector sinkpads changes
First part of bug #584686.
2010-12-31 00:53:49 +00:00
Jan Schmidt
33ad3b9fad input-selector: Forward segment events for the active pad immediately.
When a segment event is received on the active pad, forward it downstream
immediately instead of deferring it until the next data buffer arrives. This
fixes problems with segment updates never being sent downstream, like those
needed for sparse streams, or for closing previously opened segments.

This fixes playback of DVD menus with a still video frame and an audio track,
for example.

Fixes: #577843
2010-12-31 00:53:49 +00:00
Wim Taymans
983ed52e92 selector: merge the tags
Merge the tags received on the input-selector sinkpads instead of only keeping
the last one we saw.
2010-12-31 00:53:49 +00:00
Stefan Kost
6b4f792065 docs: various doc fixes
No short-desc as we have them in the element details.
Also keep things (Makefile.am and sections.txt) sorted.
Reword ambigous returns. No text after since please.
2010-12-31 00:53:49 +00:00
Sebastian Dröge
ab025f08e7 inputselector: Fix compilation, activate_sinkpad() has no notify parameter 2010-12-31 00:53:49 +00:00
Michael Smith
55637934d1 input-selector: Activate and notify pad before processing events.
Events should trigger pad selection if we don't already have an
explicitly selected pad, so that events prior to first buffer don't get
lost.
2010-12-31 00:53:49 +00:00
Michael Smith
09424e4b3a Unref event if we don't forward it, unref pads when done with them. 2010-12-31 00:53:48 +00:00
Michael Smith
981d08088c plugins/elements/gstinputselector.c: Ensure we emit notify::active-pad when auto-selecting a pad due to it having activit...
Original commit message from CVS:
* plugins/elements/gstinputselector.c:
Ensure we emit notify::active-pad when auto-selecting a pad
due to it having activity and us not having an existing active
pad. Fixes #563147
2010-12-31 00:53:48 +00:00
Edward Hervey
acafa09a74 plugins/elements/gstinputselector.c: Gracefully handle the cases when we dont' have otherpad.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_input_selector_event),
(gst_input_selector_query):
Gracefully handle the cases when we dont' have otherpad.
Fixes #556430
2010-12-31 00:53:47 +00:00
Wim Taymans
9020592e1c plugins/elements/gstinputselector.c: Reset the selector state when going to READY.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_reset),
(gst_input_selector_reset), (gst_input_selector_change_state):
Reset the selector state when going to READY.
2010-12-31 00:53:46 +00:00
Wim Taymans
f7dad96f47 plugins/elements/gstinputselector.c: Reuse the get_linked_pads for both source and sinkpads because they are the same.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_input_selector_init),
(gst_input_selector_event), (gst_input_selector_query):
Reuse the get_linked_pads for both source and sinkpads because they are
the same.
Implement a custum event handler and get the internally linked pad
directly instead of relying on the default (slower) implementation.
2010-12-31 00:53:45 +00:00
Wim Taymans
a7cd6eeb61 plugins/elements/gstinputselector.c: Implement the LATENCY query in a better way by taking the latency of all sinkpads an...
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_input_selector_init),
(gst_input_selector_query):
Implement the LATENCY query in a better way by taking the latency of all
sinkpads and taking the min/max instead of just taking a random pad.
2010-12-31 00:53:44 +00:00
Wim Taymans
81a4e467f8 plugins/elements/gstinputselector.c: Move the select-all logic into the activation of the currently selected pad. We want...
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_bufferalloc),
(gst_selector_pad_chain), (gst_input_selector_getcaps),
(gst_input_selector_activate_sinkpad):
Move the select-all logic into the activation of the currently selected
pad. We want to remember the last pad with activity in select-all mode.
Fix the getcaps function, we can produce the union of the upstream caps
in select-all mode, not the intersection like proxy_getcaps() does.
2010-12-31 00:53:43 +00:00
Stefan Kost
7408736455 Do not use short_description in section docs for elements. We extract them from element details and there will be war...
Original commit message from CVS:
* ext/dc1394/gstdc1394.c:
* ext/ivorbis/vorbisdec.c:
* ext/jack/gstjackaudiosink.c:
* ext/metadata/gstmetadatademux.c:
* ext/mythtv/gstmythtvsrc.c:
* ext/theora/theoradec.c:
* gst-libs/gst/app/gstappsink.c:
* gst/bayer/gstbayer2rgb.c:
* gst/deinterlace/gstdeinterlace.c:
* gst/rawparse/gstaudioparse.c:
* gst/rawparse/gstvideoparse.c:
* gst/rtpmanager/gstrtpbin.c:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpjitterbuffer.c:
* gst/rtpmanager/gstrtpptdemux.c:
* gst/rtpmanager/gstrtpsession.c:
* gst/rtpmanager/gstrtpssrcdemux.c:
* plugins/elements/gstinputselector.c:
* plugins/elements/gstoutputselector.c:
* gst/videosignal/gstvideoanalyse.c:
* gst/videosignal/gstvideodetect.c:
* gst/videosignal/gstvideomark.c:
* sys/oss4/oss4-mixer.c:
* sys/oss4/oss4-sink.c:
* sys/oss4/oss4-source.c:
Do not use short_description in section docs for elements. We extract
them from element details and there will be warnings if they differ.
Also fixing up the ChangeLog order.
2010-12-31 00:53:20 +00:00
Wim Taymans
62ba72b862 plugins/elements/gstinputselector.c: Do g_object_notify() only when not holding the lock to get the property because othe...
Original commit message from CVS:
* plugins/elements/gstinputselector.c:
(gst_input_selector_set_active_pad), (gst_input_selector_switch):
Do g_object_notify() only when not holding the lock to get the property
because otherwise we run into a deadlock with the deep-notify handlers
that are possibly installed.
2010-12-31 00:53:19 +00:00
Wim Taymans
a64e95d347 plugins/elements/gstinputselector.c: Release the selector lock when pad alloc happens on a non selected pad.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_event), (gst_selector_pad_bufferalloc),
(gst_selector_pad_chain), (gst_input_selector_set_active_pad):
Release the selector lock when pad alloc happens on a non selected pad.
2010-12-31 00:53:18 +00:00
Wim Taymans
c9de8f457a plugins/elements/gstinputselector.c: Add pad property to configure behaviour of the unselected pad, it can return OK or N...
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_init), (gst_selector_pad_set_property),
(gst_selector_pad_get_property), (gst_selector_pad_event),
(gst_selector_pad_bufferalloc), (gst_selector_pad_chain),
(gst_input_selector_set_active_pad):
Add pad property to configure behaviour of the unselected pad, it can
return OK or NOT_LINKED, based on the use case.
2010-12-31 00:53:17 +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
6e03b710e8 plugins/elements/gstinputselector.c: Add lots of debugging.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_event),
(gst_selector_pad_bufferalloc), (gst_selector_pad_chain),
(gst_input_selector_class_init),
(gst_input_selector_set_active_pad),
(gst_input_selector_set_property),
(gst_input_selector_push_pending_stop):
Add lots of debugging.
Fix time member in the newsegment event.
2010-12-31 00:53:15 +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
Wim Taymans
2495420116 plugins/elements/gstinputselector.c: Don't leak event on pads that are not linked. Fixes #512826.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_event):
Don't leak event on pads that are not linked. Fixes #512826.
2010-12-31 00:51:12 +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