Commit graph

69 commits

Author SHA1 Message Date
Wim Taymans 9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Wim Taymans 6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Sebastian Dröge 5020738a6d elements: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:45:36 +02:00
Sebastian Dröge f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Ole André Vadla Ravnås 037efe8738 elements: Fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:41:17 +02:00
Wim Taymans 6be4dbdb5a Merge branch 'master' into 0.11
Conflicts:
	android/base.mk
	android/controller.mk
	android/dataprotocol.mk
	android/elements.mk
	android/gst-inspect.mk
	android/gst-launch.mk
	android/gst-plugin-scanner.mk
	android/gst.mk
	android/indexers.mk
	android/net.mk
	win32/common/libgstbase.def
2011-04-11 10:26:54 +02:00
Sebastian Dröge ba6054b862 inputselector: Fix getcaps and event function from last commit
Return ANY caps if the parent disappeared, i.e. the template caps
and don't leak events if the parent disappeared.
2011-04-08 14:50:10 +02:00
Havard Graff 297407438a inputselector: Protect against pad-parent disappearing 2011-04-08 14:48:16 +02:00
Wim Taymans a12ede3fb1 Merge branch 'master' into 0.11-fdo
Conflicts:
	gst/gst.c
	libs/gst/base/gstcollectpads.c
2011-03-28 20:11:20 +02:00
Wim Taymans 38ffe30745 memory: more work on implementing buffer memory 2011-03-28 20:08:46 +02:00
Sebastian Dröge 69e81448c1 inputselector: Stop waiting for a pad switch when the pad is flushing 2011-03-19 08:57:06 +01:00
Sebastian Dröge d41fe48ce3 inputselector: Move locking and signalling macros from the header to the source file 2011-03-19 08:57:06 +01:00
Sebastian Dröge c8ecd6e9eb inputselector: Hold the selector lock while reading properties of the active pad 2011-03-17 14:21:17 +01:00
Sebastian Dröge 5e60a80268 inputselector: Make sure that EOS is always sent downstream for the active pad
It can happen that the currently active pad got the EOS event
before it was activated and the previously active pad got the
EOS event after it was deactivated. In that case we have to
send the EOS event from an inactive pad downstream.
2011-03-17 14:10:49 +01:00
Sebastian Dröge f19bb850ac inputselector: Return GST_FLOW_OK until the selected pad pushed something downstream
This makes sure that during switches at no point in time all pads
have returned not-linked, which can happen when playing an audio-only
file with playbin2 and switching between the streams for example.

Fixes bug #644935.
2011-03-17 12:06:39 +01:00
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