GNOME Bugzilla – Bug 643625
g_warning from filesrc ! decodebin
Last modified: 2011-03-02 00:17:14 UTC
ds@ginger:~$ gst-launch-0.10 filesrc location=out.mp4 ! decodebin2 ! pngenc snapshot=false ! multifilesink location=%05d.png 0:00:00.018852301 883 0x90b0a0 ERROR filesrc gstfilesrc.c:376:gst_file_src_set_location: filename out.mp4 uri (null) 0:00:00.018888339 883 0x90b0a0 ERROR filesrc gstfilesrc.c:378:gst_file_src_set_location: The pathname 'out.mp4' is not an absolute path Setting pipeline to PAUSED ... (gst-launch-0.10:883): GStreamer-CRITICAL **: gst_uri_is_valid: assertion `uri != NULL' failed (gst-launch-0.10:883): GStreamer-CRITICAL **: gst_query_set_uri: assertion `gst_uri_is_valid (uri)' failed Pipeline is PREROLLING ... I added some GST_ERROR debugging to show that g_filename_to_uri() is failing for non-absolute paths. None of this code has changed in a while, so I don't know why I'm getting this now. Happens with both decodebin and decodebin2.
Fixed by this I believe: commit 1f59906ec1a20645b1c299e835fa2d14c197b5eb Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Feb 24 15:32:00 2011 +0000 filesrc, filesink: fix URI creation regression for non-absolute locations Passing e.g. location=foo would lead to warnings because g_filename_to_uri() wants an absolute file path and returns NULL otherwise. Use brand-new gst_filename_to_uri() instead, which will try harder to create a proper URI for us. Also add unit test. commit 27027a2dd2c57d088e2a8b8d71c7526cf8083787 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Feb 24 15:18:43 2011 +0000 uri: add gst_filename_to_uri() that takes relative filenames Add function that (unlike the GLib equivalent) also accepts paths that aren't absolute and will clean up relative markers such as ./ and ../ before forming a URI. Fixes warnings with e.g. filesrc location=foo ! typefind caused by the recent switch to g_filename_to_uri(), but also actually creates valid URIs for the first time. Windows code paths could need some more work, e.g. we don't clean up the relative markers there for now (because path could have \ and / as separators). API: gst_filename_to_uri()