GNOME Bugzilla – Bug 673481
"Resource not found" error when setting png-source
Last modified: 2012-06-07 13:53:43 UTC
If I code a Python script setting up the png file to overlay where I define the pipeline, all works. If I set the png path image in an other function, I got: Error: Resource not found. gstfilesrc.c(1028): gst_file_src_start (): /GstPipeline:player/GstFileSrc:png-source is this a bug or simply I'm wrong? (No BT) Thanks. Regards, Francesco Bruni
Can you attach a minimal testcase here please?
I coded: in the "__init__" I set my pipeline (that works correcly testing it on shell); then I call a function to start to play my video. In this last function I use another one to set the image which have to be overlayed on screen. It hase to change dynamically, so I have to, each time I need, create an image and overlay it. So I coded: def __init__(self): self.png_source = gst.element_factory_make("filesrc", "png-source") def start(self,w): ... show() ... def show(self) ... #here I use another function to create the image ... self.png_source.set_property("location",self.filepath_image) self.timeout_source = glib.timeout_add(self.sleep_time, self.show) I hope to have been clear enough.
If I understand what you're doing, then you're doing it wrong. If you want to change location at run time, you will have to bring the filesrc to READY, change location, then bring it back to PLAYING. If you want to have no overlay at startup, then either start with a alphaed image, or look in the overlay element if there's a "display" or "visible" property or something similar. Another way would be to remove filesrc entirely, and use coglogoinsert, which probably supports switching at runtime (I've not checked). In case I misunderstood what you're doing, feel free to reopen giving more details.