Qt4-preview-feedback Archive, March 2008
Phonon does not like UNC paths - parse error?
Message 1 in thread
Good morning,
I observe that Phonon cannot open or play files specified using Uniform
Naming Convention (UNC). I found this in my own application but can
reproduce it using the Music Player example program. The environment is
Windows XP and MSVC 2005.
The path I tried to open was "\\rosecomputer\c\RoseCall.mp3". The
Filemon utility shows that the actual filename used was
"C:\Qt\4.4.0-beta1\examples\phonon\musicplayer\rosecomputer\c\RoseCall.mp3".
This appears to be a parsing error -- you can see the server name
embedded in the path.
QT in general has no difficulty with UNC names, and QSound works fine.
Is this a Phonon bug?
regards
Jim Thompson
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
Message 2 in thread
Hello again,
This afternoon I did a little debugging and found a few things.
Mediagraph.cpp has a wee bit of logic that will either convert the
specified filename to URL format -- or it will pass it on verbatim. I
find that when passing in a UNC name, it is converted to an URL -- and
then it later fails. If the UNC is passed on verbatim, the file opens,
plays, and all is well.
Code snippet from Mediagraph.cpp... (comments are mine)
case Phonon::MediaSource::LocalFile:
{
QString url;
if (source.url().isValid()) {
url = source.url().toString(); // Failure case!
"\\rosecomputer\c\RoseCall.mp3" will be converted to
"file://rosecomputer/c/RoseCall.mp3"
} else if (!source.fileName().isEmpty()) {
url = source.fileName(); //Success case:
no conversion
}
m_renderId = m_thread->addUrlToRender(url);
}
By reducing the above to the following, both my app and the example
Music Player work fine with files across a Windows network.
case Phonon::MediaSource::LocalFile:
{
m_renderId =
m_thread->addUrlToRender(source.fileName());
}
At this point, I don't know if it's the backend interface or directx
that is unable to handle the URL format. But it's pretty clear that
there's a bug here somewhere.
regards
Jim
Jim Thompson wrote:
> Good morning,
>
> I observe that Phonon cannot open or play files specified using
> Uniform Naming Convention (UNC). I found this in my own application
> but can reproduce it using the Music Player example program. The
> environment is Windows XP and MSVC 2005.
>
> The path I tried to open was "\\rosecomputer\c\RoseCall.mp3". The
> Filemon utility shows that the actual filename used was
> "C:\Qt\4.4.0-beta1\examples\phonon\musicplayer\rosecomputer\c\RoseCall.mp3".
> This appears to be a parsing error -- you can see the server name
> embedded in the path.
>
> QT in general has no difficulty with UNC names, and QSound works fine.
>
> Is this a Phonon bug?
>
> regards
> Jim Thompson
>
>
> To unsubscribe - send "unsubscribe" in the subject to
> qt4-preview-feedback-request@xxxxxxxxxxxxx
>
>
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx