I am currently making a new element which is mostly controlling a set
of other contained elements, so we're subclassing Gst.Bin. As well, we happen to be writing this in Python, but I think that's basically irrelevant for my question. GstBin has an annoying habit of treating any foo=bar parameter fed to it as a proxy to be sent to a child named foo. As a result we just spent several hours debugging our application, only to discover that a misspelled element property was being silently ignored. We would dearly love to NOT have the GstChildProxy interface active on our GstBin as we want no external access to the contents of the bin. However, I know of no safe way of disabling an existing interface. Failing that, some way to intercept the property setting calls to the GstChildProxy interface would at least allow us to issue an error in case of a bad property. We're actually seriously considering hacking up the source for GstBin to produce an UnproxiedBin to derive from, but that sort of defeats our attempts to move away from C to Python in the first place. -- Stirling Westrup (he/him) Programmer, Entrepreneur. http://www.linkedin.com/in/swestrup (+1) 514-626-0928 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi, This is a problem related to the translation between the C and Python bindings. It's a separate interface in C. So you can either force Python to access g_object_set instead of gst_child_proxy_set .. Or maybe you can re-implement GstChildProxy in the subclass in a version that does nothing. Olivier On Fri, 2021-02-12 at 15:42 -0500, Stirling Westrup wrote:
-- Olivier Crête _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Fri, Feb 12, 2021 at 4:45 PM Olivier Crête
<[hidden email]> wrote: > > Hi, > > This is a problem related to the translation between the C and Python bindings. It's a separate interface in C. So you can either force Python to access g_object_set instead of gst_child_proxy_set .. > > Or maybe you can re-implement GstChildProxy in the subclass in a version that does nothing. Thanks, but I'm rather new to Python and haven't the slightest idea how to do either of these things. There isn't a single Python example I can find online where a GStreamer interface is defined, or even just used, in a Python element. -- Stirling Westrup (he/him) Programmer, Entrepreneur. http://www.linkedin.com/in/swestrup (+1) 514-626-0928 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
I don't know of any GStreamer specific example, but it's the same as GTK.. so here is a GtkTreeModel ... https://gist.github.com/andialbrecht/4463278 You should also be able to call GObject.set_property(bin,...) to force calling the right class Olivier On Tue, 2021-02-16 at 10:03 -0500, Stirling Westrup wrote: > On Fri, Feb 12, 2021 at 4:45 PM Olivier Crête > <[hidden email]> wrote: > > > > Hi, > > > > This is a problem related to the translation between the C and Python bindings. It's a separate interface in C. So you can either force Python to access g_object_set instead of gst_child_proxy_set .. > > > > Or maybe you can re-implement GstChildProxy in the subclass in a version that does nothing. > > Thanks, but I'm rather new to Python and haven't the slightest idea > how to do either of these things. There isn't a single Python example > I can find online where a GStreamer interface is defined, or even just > used, in a Python element. > > -- Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |