Re: Gst::PlayBin2 signal_get_audio_tags trouble
- From: José Alburquerque <jaalburquerque cox net>
- To: kitone <kitone free fr>
- Cc: gtkmm-list gnome org
- Subject: Re: Gst::PlayBin2 signal_get_audio_tags trouble
- Date: Sun, 13 Dec 2009 23:19:01 -0500
On Sun, 2009-12-13 at 11:27 +0100, kitone wrote:
> Hi,
> I've some trouble to using the Gst::PlayBin2 element, specially the
> signals signal_get_*_tags.
>
> With gstreamer (C) we can used g_signal_emit_by_name to received the
> tags. ex:
>
> for (i = 0; i < n_audio; i++) {
> g_signal_emit_by_name (pipeline, "get-audio-tags", i, &tags);
> ...
>
> Now, how can I do used the Gst::PlayBin2::signal_get_audio_tags to
> receive the tags list ? In this case, connect to my own callback is not
> what I want to do and I don't thing is what we need to do, I'm wrong ?
No, you're not wrong (I think). What's wrong was my understanding of
these signals. Apparently, these are "action" signals (which I was not
fully aware of). From the docs[1], they can be thought of as object
methods that can be called generically (sort of like how a regular
method might be used).
[1]
http://library.gnome.org/devel/gobject/2.22/gobject-Signals.html#GSignalFlags
One way to get similar functionality in C++ is to include an equivalent
method definition in the plug-in source to emit the signal with the
right parameters and generate the correct return.
Another way (more general, but would affect all *mm module signals)
would be to make it possible for the Glib::SignalProxy<> classes to emit
their corresponding signals.
The first way (modifying the plug-in sources) is easily achievable by
modifying the plug-in generation tool in gstreamermm. The second also
seems possible but only from having quickly skimmed the
Glib::SignalProxy<> source code.
To get this right I know I could work on the first way fairly quickly.
I can also submit a patch for the second, but that would require
approval from the glibmm maintainers.
For now, I guess that using the Gst::PlayBin2's gobj() with the C API
and the Gst::TagList's specific Glib::wrap() method to wrap the
resulting GstTagList would be the way to do things until this is
resolved in an upcoming release.
--
José
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]