<br><br><div class="gmail_quote">2011/8/22 Michael A. Puls II <span dir="ltr"><<a href="mailto:shadow2531@gmail.com">shadow2531@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If Opera passes a file URI to vlc like this:<br>
<br>
vlc.exe file://localhost/test.mp3<br>
<br>
, vlc reports:<br>
<br>
File reading failed:<br>
VLC could not open the file "\\localhost\c:\test.mp3".<br>
Your input can't be opened:<br>
VLC is unable to open the MRL 'file://localhost/c:/test.mp3'<u></u>. Check the<br>
log for details.<br>
<br></blockquote><div><br></div><div>Does file:///localhost/test.mp3 work better?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
In src/input/input.c, there's the following code for handling<br>
"file://localhost/", but it looks like it's not defined for Win32.<br>
<br>
----------<br>
/* FIXME: file:// handling plugins do not support URIs properly...<br>
* So we pre-decode the URI to a path for them. Note that we do not do<br>
it<br>
* for non-standard VLC-specific schemes. */<br>
if( !strcmp( psz_access, "file" ) )<br>
{<br>
if( psz_path[0] != '/' )<br>
#ifndef WIN32<br>
{ /* host specified -> only localhost is supported */<br>
static const size_t i_localhost = sizeof("localhost")-1;<br>
if( strncmp( psz_path, "localhost/", i_localhost + 1) != 0 )<br>
{<br>
msg_Err( p_input, "cannot open remote file `%s://%s'",<br>
psz_access, psz_path );<br>
msg_Info( p_input, "Did you mean `%s:///%s'?",<br>
psz_access, psz_path );<br>
goto error;<br>
}<br>
psz_path += i_localhost;<br>
}<br>
#else<br>
{<br>
/* XXX: very very ugly. Always true for valid URIs though. */<br>
if( (psz_path - psz_dup) >= 2 && psz_path[-2] && psz_path[-1]<br>
)<br>
{<br>
*(--psz_path) = '\\';<br>
*(--psz_path) = '\\';<br>
}<br>
}<br>
else<br>
/* Strip leading slash in front of the drive letter */<br>
psz_path++;<br>
#endif<br>
/* Then URI-decode the path. */<br>
decode_URI( psz_path );<br>
#if (DIR_SEP_CHAR != '/')<br>
/* Turn slashes into anti-slashes */<br>
for( char *s = strchr( psz_path, '/' ); s; s = strchr( s + 1, '/'<br>
) )<br>
*s = DIR_SEP_CHAR;<br>
#endif<br>
}<br>
----------<br><font color="#888888">
<br>
-- <br>
Michael<br>
______________________________<u></u>_________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/<u></u>listinfo/vlc-devel</a><br>
</font></blockquote></div><br>