Ticket #10689: bd_non-Latin1-filenames.2.patch
File bd_non-Latin1-filenames.2.patch, 2.9 KB (added by , 13 years ago) |
---|
-
libs/libmythtv/bdringbuffer.cpp
old new bool BDRingBuffer::OpenFile(const QStrin 284 284 filename = lfilename; 285 285 } 286 286 safefilename = filename; 287 287 288 288 LOG(VB_GENERAL, LOG_INFO, LOC + QString("Opened BDRingBuffer device at %1") 289 .arg(filename .toLatin1().data()));289 .arg(filename)); 290 290 291 291 // Ask mythiowrapper to update this object on file open progress. Opening 292 292 // a bluray disc can involve opening several hundred files which can take 293 293 // several minutes when the disc structure is remote. The callback allows 294 294 // us to 'kick' the main UI - as the 'please wait' widget is still visible 295 295 // at this stage 296 mythfile_open_register_callback(filename.toL atin1().data(), this,296 mythfile_open_register_callback(filename.toLocal8Bit().data(), this, 297 297 file_opened_callback); 298 298 299 299 QMutexLocker locker(&m_infoLock); 300 300 rwlock.lockForWrite(); 301 301 … … bool BDRingBuffer::OpenFile(const QStrin 304 304 305 305 QString keyfile = QString("%1/KEYDB.cfg").arg(GetConfDir()); 306 306 QByteArray keyarray = keyfile.toAscii(); 307 307 const char *keyfilepath = keyarray.data(); 308 308 309 bdnav = bd_open(filename.toL atin1().data(), keyfilepath);309 bdnav = bd_open(filename.toLocal8Bit().data(), keyfilepath); 310 310 311 311 if (!bdnav) 312 312 { 313 313 rwlock.unlock(); 314 mythfile_open_register_callback(filename.toL atin1().data(), this, NULL);314 mythfile_open_register_callback(filename.toLocal8Bit().data(), this, NULL); 315 315 return false; 316 316 } 317 317 318 318 m_metaDiscLibrary = bd_get_meta(bdnav); 319 319 … … bool BDRingBuffer::OpenFile(const QStrin 371 371 // Set parental level "age" to 99 for now. TODO: Add support for FE level 372 372 bd_set_player_setting(bdnav, BLURAY_PLAYER_SETTING_PARENTAL, 99); 373 373 374 374 // Set preferred language to FE guide language 375 375 const char *langpref = gCoreContext->GetSetting( 376 "ISO639Language0", "eng").toL atin1().data();376 "ISO639Language0", "eng").toLocal8Bit().data(); 377 377 QString QScountry = gCoreContext->GetLocale()->GetCountryCode().toLower(); 378 const char *country = QScountry.toL atin1().data();378 const char *country = QScountry.toLocal8Bit().data(); 379 379 bd_set_player_setting_str( 380 380 bdnav, BLURAY_PLAYER_SETTING_AUDIO_LANG, langpref); 381 381 382 382 // Set preferred presentation graphics language to the FE guide language 383 383 bd_set_player_setting_str(bdnav, BLURAY_PLAYER_SETTING_PG_LANG, langpref); … … bool BDRingBuffer::OpenFile(const QStrin 469 469 rawbitrate = 8000; 470 470 CalcReadAheadThresh(); 471 471 472 472 rwlock.unlock(); 473 473 474 mythfile_open_register_callback(filename.toL atin1().data(), this, NULL);474 mythfile_open_register_callback(filename.toLocal8Bit().data(), this, NULL); 475 475 return true; 476 476 } 477 477 478 478 long long BDRingBuffer::GetReadPosition(void) const 479 479 {