continuous play

Harald Sitter sitter at kde.org
Mon Sep 16 18:51:05 BST 2013


On Mon, Sep 16, 2013 at 8:34 PM, Thiago Macieira <thiago at kde.org> wrote:
> Actually, the problem is in the C++ side.
>
> A file called "\xe92.ogg" is NOT QUrl("é2.ogg").
>
> There are two problems with that: first, that you forgot the "file:" part.

yes but no :P

The phonon gstreamer debug is what is not correct because it simply
qDebugs the QUrl object, however what is actually passed to gstreamer
is:
QFile::encodeName("file://" + url).toPercentEncoding(encodingExclude);

hence why gstreamer actualy gets a correct encoding and scheme:
>> > gstfilesrc.c:1141:gst_file_src_uri_set_uri:<source> Invalid URI
>> > 'file://%C3%A92.ogg' for filesrc: The URI 'file://%C3%A92.ogg' is invalid

> Second, an "é" in a URL is ALWAYS "%C3%A9", which corresponds to a file name
> "\xc3\xa92.ogg". There's no way to change that, not now, not ever, and any
> implementation that allows that is broken.
>
> If you want to reach the file called "\xe92.ogg", you need to write "%E92.ogg".

    const QFileInfo fileInfo(filename);
    if (fileInfo.exists()) {
        bool localFs = QAbstractFileEngine::LocalDiskFlag &
QFSFileEngine(filename).fileFlags(QAbstractFileEngine::LocalDiskFlag);
        if (localFs && !filename.startsWith(QLatin1String(":/")) &&
!filename.startsWith(QLatin1String("qrc://"))) {
            d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());

Nothing else happens between MediaSource("\xe92.ogg") and the qDebug,
so  QUrl::fromLocalFile is what comes up with QUrl("é2.ogg").

HS
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list