Ticket #10689: bd_non-Latin1-filenames.2.patch

File bd_non-Latin1-filenames.2.patch, 2.9 KB (added by dluzin@…, 13 years ago)

removed irrelevant encoding conversion of bd rip path (filename) passed to LOG() function

  • libs/libmythtv/bdringbuffer.cpp

    old new bool BDRingBuffer::OpenFile(const QStrin 
    284284        filename = lfilename;
    285285    }
    286286    safefilename = filename;
    287287
    288288    LOG(VB_GENERAL, LOG_INFO, LOC + QString("Opened BDRingBuffer device at %1")
    289             .arg(filename.toLatin1().data()));
     289            .arg(filename));
    290290
    291291    // Ask mythiowrapper to update this object on file open progress. Opening
    292292    // a bluray disc can involve opening several hundred files which can take
    293293    // several minutes when the disc structure is remote. The callback allows
    294294    // us to 'kick' the main UI - as the 'please wait' widget is still visible
    295295    // at this stage
    296     mythfile_open_register_callback(filename.toLatin1().data(), this,
     296    mythfile_open_register_callback(filename.toLocal8Bit().data(), this,
    297297                                    file_opened_callback);
    298298
    299299    QMutexLocker locker(&m_infoLock);
    300300    rwlock.lockForWrite();
    301301
    bool BDRingBuffer::OpenFile(const QStrin 
    304304
    305305    QString keyfile = QString("%1/KEYDB.cfg").arg(GetConfDir());
    306306    QByteArray keyarray = keyfile.toAscii();
    307307    const char *keyfilepath = keyarray.data();
    308308
    309     bdnav = bd_open(filename.toLatin1().data(), keyfilepath);
     309    bdnav = bd_open(filename.toLocal8Bit().data(), keyfilepath);
    310310
    311311    if (!bdnav)
    312312    {
    313313        rwlock.unlock();
    314         mythfile_open_register_callback(filename.toLatin1().data(), this, NULL);
     314        mythfile_open_register_callback(filename.toLocal8Bit().data(), this, NULL);
    315315        return false;
    316316    }
    317317
    318318    m_metaDiscLibrary = bd_get_meta(bdnav);
    319319
    bool BDRingBuffer::OpenFile(const QStrin 
    371371    // Set parental level "age" to 99 for now.  TODO: Add support for FE level
    372372    bd_set_player_setting(bdnav, BLURAY_PLAYER_SETTING_PARENTAL, 99);
    373373
    374374    // Set preferred language to FE guide language
    375375    const char *langpref = gCoreContext->GetSetting(
    376         "ISO639Language0", "eng").toLatin1().data();
     376        "ISO639Language0", "eng").toLocal8Bit().data();
    377377    QString QScountry  = gCoreContext->GetLocale()->GetCountryCode().toLower();
    378     const char *country = QScountry.toLatin1().data();
     378    const char *country = QScountry.toLocal8Bit().data();
    379379    bd_set_player_setting_str(
    380380        bdnav, BLURAY_PLAYER_SETTING_AUDIO_LANG, langpref);
    381381
    382382    // Set preferred presentation graphics language to the FE guide language
    383383    bd_set_player_setting_str(bdnav, BLURAY_PLAYER_SETTING_PG_LANG, langpref);
    bool BDRingBuffer::OpenFile(const QStrin 
    469469    rawbitrate      = 8000;
    470470    CalcReadAheadThresh();
    471471
    472472    rwlock.unlock();
    473473
    474     mythfile_open_register_callback(filename.toLatin1().data(), this, NULL);
     474    mythfile_open_register_callback(filename.toLocal8Bit().data(), this, NULL);
    475475    return true;
    476476}
    477477
    478478long long BDRingBuffer::GetReadPosition(void) const
    479479{