Gst-Python add/remove source error

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Gst-Python add/remove source error

facepalm
This post was updated on .
I can add a new source into the current running pipeline via:

rfbsrc = Gst.ElementFactory.make("rfbsrc", None)
self.pipeline.add(rfbsrc)
rfbsrc.link(self.compositor)
self.pipeline.set_state(Gst.State.PLAYING)

I don't have a problem with it cause it does add the new source and displays
the video.

The problem is when removing a source. I use this code to remove a resource:

- given I have 2 rfbsrc added to the pipeline:
- I use this to remove:

elname = "rfbsrc{}".format(num)
elem = self.pipeline.get_by_name(elname)
elem.set_state(Gst.State.NULL)

self.pipeline.remove(elem)
self.compositor.unlink(elem)
self.pipeline.unlink(elem)
self.pipeline.set_state(Gst.State.PLAYING)

I got this error:

gst-resource-error-quark: Error on setup VNC connection to host 127.0.0.1 on
port 5903 (9)
gstrfbsrc.c(524): gst_rfb_src_fill (): /GstPipeline:myPipe/GstRfbSrc:rfbsrc3
gst-resource-error-quark: Error on setup VNC connection to host 127.0.0.1 on
port 5903 (9)
gstrfbsrc.c(524): gst_rfb_src_fill (): /GstPipeline:myPipe/GstRfbSrc:rfbsrc3

Can someone give me hint on how to properly remove a source? Thank you



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