summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/om3u.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/playlistselection.cpp10
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp38
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp24
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp8
10 files changed, 67 insertions, 67 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 28a42eb..36def67 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -130,13 +130,13 @@ void AudioWidget::sliderReleased() {
return;
long val = long((double)slider.value() * mediaPlayerState.length() / slider.width());
mediaPlayerState.setPosition( val );
}
void AudioWidget::setPosition( long i ) {
- // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i);
+ // odebug << "<<<<<<<<<<<<<<<<<<<<<<<<set position " << i << "" << oendl;
updateSlider( i, mediaPlayerState.length() );
}
void AudioWidget::setLength( long max ) {
updateSlider( mediaPlayerState.position(), max );
@@ -184,25 +184,25 @@ void AudioWidget::loadSkin()
resizeEvent( 0 );
}
void AudioWidget::setSeekable( bool isSeekable ) {
if ( !isSeekable ) {
- qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
+ odebug << "<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>" << oendl;
if( !slider.isHidden()) {
slider.hide();
}
disconnect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
disconnect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
disconnect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
} else {
// this stops the slider from being moved, thus
// does not stop stream when it reaches the end
slider.show();
- qDebug( " CONNECT SET POSTION " );
+ odebug << " CONNECT SET POSTION " << oendl;
connect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
connect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
}
}
@@ -268,13 +268,13 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
hide();
- // qDebug("Audio F9");
+ // odebug << "Audio F9" << oendl;
e->accept();
break;
case Key_F10: //contacts
break;
case Key_F11: //menu
mediaPlayerState.toggleBlank();
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index a42b8e5..5c24dbe 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -103,16 +103,16 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget )
else
start();
}
void Lib::run()
{
- qDebug( "Lib::run() started" );
+ odebug << "Lib::run() started" << oendl;
initialize();
m_initialized = true;
- qDebug( "Lib::run() finished" );
+ odebug << "Lib::run() finished" << oendl;
}
void Lib::initialize()
{
m_duringInitialization = true;
m_xine = xine_new( );
@@ -212,13 +212,13 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) {
return xine_play( m_stream, startPos, start_time);
}
void Lib::stop() {
assert( m_initialized );
- qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>");
+ odebug << "<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>" << oendl;
xine_stop( m_stream );
}
void Lib::pause( bool toggle ) {
assert( m_initialized );
@@ -324,15 +324,15 @@ int Lib::error() const {
void Lib::ensureInitialized()
{
if ( m_initialized )
return;
- qDebug( "waiting for initialization thread to finish" );
+ odebug << "waiting for initialization thread to finish" << oendl;
wait();
- qDebug( "initialization thread finished!" );
+ odebug << "initialization thread finished!" << oendl;
}
void Lib::setWidget( XineVideoWidget *widget )
{
m_wid = widget;
resize ( m_wid-> size ( ) );
@@ -419,13 +419,13 @@ void Lib::xine_display_frame( void* user_data, uint8_t *frame,
}
void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
assert( m_initialized );
if ( !m_video ) {
- qWarning("not showing video now");
+ owarn << "not showing video now" << oendl;
return;
}
assert( m_wid );
m_wid-> setVideoFrame ( frame, width, height, bytes );
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index a236775..7e38fc7 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -149,13 +149,13 @@ void MediaPlayer::next() {
play();
}
} else {
mediaPlayerState.setList();
}
} else { //if playing from file list, let's just stop
- qDebug("<<<<<<<<<<<<<<<<<stop for filelists");
+ odebug << "<<<<<<<<<<<<<<<<<stop for filelists" << oendl;
mediaPlayerState.setPlaying(false);
mediaPlayerState.setDisplayType( MediaPlayerState::MediaSelection );
if(l) mediaPlayerState.setLooping(l);
if(r) mediaPlayerState.setShuffled(r);
}
qApp->processEvents();
@@ -282,37 +282,37 @@ void MediaPlayer::blank( bool b ) {
fd=open("/dev/fb0",O_RDWR);
#ifdef QT_QWS_SL5XXX
fl= open( "/dev/fl", O_RDWR );
#endif
if (fd != -1) {
if ( b ) {
- qDebug("do blanking");
+ odebug << "do blanking" << oendl;
#ifdef QT_QWS_SL5XXX
ioctl( fd, FBIOBLANK, 1 );
if(fl !=-1) {
ioctl( fl, 2 );
::close(fl);
}
#else
ioctl( fd, FBIOBLANK, 3 );
#endif
isBlanked = TRUE;
} else {
- qDebug("do unblanking");
+ odebug << "do unblanking" << oendl;
ioctl( fd, FBIOBLANK, 0);
#ifdef QT_QWS_SL5XXX
if(fl != -1) {
ioctl( fl, 1);
::close(fl);
}
#endif
isBlanked = FALSE;
}
close( fd );
} else {
- qDebug("<< /dev/fb0 could not be opened >>");
+ odebug << "<< /dev/fb0 could not be opened >>" << oendl;
}
}
void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
@@ -322,17 +322,17 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
break;
case Key_F10: //contacts
break;
case Key_F11: //menu
break;
case Key_F12: //home
- qDebug("Blank here");
+ odebug << "Blank here" << oendl;
// mediaPlayerState->toggleBlank();
break;
case Key_F13: //mail
- qDebug("Blank here");
+ odebug << "Blank here" << oendl;
// mediaPlayerState->toggleBlank();
break;
}
}
void MediaPlayer::cleanUp() {// this happens on closing
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp
index 26d5e15..95dbab5 100644
--- a/noncore/multimedia/opieplayer2/om3u.cpp
+++ b/noncore/multimedia/opieplayer2/om3u.cpp
@@ -34,36 +34,36 @@
//extern PlayListWidget *playList;
Om3u::Om3u( const QString &filePath, int mode)
: QStringList (){
-qDebug("<<<<<<<new m3u "+filePath);
+odebug << "<<<<<<<new m3u "+filePath << oendl;
f.setName(filePath);
f.open(mode);
}
Om3u::~Om3u(){}
void Om3u::readM3u() {
-// qDebug("<<<<<<reading m3u "+f.name());
+// odebug << "<<<<<<reading m3u "+f.name() << oendl;
QTextStream t(&f);
t.setEncoding(QTextStream::UnicodeUTF8);
QString s;
while ( !t.atEnd() ) {
s=t.readLine();
-// qDebug(s);
+// odebug << s << oendl;
if( s.find( "#", 0, TRUE) == -1 ) {
if( s.left(2) == "E:" || s.left(2) == "P:" ) {
s = s.right( s.length() -2 );
QFileInfo f( s );
QString name = f.baseName();
name = name.right( name.length() - name.findRev( "\\", -1, TRUE ) -1 );
s=s.replace( QRegExp( "\\" ), "/" );
append(s);
-// qDebug(s);
+// odebug << s << oendl;
} else { // is url
QString name;
name = s;
append(name);
}
}
@@ -77,13 +77,13 @@ void Om3u::readPls() { //it's a pls file
while ( !t.atEnd() ) {
s = t.readLine();
if( s.left(4) == "File" ) {
s = s.right( s.length() - s.find("=",0,true)-1 );
s = s.stripWhiteSpace();
s.replace( QRegExp( "%20" )," ");
-// qDebug( "adding " + s + " to playlist" );
+// odebug << "adding " + s + " to playlist" << oendl;
// numberofentries=2
// File1=http
// Title
// Length
// Version
// File2=http
@@ -111,13 +111,13 @@ void Om3u::readPls() { //it's a pls file
void Om3u::write() { //writes list to m3u file
QString list;
QTextStream t(&f);
t.setEncoding(QTextStream::UnicodeUTF8);
if(count()>0) {
for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
-// qDebug(*it);
+// odebug << *it << oendl;
t << *it << "\n";
}
}
// f.close();
}
@@ -127,13 +127,13 @@ void Om3u::add(const QString &filePath) { //adds to m3u file
void Om3u::remove(const QString &filePath) { //removes from m3u list
QString list, currentFile;
if(count()>0) {
for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
currentFile=*it;
- // qDebug(*it);
+ // odebug << *it << oendl;
if( filePath != currentFile)
list += currentFile+"\n";
}
f.writeBlock( list, list.length() );
}
diff --git a/noncore/multimedia/opieplayer2/playlistselection.cpp b/noncore/multimedia/opieplayer2/playlistselection.cpp
index 015896f..3499837 100644
--- a/noncore/multimedia/opieplayer2/playlistselection.cpp
+++ b/noncore/multimedia/opieplayer2/playlistselection.cpp
@@ -41,13 +41,13 @@ private:
};
PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
: QListView( parent, name )
{
-// qDebug("starting playlistselector");
+// odebug << "starting playlistselector" << oendl;
// #ifdef USE_PLAYLIST_BACKGROUND
// setStaticBackground( TRUE );
// setBackgroundPixmap( Resource::loadPixmap( "opieplayer/background" ) );
// setBackgroundPixmap( Resource::loadPixmap( "launcher/opielogo" ) );
// #endif
@@ -62,13 +62,13 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
PlayListSelection::~PlayListSelection() {
}
// #ifdef USE_PLAYLIST_BACKGROUND
void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
-// qDebug("drawBackground");
+// odebug << "drawBackground" << oendl;
p->fillRect( r, QBrush( white ) );
// QImage logo = Resource::loadImage( "launcher/opielogo" );
// if ( !logo.isNull() )
// p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo );
}
// #endif
@@ -181,24 +181,24 @@ void PlayListSelection::unSelect()
void PlayListSelection::writeCurrent( Config& cfg ) {
cfg.setGroup("PlayList");
QListViewItem *item = selectedItem();
if ( item )
cfg.writeEntry("current", item->text(0) );
- qDebug(item->text(0));
+ odebug << item->text(0) << oendl;
}
void PlayListSelection::setSelectedItem(const QString &strk ) {
unSelect();
QListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
-// qDebug( it.current()->text(0));
+// odebug << it.current()->text(0) << oendl;
if( strk == it.current()->text(0)) {
-// qDebug( "We have a match "+strk);
+// odebug << "We have a match "+strk << oendl;
setSelected( it.current(), TRUE);
ensureItemVisible( it.current() );
return;
}
}
// setSelected( item, TRUE );
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 4460833..956d206 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -179,17 +179,17 @@ void PlayListWidget::writeDefaultPlaylist() {
Config config( "OpiePlayer" );
config.setGroup( "PlayList" );
QString filename=QPEApplication::documentDir() + "/default.m3u";
QString currentString = config.readEntry( "CurrentPlaylist", filename);
if( currentString == filename) {
Om3u *m3uList;
- // qDebug("<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>");
+ // odebug << "<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>" << oendl;
if( d->selectedFiles->first() ) {
m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate);
do {
- // qDebug(d->selectedFiles->current()->file());
+ // odebug << d->selectedFiles->current()->file() << oendl;
m3uList->add( d->selectedFiles->current()->file() );
}
while ( d->selectedFiles->next() );
m3uList->write();
m3uList->close();
@@ -322,13 +322,13 @@ void PlayListWidget::addAllVideoToList() {
writeCurrentM3u();
d->selectedFiles->first();
}
void PlayListWidget::setDocument( const QString& fileref ) {
- // qDebug( "<<<<<<<<set document>>>>>>>>>> "+fileref );
+ // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl;
fromSetDocument = TRUE;
QFileInfo fileInfo(fileref);
if ( !fileInfo.exists() ) {
QMessageBox::warning( this, tr( "Invalid File" ),
tr( "There was a problem in getting the file." ) );
@@ -398,13 +398,13 @@ bool PlayListWidget::prev() {
return TRUE;
}
}
bool PlayListWidget::next() {
-//qDebug("<<<<<<<<<<<<next()");
+//odebug << "<<<<<<<<<<<<next()" << oendl;
if ( mediaPlayerState->isShuffled() ) {
return prev();
} else {
if ( !d->selectedFiles->next() ) {
if ( mediaPlayerState->isLooping() ) {
return d->selectedFiles->first();
@@ -609,13 +609,13 @@ void PlayListWidget::openURL() {
QString filename, name;
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Add URL"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
filename = fileDlg->text();
- qDebug( "Selected filename is " + filename );
+ odebug << "Selected filename is " + filename << oendl;
// Om3u *m3uList;
DocLnk lnk;
Config cfg( "OpiePlayer" );
cfg.setGroup("PlayList");
if(filename.left(4) == "http") {
@@ -685,13 +685,13 @@ void PlayListWidget::openFile() {
str=str.right(str.length()-1);
}
cfg.writeEntry( "LastDirectory" ,QFileInfo( str ).dirPath() );
if( !str.isEmpty() ) {
- qDebug( "Selected filename is " + str );
+ odebug << "Selected filename is " + str << oendl;
filename = str;
DocLnk lnk;
if( filename.right( 3) == "m3u" || filename.right(3) == "pls" ) {
readListFromFile( filename );
} else {
@@ -703,26 +703,26 @@ void PlayListWidget::openFile() {
}
}
}
void PlayListWidget::readListFromFile( const QString &filename ) {
- qDebug( "read list filename " + filename );
+ odebug << "read list filename " + filename << oendl;
QFileInfo fi(filename);
Om3u *m3uList;
QString s, name;
m3uList = new Om3u( filename, IO_ReadOnly );
if(fi.extension(false).find("m3u",0,false) != -1 )
m3uList->readM3u();
else if(fi.extension(false).find("pls",0,false) != -1 )
m3uList->readPls();
DocLnk lnk;
for ( QStringList::ConstIterator it = m3uList->begin(); it != m3uList->end(); ++it ) {
s = *it;
- // qDebug(s);
+ // odebug << s << oendl;
if(s.left(4)=="http") {
lnk.setName( s ); //sets file name
lnk.setIcon("opieplayer2/musicfile");
lnk.setFile( s ); //sets file name
} else { //is file
@@ -750,27 +750,27 @@ void PlayListWidget::readListFromFile( const QString &filename ) {
setCaption(tr("OpiePlayer: ")+ QFileInfo(filename).baseName());
}
// writes current playlist to current m3u file */
void PlayListWidget::writeCurrentM3u() {
- qDebug("writing to current m3u");
+ odebug << "writing to current m3u" << oendl;
Config cfg( "OpiePlayer" );
cfg.setGroup("PlayList");
QString currentPlaylist = cfg.readEntry("CurrentPlaylist","default");
Om3u *m3uList;
m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate );
if( d->selectedFiles->first()) {
do {
- // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file());
+ // odebug << "add writeCurrentM3u " +d->selectedFiles->current()->file() << oendl;
m3uList->add( d->selectedFiles->current()->file() );
}
while ( d->selectedFiles->next() );
- // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" );
+ // odebug << "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" << oendl;
m3uList->write();
m3uList->close();
}
delete m3uList;
}
@@ -809,13 +809,13 @@ void PlayListWidget::writem3u() {
QString name, filename, list;
Om3u *m3uList;
if( !str.isEmpty() ) {
name = str;
// name = fileDlg->text();
-// qDebug( filename );
+// odebug << filename << oendl;
if( name.find("/",0,true) != -1) {// assume they specify a file path
filename = name;
name = name.right(name.length()- name.findRev("/",-1,true) - 1 );
}
else //otherwise dump it somewhere noticable
filename = QPEApplication::documentDir() + "/" + name;
@@ -827,33 +827,33 @@ void PlayListWidget::writem3u() {
m3uList = new Om3u( filename, IO_ReadWrite | IO_Truncate);
do {
m3uList->add( d->selectedFiles->current()->file());
}
while ( d->selectedFiles->next() );
- // qDebug( list );
+ // odebug << list << oendl;
m3uList->write();
m3uList->close();
delete m3uList;
//delete fileDlg;
DocLnk lnk;
lnk.setFile( filename);
lnk.setIcon("opieplayer2/playlist2");
lnk.setName( name); //sets file name
- // qDebug(filename);
+ // odebug << filename << oendl;
Config config( "OpiePlayer" );
config.setGroup( "PlayList" );
config.writeEntry("CurrentPlaylist",filename);
currentPlayList=filename;
if(!lnk.writeLink()) {
- qDebug("Writing doclink did not work");
+ odebug << "Writing doclink did not work" << oendl;
}
setCaption(tr("OpiePlayer: ") + name);
}
}
}
@@ -881,13 +881,13 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
addSelected();
break;
case Key_R: //remove from playlist
removeSelected();
break;
// case Key_P: //play
- // qDebug("Play");
+ // odebug << "Play" << oendl;
// playSelected();
// break;
case Key_Space:
// playSelected(); puh
break;
case Key_1:
@@ -911,13 +911,13 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
// d->selectedFiles->last();
break;
}
}
void PlayListWidget::pmViewActivated(int index) {
-// qDebug("%d", index);
+// odebug << "" << index << "" << oendl;
switch(index) {
case -16:
{
mediaPlayerState->toggleFullscreen();
bool b=mediaPlayerState->isFullscreen();
pmView->setItemChecked( index, b);
@@ -941,13 +941,13 @@ void PlayListWidget::populateSkinsMenu() {
skinsDir.setSorting(QDir::Name );
const QFileInfoList *skinslist = skinsDir.entryInfoList();
QFileInfoListIterator it( *skinslist );
QFileInfo *fi;
while ( ( fi = it.current() ) ) {
skinName = fi->fileName();
-// qDebug( fi->fileName() );
+// odebug << fi->fileName() << oendl;
if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
item = skinsMenu->insertItem( fi->fileName() ) ;
}
if( skinName == "default" ) {
defaultSkinIndex = item;
}
@@ -997,13 +997,13 @@ PlayListWidget::Entry PlayListWidget::currentEntry() const
QString PlayListWidget::currentFileListPathName() const {
return currentFileListView->currentItem()->text( 3 );
}
void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
- qDebug("qcop message "+msg );
+ odebug << "qcop message "+msg << oendl;
QDataStream stream ( data, IO_ReadOnly );
if ( msg == "play()" ) { //plays current selection
btnPlay( true);
} else if ( msg == "stop()" ) {
mediaPlayerState->setPlaying( false);
} else if ( msg == "togglePause()" ) {
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index 2ff190d..922f9d7 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -180,13 +180,13 @@ void PlayListWidgetGui::setView( char view ) {
else
hide();
}
void PlayListWidgetGui::setActiveWindow() {
- // qDebug("SETTING active window");
+ // odebug << "SETTING active window" << oendl;
// When we get raised we need to ensure that it switches views
MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType();
mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate
mediaPlayerState->setDisplayType( origDisplayType ); // now switch back
}
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp
index 7c38983..84f5f87 100644
--- a/noncore/multimedia/opieplayer2/skin.cpp
+++ b/noncore/multimedia/opieplayer2/skin.cpp
@@ -175,17 +175,17 @@ SkinData *SkinCache::lookupAndTake( const QString &skinPath, const QString &file
QString key = skinPath + fileNameInfix;
SkinData *data = m_cache.take( key );
if ( !data )
data = new SkinData;
else
- qDebug( "SkinCache: hit" );
+ odebug << "SkinCache: hit" << oendl;
QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath );
if ( bgPixmap ) {
- qDebug( "SkinCache: hit on bgpixmap" );
+ odebug << "SkinCache: hit on bgpixmap" << oendl;
data->backgroundPixmap = *bgPixmap;
}
else
data->backgroundPixmap = QPixmap();
return data;
@@ -215,38 +215,38 @@ SkinLoader::IncrementalLoader::IncrementalLoader( const Info &info )
}
SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadStep()
{
switch ( m_currentState ) {
case LoadBackgroundPixmap:
- qDebug( "load bgpixmap" );
+ odebug << "load bgpixmap" << oendl;
m_skin.backgroundPixmap();
m_currentState = LoadButtonUpImage;
break;
case LoadButtonUpImage:
- qDebug( "load upimage" );
+ odebug << "load upimage" << oendl;
m_skin.buttonUpImage();
m_currentState = LoadButtonDownImage;
break;
case LoadButtonDownImage:
- qDebug( "load downimage" );
+ odebug << "load downimage" << oendl;
m_skin.buttonDownImage();
m_currentState = LoadButtonMasks;
m_currentButton = 0;
break;
case LoadButtonMasks:
- qDebug( "load button masks %i", m_currentButton );
+ odebug << "load button masks " << m_currentButton << "" << oendl;
m_skin.buttonMaskImage( m_info.buttonInfo[ m_currentButton ].fileName );
m_currentButton++;
if ( m_currentButton >= m_info.buttonCount )
m_currentState = LoadButtonMask;
break;
case LoadButtonMask:
- qDebug( "load whole mask" );
+ odebug << "load whole mask" << oendl;
m_skin.buttonMask( m_info.buttonInfo, m_info.buttonCount );
return LoadingCompleted;
}
return MoreToCome;
}
@@ -255,13 +255,13 @@ SkinLoader::SkinLoader()
: m_currentLoader( 0 ), m_timerId( -1 )
{
}
SkinLoader::~SkinLoader()
{
- qDebug( "SkinLoader::~SkinLoader()" );
+ odebug << "SkinLoader::~SkinLoader()" << oendl;
killTimers();
delete m_currentLoader;
}
void SkinLoader::schedule( const MediaWidget::GUIInfo &guiInfo )
{
@@ -274,46 +274,46 @@ void SkinLoader::schedule( const QString &skinName, const MediaWidget::GUIInfo &
}
void SkinLoader::start()
{
assert( m_timerId == -1 );
m_timerId = startTimer( 100 /* ms */ );
- qDebug( "SkinLoader::start() %d jobs", pendingSkins.count() );
+ odebug << "SkinLoader::start() " << pendingSkins.count() << " jobs" << oendl;
}
void SkinLoader::timerEvent( QTimerEvent *ev )
{
if ( ev->timerId() != m_timerId ) {
QObject::timerEvent( ev );
return;
}
if ( !m_currentLoader ) {
if ( pendingSkins.isEmpty() ) {
- qDebug( "all jobs done" );
+ odebug << "all jobs done" << oendl;
killTimer( m_timerId );
m_timerId = -1;
// ### qt3: use deleteLater();
QTimer::singleShot( 0, this, SLOT( deleteMe() ) );
return;
}
Info nfo = *pendingSkins.begin();
pendingSkins.remove( pendingSkins.begin() );
m_currentLoader = new IncrementalLoader( nfo );
- qDebug( "new loader %i jobs left", pendingSkins.count() );
+ odebug << "new loader " << pendingSkins.count() << " jobs left" << oendl;
}
if ( m_currentLoader->loadStep() == IncrementalLoader::LoadingCompleted ) {
delete m_currentLoader;
m_currentLoader = 0;
}
- qDebug( "finished step" );
+ odebug << "finished step" << oendl;
}
void SkinLoader::deleteMe()
{
delete this;
}
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp
index fb951b4..d8b8abe 100644
--- a/noncore/multimedia/opieplayer2/threadutil.cpp
+++ b/noncore/multimedia/opieplayer2/threadutil.cpp
@@ -184,22 +184,22 @@ Thread::~Thread()
void Thread::start()
{
AutoLock lock( d->guard );
if ( d->isRunning ) {
- qDebug( "ThreadUtil::Thread::start() called for running thread." );
+ odebug << "ThreadUtil::Thread::start() called for running thread." << oendl;
return;
}
pthread_attr_t attributes;
pthread_attr_init( &attributes );
pthread_attr_setscope( &attributes, PTHREAD_SCOPE_SYSTEM );
int err = pthread_create( &d->self, &attributes, start_thread, ( void* )d );
if ( err != 0 ) {
- qDebug( "ThreadUtil::Thread::start() : can't create thread: %s", strerror( err ) );
+ odebug << "ThreadUtil::Thread::start() : can't create thread: " << strerror( err ) << "" << oendl;
pthread_attr_destroy( &attributes );
return;
}
pthread_attr_destroy( &attributes );
}
@@ -281,13 +281,13 @@ ChannelMessage::~ChannelMessage()
}
void ChannelMessage::reply()
{
if ( !m_isCall )
{
- qDebug( "ChannelMessage::reply() - can't reply oneway message!" );
+ odebug << "ChannelMessage::reply() - can't reply oneway message!" << oendl;
return;
}
if ( m_inEventHandler )
{
m_replied = true;
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 8f11b2e..94f99f8 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -90,31 +90,31 @@ XineControl::~XineControl() {
void XineControl::play( const QString& fileName ) {
hasVideoChannel = FALSE;
hasAudioChannel = FALSE;
m_fileName = fileName;
- qDebug("<<FILENAME: " + fileName + ">>>>");
+ odebug << "<<FILENAME: " + fileName + ">>>>" << oendl;
if ( !libXine->play( fileName, 0, 0 ) ) {
QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() );
// toggle stop so the the play button is reset
mediaPlayerState.setPlaying( false );
return;
}
mediaPlayerState.setPlaying( true );
MediaPlayerState::DisplayType displayType;
if ( !libXine->hasVideo() ) {
displayType = MediaPlayerState::Audio;
- qDebug("HAS AUDIO");
+ odebug << "HAS AUDIO" << oendl;
libXine->setShowVideo( false );
hasAudioChannel = TRUE;
} else {
displayType = MediaPlayerState::Video;
- qDebug("HAS VIDEO");
+ odebug << "HAS VIDEO" << oendl;
libXine->setShowVideo( true );
hasVideoChannel = TRUE;
}
// determine if slider is shown
mediaPlayerState.setIsSeekable( libXine->isSeekable() );
@@ -240,13 +240,13 @@ QString XineControl::getMetaInfo() {
}
QString XineControl::getErrorCode() {
int errorCode = libXine->error();
- qDebug( QString("ERRORCODE: %1 ").arg(errorCode) );
+ odebug << QString("ERRORCODE: %1 ").arg(errorCode) << oendl;
if ( errorCode == 1 ) {
return tr( "No input plugin found for this media type" );
} else if ( errorCode == 2 ) {
return tr( "No demux plugin found for this media type" );
} else if ( errorCode == 3 ) {