After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643625 - g_warning from filesrc ! decodebin
g_warning from filesrc ! decodebin
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-01 22:30 UTC by David Schleef
Modified: 2011-03-02 00:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Schleef 2011-03-01 22:30:11 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.
Comment 1 Tim-Philipp Müller 2011-03-02 00:17:14 UTC
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()