python version of `g_signal_emit_valist ()`

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

python version of `g_signal_emit_valist ()`

wzhouuuu
Hi all,

I'm using splitmuxsink to save chunk of videos. I'd like to use its signal
`split-now`. However, how should I send that signal using Python? I saw
there's a C++ implementation,  but i can't find any python implementation.
      signals[SIGNAL_SPLIT_NOW] =
      g_signal_new ("split-now", G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
      G_STRUCT_OFFSET (GstSplitMuxSinkClass, split_now), NULL, NULL, NULL,
      G_TYPE_NONE, 0);



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: python version of `g_signal_emit_valist ()`

Thibault Saunier-4
Hi,

You should be able to simply do:


``` python
splitmux = Gst.ElementFactory.make("splitmuxsink")                                                                                                                                                                                                                                                                    
....
splitmux.emit("split-now")                                                                                                                                                                                                                                                                                           
```

The documentation[0] is broken for action signals and I opened a bug about that[1].

Regards

- Thibault


On Tue, Sep 29, 2020 at 8:45 PM wzhouuuu <[hidden email]> wrote:
Hi all,

I'm using splitmuxsink to save chunk of videos. I'd like to use its signal
`split-now`. However, how should I send that signal using Python? I saw
there's a C++ implementation,  but i can't find any python implementation.
      signals[SIGNAL_SPLIT_NOW] =
      g_signal_new ("split-now", G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
      G_STRUCT_OFFSET (GstSplitMuxSinkClass, split_now), NULL, NULL, NULL,
      G_TYPE_NONE, 0);



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


--
Thibault Saunier, Igalia - www.igalia.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel