Gst-Python add/remove source error

facepalm ejlungay at gmail.com
Thu Aug 20 05:47:46 UTC 2020


I can add a new source into the current running pipeline via:

rfbsrc = Gst.ElementFactory.make("rfbsrc", None)
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/


More information about the gstreamer-devel mailing list