Commit graph

54 commits

Author SHA1 Message Date
Tim-Philipp Müller
c8ffd4e395 docs: mention extra input-selector pad properties
https://bugzilla.gnome.org/show_bug.cgi?id=638381
2011-01-06 18:18:29 +00: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
Tim-Philipp Müller
7f7721511c inputselector: make pad's get_type function thread-safe 2010-12-31 12:08:19 +00:00
Sebastian Dröge
3f89954c27 inputselector: Protected g_object_notify() calls for the active-pad with a recursive mutex
This works around a thread safety problem in GLib < 2.26.0 and should
be removed when we depend on 2.26.0.

Fixes bug #607513.
2010-12-31 12:27:45 +01:00
Tim-Philipp Müller
d692735f49 coreelements: GST_BOILERPLATE already sets parent_class 2010-12-31 00:56:11 +00:00
Tim-Philipp Müller
fdd65e382d input-selector, output-selector: minor clean-ups 2010-12-31 00:56:11 +00:00
Tim-Philipp Müller
52617c91f3 coreelements: move input-selector and output-selector to core
Moved to core from gst-plugins-bad.

https://bugzilla.gnome.org/show_bug.cgi?id=614306
2010-12-31 00:55:19 +00:00
Stefan Kost
246bb32dc5 inputselector: log times in human readable form 2010-12-31 00:54:05 +00:00
Stefan Kost
64beb26a56 inputselector: move reoccuring logs to LOG and remove a double info
Less debug spew in DEBUG category. No need to log pad again if we use
GST_LOG_OBJECT(pad,...).
2010-12-31 00:54:05 +00:00
Stefan Kost
d86c6f1956 various (gst): add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed.
2010-12-31 00:54:05 +00:00
Stefan Kost
04c4e4fb9e inputselector: sync with copy in -base
Use _get_caps_reffed to avoid copies.
2010-12-31 00:54:05 +00:00
Stefan Kost
0da59d0795 inputselector: use GST_BOILERPLATE macro 2010-12-31 00:54:04 +00:00
Benjamin Otte
0b37d8bf36 gst_element_class_set_details => gst_element_class_set_details_simple 2010-12-31 00:54:04 +00:00
Sebastian Dröge
9d21103d42 Revert "inputselector: Protect g_object_notify() with the object's mutex"
This reverts commit 7e067615ff, it's causing
deadlocks with playbin2.
2010-12-31 00:54:04 +00:00
Kipp Cannon
15b1ee56d4 inputselector: Protect g_object_notify() with the object's mutex
This works around the thread unsafety of g_object_notify()

Fixes bug #607513.
2010-12-31 00:54:04 +00:00
Sebastian Dröge
acf1616ae1 inputselector: Remove useless variables and fix a uninitialized variable compiler warnings
Merged from gst-plugins-base, dfd51aa82a.
2010-12-31 00:54:04 +00:00
Sebastian Dröge
9b2753c6e9 inputselector: Make sure that running_time->timestamp calculation never becomes negative
Merged from gst-plugins-base, f365385458.
2010-12-31 00:54:04 +00:00
Sebastian Dröge
a1f6660655 inputselector: Use the start time (i.e. timestamp) as the last stop
Using the end time makes it impossible to replace buffers, which is
a big problem for subtitles that could have very long durations.

Merged from gst-plugins-base, 27034be461.
2010-12-31 00:54:04 +00:00
Sebastian Dröge
8b2d4ad8a3 inputselector: Improve debugging
Merged from gst-plugins-base.
2010-12-31 00:54:04 +00:00
Wim Taymans
9515cbcd08 Revert "inputselector: use get_caps_reffed()"
This reverts commit 49ec4f796a.

We can't use this new function yet.
2010-12-31 00:54:04 +00:00
Wim Taymans
b74b0f04f2 inputselector: use get_caps_reffed() 2010-12-31 00:54:04 +00:00
Stefan Kost
e955afd503 inputselector: also add inline to the proto to fix the build 2010-12-31 00:54:04 +00:00
Edward Hervey
f0010f15a9 gst: Remove dead assignments and resulting unused variables
Merged from gst-plugins-base, 8cd1b5209b.
2010-12-31 00:54:04 +00:00
Sebastian Dröge
d7669fa9cc inputselector: Use the same iterate internal links function as in gst-plugins-base 2010-12-31 00:54:04 +00:00
Tim-Philipp Müller
13cf296cb0 input-selector: Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a sixteenth of a polar bear.

Merged from gst-plugins-base, 6f4c1ac583.
2010-12-31 00:53:58 +00:00
David Schleef
11dc5f63cb input-selector: Remove Ronald Bultje from Authors field
Replaced with "GStreamer maintainers
<gstreamer-devel@lists.sourceforge.net>" or just removed,
depending on the number of other authors.

Merged from gst-plugins-base, 0e9bc5125a.
2010-12-31 00:53:50 +00:00
Wim Taymans
199c1bdbcb inputselector: set output caps before pushing
Set the output caps on the srcpad before pushing the buffer because else core
will do a rather expensive check to see if we can actually accept those caps on
the srcpad.

Merged from gst-plugins-base, bdfb4b46d7.
2010-12-31 00:53:50 +00:00
Wim Taymans
7c7acac0db inputselector: install an acceptcaps function
Install a custom acceptcaps function instead of using the default expensive
check. We accept whatever downstream accepts so we pass along the acceptcaps
call to the downstream peer.

Merged from gst-plugins-base, 5b72f2adf9.
2010-12-31 00:53:50 +00:00
Sebastian Dröge
8ee3931e5d inputselector: Use new single iterator for the internally linked pads
This fixes a deadlock and removes some useless code.
2010-12-31 00:53:50 +00:00
Sebastian Dröge
1543b0ea08 inputselector: Use iterate internal links instead of deprecated get internal links 2010-12-31 00:53:50 +00:00
Wim Taymans
bccc960734 inputselector: don't leak pads in iterator 2010-12-31 00:53:49 +00:00
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