Bug 204656

Summary: gstreamer parse wrongly a file uri with localhost
Product: [Fedora] Fedora Reporter: Patrice Dumas <pertusus>
Component: gstreamerAssignee: Adam Jackson <ajax>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: bnocera
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-01 11:34:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrice Dumas 2006-08-30 17:04:15 UTC
Description of problem:

For FC6 gstreamer-0.10.9-2.

gstreamer appears to parse wrongly an file uri with localhost. When 
testing perl-GStreamer, it appeared that gsteamer doesn't resolve an 
uri like
file://localhost/usr/share/wesnoth/music/elf-land.ogg
to /usr/share/wesnoth/music/elf-land.ogg

$ perl /usr/share/doc/perl-GStreamer-0.09/examples/player.pl
/usr/share/wesnoth/music/elf-land.ogg
Playing: /usr/share/wesnoth/music/elf-land.ogg
Resource not found. at /usr/share/doc/perl-GStreamer-0.09/examples/player.pl
line 21.

An strace shows that gstreamer tries to open 
/localhost/usr/share/wesnoth/music/elf-land.ogg

gstreamer-0.10.4-1.x86_64.rpm
don't show that issue on FC5

Ville thinks that it's a bug:
from RFC 3986 section 3.2.2:

  "For example, the "file" URI scheme is defined so that no authority, an
   empty host, and "localhost" all mean the end-user's machine [...]"

Version-Release number of selected component (if applicable):

0.10.9-2

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Bastien Nocera 2007-02-01 11:29:37 UTC
$ gst-launch gnomevfssrc location=file://localhost/home/bnocera/Music/file.mp3 !
fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 729841000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...

$ gst-launch playbin uri=file://localhost/home/bnocera/Music/file.mp3
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /playbin0/source: Resource not found.
Additional debug info:
gstfilesrc.c(975): gst_file_src_start (): /playbin0/source:
No such file "localhost/home/bnocera/Music/file.mp3"
Setting pipeline to NULL ...
FREEING pipeline ...

It's playbin's fault.

Comment 2 Bastien Nocera 2007-02-01 11:34:21 UTC
I filed the bug upstream, as it's definitely a problem with playbin:
http://bugzilla.gnome.org/show_bug.cgi?id=403172

In the meanwhile, you can work-around this by setting playbin's source element
to gnomevfssrc in your code:
  source              : Source element
                        flags: readable
                        Object of type "GstElement"