Re: How to get id of/remove a default handler?

On Sat, Aug 01, 2009 at 09:27:01AM -0700, machinegodzilla wrote:
> I think I understand but I still don't know how to proceed with my case (-:
> In your example what arguments would you pass to the
> g_signal_handlers_block_by_func() function? How do I get the 'func' one
> ("The C closure callback of the handlers") in my case?

You can't.  Of course, you can subclass GstBin, override the class
handler in the subclass and avoid chaining to the original hanlder in
the new handler if you don't want it to be invoked.

Don't do that.

If there is a class closure then the class implementation expects it to
be invoked.  If it is not invoked when it should be the object can get
into an inconsistent state because something that was assumed to happen
did not happen.

It might seem work now but it can break any time.

You can never know.

So, instead the questions are:
- what precise action of the class handler you need to prevent?
- why?
- if because it results in something invoked in your code you want to
  prevent, you can prevent that in your code.
- if the action is necessary for the object to maintain its internal
  state then you simply cannot avoid it.
- if it is not strictly necessary or could be performed differently
  then ask for a gstreamer ehnancement that enable to control how or
  whether it is done.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]