Commit graph

139 commits

Author SHA1 Message Date
Philippe Normand b1f2359809 bus: destroy signal watch from the context it was mapped to
Don't rely on g_source_remove() because it operates on the main
context. If a signal watch was added to a new thread-default context
g_source_remove() would have no effect. So simply use
g_source_destroy() to avoid this problem.

Additionally the source_id was removed from GstBusPrivate because it
was redundant with the signal watch GSource also stored in that
structure.

https://bugzilla.gnome.org/show_bug.cgi?id=734716
2014-08-13 18:44:39 +03:00
Evan Nemerson 2759882379 introspection: add missing (nullable) annotations to return values
Support for (nullable) was added to G-I at the same time as nullable
return values.  Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.

https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:56:38 +02:00
Evan Nemerson e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Tim-Philipp Müller 6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Jan Schmidt 4d7d3a1c02 Fix extended message handling with gst_bus_pop_timed_filtered()
Make sure extended message types don't get accidentally matched
when not asked for in the mask
2014-03-17 06:29:27 +11:00
Tim-Philipp Müller 5c47cf759a message, bus: do extended message types slightly differently
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 14:38:07 +00:00
Stefan Sauer 8d816e9527 bus: fix the precondition for gst_bus_disable_sync_message_emission()
Use the right variable and invert the test. The precondition should catch
someone calling to once too often.
2013-04-10 21:50:53 +02:00
Stefan Sauer 627d111eb6 bus: update signal docs for gst_bus_enable_sync_message_emission() 2013-04-05 21:24:19 +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
Sebastian Dröge 314eec4ca6 bus: Add allow-none to the function argument of gst_bus_set_sync_handler()
https://bugzilla.gnome.org/show_bug.cgi?id=681139
2012-08-07 10:46:17 +02:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Tim-Philipp Müller c0c79188ca bus, clock: make sure these never have a floating ref
Clear the initial floating ref in the init function for
busses and clocks. These objects can be set on multiple
elements, so there's no clear parent-child relationship
here. Ideally we'd just not make them derive from
GInitiallyUnowned at all, but since we want to keep
using GstObject features for debugging, we'll just do
it like this.

This should also fix some problems with bindings, which
seem to get confused when they get floating refs from
non-constructor functions (or functions annotated to
have a 'transfer full' return type). This works now:

from gi.repository import GObject, Gst

GObject.threads_init()
Gst.init(None)

pipeline=Gst.Pipeline()
bus = pipeline.get_bus()
pipeline.set_state(Gst.State.NULL)
del pipeline;

https://bugzilla.gnome.org/show_bug.cgi?id=679286
https://bugzilla.gnome.org/show_bug.cgi?id=657202
2012-07-09 13:09:45 +01:00
Tim-Philipp Müller 0cb9ad013a Revert "bus: skip gst_bus_create_watch as GSource is not introspectable"
This reverts commit 930e36a89b.

This shouldn't have been pushed, since GSource is now handled
(https://bugzilla.gnome.org/show_bug.cgi?id=657725)
2012-06-26 18:22:33 +01:00
Johan Dahlin 930e36a89b bus: skip gst_bus_create_watch as GSource is not introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=657640
2012-06-26 18:19:18 +01:00
Wim Taymans 6efb5c9b6b bus: add GDestroyNotify to set_sync_handler() 2012-06-20 12:29:35 +02:00
Evan Nemerson 6c6bb0e217 introspection: assorted introspection and documentation fixes
These changes are to clean up syntax issues such as missing colons,
missing spaces, etc., and minor issues such as argument names in
headers not matching the implementation and/or documentation.
2012-06-18 13:11:40 +02:00
Wim Taymans 9aa9751938 review some docs 2012-03-28 18:12:23 +02:00
Sebastian Dröge 9c4c9e3b6b bus: Change the timeout argument type of gst_bus_poll() from GstClockTimeDiff to GstClockTime
This is more consistent with the other GstBus methods that have a timeout.
2012-03-27 12:31:18 +02:00
Sebastian Dröge cfe71423f0 gst: Remove gstmarshal.[ch] completely and use the generic marshaller
Fixes bug #671130.
2012-03-02 11:05:48 +01:00
Wim Taymans b95ceeb09b remove some useless includes in .h 2012-02-27 09:48:06 +01:00
Wim Taymans cd25c05b02 bus: make more fields private 2012-02-27 09:11:36 +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
Tim-Philipp Müller e349e57154 docs: fix typo in bus docs 2012-01-19 11:43:53 +00:00
Wim Taymans 252327f87a Update for new gthread API 2012-01-19 09:27:04 +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
Tim-Philipp Müller 18291a6b40 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstbus.c
	gst/gstevent.c
	libs/gst/base/gstbasetransform.c
2011-12-01 23:35:26 +00:00
Stefan Sauer e34d796e41 bus: use GST_MESSAGE_SOURCE_NAME() which also takes care of src=NULL. 2011-12-01 16:25:07 +01:00
Wim Taymans b7e4eeb0b0 bus: handle NULL message src in debug 2011-11-23 18:05:00 +01:00
Edward Hervey df6044f7eb Merging origin/master
Conflicts:
	gst/gstbin.c
	gst/gstbus.c
	gst/gstdebugutils.c
	gst/gstpad.c
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasesrc.c
2011-10-21 10:52:46 +02:00
Johan Dahlin d0e94754f0 introspection: Rename gst_bus_add_watch_full to gst_bus_add_watch
https://bugzilla.gnome.org/show_bug.cgi?id=657640
2011-10-19 10:23:45 +02:00
Stefan Sauer 2e6b434730 logging: more logging and prefer human readable details over memory locations 2011-10-18 15:24:21 +02:00
Tim-Philipp Müller d42923b014 bus: give watch source a name
Give our GSource a meaningful name. Source names can be
used for debugging and profiling, for example with
systemtap or gdb.
2011-10-16 21:14:03 +01:00
Wim Taymans 8e4f006c57 fix more parent_class 2011-10-16 14:45:03 +02:00
Wim Taymans 40bb69827c Merge branch 'master' into 0.11
Conflicts:
	gst/gstevent.h
2011-10-16 14:20:33 +02:00
Stefan Sauer 72d4bbd8db bus: fix typo in the docs 2011-10-13 17:33:06 +02:00
Sebastian Dröge 9ec1673cae bus: Fix GST_DEBUG parameters to be consistent with the format string 2011-05-11 15:49:11 +02:00
Wim Taymans 108dff2210 message: hide the message structure field
Make a private structure to hold the GstStructure bits of the message.
Add some more useful macros like we have for events.
2011-05-10 13:34:10 +02:00
Wim Taymans 7c8405fa28 bus: fix timeout handling 2011-04-27 18:10:55 +02:00
Tim-Philipp Müller 06ca275916 Revert lockfree GstBus for the release
Drop in old GstBus code for the release to play it safe, since
regressions that are apparently hard to track down and reproduce
have been reported (on windows/OSX mostly) against the lockfree
version, and more time is needed to fix them.

This reverts commit 03391a8970.
This reverts commit 43cdbc17e6.
This reverts commit 80eb160e0f.
This reverts commit c41b0ade28.
This reverts commit 874d60e589.
This reverts commit 79370d4b17.
This reverts commit 2cb3e52351.
This reverts commit bd1c400114.
This reverts commit 4bf8f1524f.
This reverts commit 14d7db1b52.

https://bugzilla.gnome.org/show_bug.cgi?id=647493
2011-04-26 16:14:00 +01:00
Wim Taymans 070cdaab7c Merge branch 'master' into 0.11 2011-04-25 10:30:41 +02:00
Mark Nauwelaerts 03391a8970 bus: also allow popping a message without timeout if no poll available
... which happens in particular flushing a bus, possibly as part
of a state change, e.g. when having a pipeline in a pipeline
and then changing state back to NULL. The interior pipeline
will/might then flush the bus, which is a child bus from the
parent which does not have a poll anymore these days.

https://bugzilla.gnome.org/show_bug.cgi?id=648297
2011-04-21 12:29:34 +01: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 43cdbc17e6 bus: Removed unused GCond 2011-04-08 09:15:56 +02:00
Sebastian Dröge 80eb160e0f bus: Immediately drop messages after calling the sync handler if this is a synchronous bus
Otherwise we might wait forever for the message to be popped from
the queue if a sync handler returned GST_BUS_ASYNC.

https://bugzilla.gnome.org/show_bug.cgi?id=647005
2011-04-08 09:15:56 +02:00
Sebastian Dröge c41b0ade28 bus: Use a construct-only property to distinguish between child buses and normal buses
This allows to only create the socketpair when it is really required instead
of always creating it and immediately destroying it again for child buses.

https://bugzilla.gnome.org/show_bug.cgi?id=647005
2011-04-08 09:15:56 +02:00
Sebastian Dröge 08b98cc7e9 Merge branch 'master' into 0.11 2011-04-06 14:20:59 +02:00
Sebastian Dröge 874d60e589 bus: Add private API to set a GstBus in child mode
This is used by GstBin to create a child bus without
a socketpair because child buses will always work
synchronous. Otherwise too many sockets could be
created and the limit of file descriptors for the
process could be reached.

Fixes bug #646624.
2011-04-06 14:18:35 +02:00
Sebastian Dröge 79370d4b17 Revert "bus: Only create the signalling socket pair when required"
This reverts commit 4bf8f1524f.
2011-04-06 14:12:26 +02:00
Sebastian Dröge 2cb3e52351 Revert "bus: Check if pending messages are in the queue"
This reverts commit bd1c400114.
2011-04-06 14:12:26 +02:00