Re: gstmm add element to pipeline test
- From: José Alburquerque <jaalburquerque cox net>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list gnome org
- Subject: Re: gstmm add element to pipeline test
- Date: Thu, 06 Dec 2007 15:25:09 -0500
Murray Cumming wrote:
On Thu, 2007-12-06 at 12:48 -0500, José Alburquerque wrote:
Also, it seems
the destructor is not called unless the "signal watches" have been
removed first. Maybe a boolean can tell whether the signal has been
enabled and then not have to call add_signal_watch any more.
Hmm, then I guess we must force the application developer to call
remove_watch(). Very unpleasant. I still don't think we understand
enough about this, but I'll happily apply a patch in the meantime.
I know it may be a bit of a quick response, but below is the question I
posted on the gstreamer-dev list on the gst bus signal watch functions
and a reply:
-------- Original Message --------
Subject: [gst-devel] Question on gst_bus_add/remove_signal_watch functions
Date: Thu, 06 Dec 2007 13:44:30 -0500
From: José Alburquerque <jaalburquerque cox net>
To: gstreamer-devel lists sourceforge net
Hello everyone. I'm involved in gstreamermm with other developers in
order to provide C++ bindings for gstreamer. We're moving along quite
nicely so far, but some of us will most likely ask a few questions here
every so often (I hope this is fine :-)). One such question is related
to the gst_bus_add/remove_signal_watch[_full] functions (which I'm
presently working on right now). As I understand the docs,
gst_add_signal_watch[_full] can be called several times, but
remove_signal_watch must be called the same number of times to remove
the watches.
My question is: does the message signal get transmitted as many times
as gst_bus_add_signal_watch() has been called or just once regardless?
If so, why allow several calls to gst_bus_add_signal_watch(). Also, am
I correct in assuming that the GstBus is not destroyed unless
gst_bus_remove_signal_watch() is called the same number of times that
gst_bus_add_signal_watch[_full]() has been called?
I appreciate answers as this is relevant to the C++ "wrapping" process
that we are using for the C++ bindings. Thanks.
Sincerely
Jose
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
-------- Original Message --------
Subject: Re: [gst-devel] Question on gst_bus_add/remove_signal_watch
functions
Date: Thu, 06 Dec 2007 20:12:44 +0000
From: Tim Müller <t i m zen co uk>
To: gstreamer-devel lists sourceforge net
References: <4758430E 5070609 cox net>
On Thu, 2007-12-06 at 13:44 -0500, José Alburquerque wrote:
> One such question is related
> to the gst_bus_add/remove_signal_watch[_full] functions (which I'm
> presently working on right now). As I understand the docs,
> gst_add_signal_watch[_full] can be called several times, but
> remove_signal_watch must be called the same number of times to remove
> the watches.
>
> My question is: does the message signal get transmitted as many times
> as gst_bus_add_signal_watch() has been called or just once regardless?
The signal gets emitted exactly once per message, regardless of how
often gst_bus_add_signal_watch() has been called.
> If so, why allow several calls to gst_bus_add_signal_watch().
To make it easier for independent pieces of code to watch for the same
signal (they don't need to worry about what's done elsewhere in the
application or in other libraries, but only need to call _add/_remove as
required for their own purposes).
> Also, am I correct in assuming that the GstBus is not destroyed unless
> gst_bus_remove_signal_watch() is called the same number of times that
> gst_bus_add_signal_watch[_full]() has been called?
Yes: gst_bus_add_signal_watch() calls gst_bus_add_watch_full() which
calls gst_bus_create_watch() which takes a reference to the bus, and
that reference is not dropped until the source is removed, which only
happens when _remove_signal_watch() has been called as many times as
_add_signal_watch() has been called before.
Cheers
-Tim
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]