summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp16
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp31
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp24
-rw-r--r--core/multimedia/opieplayer/loopcontrol_threaded.cpp18
-rw-r--r--core/multimedia/opieplayer/mediaplayer.cpp6
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.cpp2
-rw-r--r--core/multimedia/opieplayer/om3u.cpp4
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp2
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp142
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp14
10 files changed, 117 insertions, 142 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 73e41dc..d01d2ba 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -149,3 +149,3 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
- qDebug("creating new audio device");
+ // qDebug("creating new audio device");
// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
@@ -155,3 +155,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
d->bytesPerSample = bps;
- qDebug("%d",bps);
+ // qDebug("%d",bps);
int format=0;
@@ -160,3 +160,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
else format = AFMT_S16_LE;
- qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format);
+ // qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format);
connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
@@ -193,6 +193,6 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
perror("ioctl(\"SNDCTL_DSP_SETFMT\")");
- qDebug("freq %d", d->frequency);
+ // qDebug("freq %d", d->frequency);
if(ioctl( d->handle, SNDCTL_DSP_SPEED, &d->frequency )==-1)
perror("ioctl(\"SNDCTL_DSP_SPEED\")");
- qDebug("channels %d",d->channels);
+ // qDebug("channels %d",d->channels);
if ( ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels ) == -1 ) {
@@ -220,3 +220,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
AudioDevice::~AudioDevice() {
- qDebug("destryo audiodevice");
+ // qDebug("destryo audiodevice");
// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
@@ -244,3 +244,3 @@ void AudioDevice::write( char *buffer, unsigned int length )
if ( t != (int)length) {
- qDebug("Ahhh!! memcpys 1");
+ // qDebug("Ahhh!! memcpys 1");
memcpy(d->unwrittenBuffer,buffer+t,length-t);
@@ -307,3 +307,3 @@ int AudioDevice::bytesWritten() {
if ( ioctl( d->handle, SNDCTL_DSP_GETODELAY, &buffered ) ) {
- qDebug( "failed to get audio device position" );
+ // qDebug( "failed to get audio device position" );
return -1;
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index a1973e9..b187cb4 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -78,3 +78,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
setCaption( tr("OpiePlayer") );
- qDebug("<<<<<audioWidget");
+ // qDebug("<<<<<audioWidget");
@@ -92,3 +92,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
- qDebug("skin path " + skinPath);
+ // qDebug("skin path " + skinPath);
@@ -162,3 +162,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
setPlaying( mediaPlayerState->playing() );
-
+this->setFocus();
}
@@ -167,13 +167,14 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
AudioWidget::~AudioWidget() {
+ // setPlaying( false);
for ( int i = 0; i < 10; i++ ) {
- delete buttonPixUp[i];
- delete buttonPixDown[i];
+ if(buttonPixUp[i]) delete buttonPixUp[i];
+ if(buttonPixDown[i]) delete buttonPixDown[i];
}
- delete pixBg;
- delete imgUp;
- delete imgDn;
- delete imgButtonMask;
+ if(pixBg) delete pixBg;
+ if(imgUp) delete imgUp;
+ if(imgDn) delete imgDn;
+ if(imgButtonMask) delete imgButtonMask;
for ( int i = 0; i < 10; i++ ) {
- delete masks[i];
+ if(masks[i]) delete masks[i];
}
@@ -281,2 +282,3 @@ void AudioWidget::setView( char view ) {
}
+
}
@@ -292,2 +294,3 @@ static QString timeAsString( long length ) {
void AudioWidget::updateSlider( long i, long max ) {
+this->setFocus();
time.setText( timeAsString( i ) + " / " + timeAsString( max ) );
@@ -359,4 +362,4 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
- if ( isOnButton && i == AudioVolumeUp )
- qDebug("on up");
+// if ( isOnButton && i == AudioVolumeUp )
+// qDebug("on up");
@@ -367,3 +370,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
case AudioVolumeUp:
- qDebug("more clicked");
+ // qDebug("more clicked");
emit moreClicked();
@@ -371,3 +374,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
case AudioVolumeDown:
- qDebug("less clicked");
+ // qDebug("less clicked");
emit lessClicked();
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index 8cf0a75..82242a3 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -102,3 +102,3 @@ LoopControl::LoopControl( QObject *parent, const char *name )
connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( setMute(bool) ) );
-qDebug("starting loopcontrol");
+ //qDebug("starting loopcontrol");
audioMutex = new Mutex;
@@ -114,3 +114,3 @@ qDebug("starting loopcontrol");
} else {
- qDebug( "Error setting up a realtime thread, reverting to using a normal thread." );
+ // qDebug( "Error setting up a realtime thread, reverting to using a normal thread." );
pthread_attr_destroy(&audio_attr);
@@ -119,3 +119,3 @@ qDebug("starting loopcontrol");
#endif
-qDebug("create audio thread");
+ //qDebug("create audio thread");
pthread_create(&audio_tid, &audio_attr, (void * (*)(void *))startAudioThread, this);
@@ -229,4 +229,4 @@ void LoopControl::startAudio() {
- if ( currentSample != audioSampleCounter + 1 )
- qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter);
+// if ( currentSample != audioSampleCounter + 1 )
+// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter);
@@ -243,3 +243,3 @@ void LoopControl::startAudio() {
else if ( sampleWaitTime <= -5000 ) {
- qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
+ // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
@@ -363,3 +363,3 @@ bool LoopControl::init( const QString& filename ) {
- qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
+ // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
@@ -389,3 +389,3 @@ bool LoopControl::init( const QString& filename ) {
- qDebug( "LC- channels = %d", channels );
+ // qDebug( "LC- channels = %d", channels );
@@ -395,3 +395,3 @@ bool LoopControl::init( const QString& filename ) {
total_audio_samples += 1000;
- qDebug("total samples %d", total_audio_samples);
+ // qDebug("total samples %d", total_audio_samples);
mediaPlayerState->setLength( total_audio_samples );
@@ -399,3 +399,3 @@ bool LoopControl::init( const QString& filename ) {
freq = mediaPlayerState->curDecoder()->audioFrequency( astream );
- qDebug( "LC- frequency = %d", freq );
+ // qDebug( "LC- frequency = %d", freq );
@@ -405,3 +405,3 @@ bool LoopControl::init( const QString& filename ) {
bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime();
- qDebug("using stupid hack");
+ // qDebug("using stupid hack");
} else {
@@ -453,3 +453,3 @@ bool LoopControl::init( const QString& filename ) {
void LoopControl::play() {
- qDebug("LC- play");
+ // qDebug("LC- play");
mediaPlayerState->setPosition( 0); //uglyhack
diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
index e99c97b..364e77b 100644
--- a/core/multimedia/opieplayer/loopcontrol_threaded.cpp
+++ b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
@@ -194,3 +194,3 @@ void LoopControl::setPosition( long pos ) {
audioMutex->lock();
-qDebug("setting position");
+ //qDebug("setting position");
playtime.restart();
@@ -310,3 +310,3 @@ void LoopControl::startVideo() {
if ( current_frame > prev_frame + 1 ) {
- qDebug("skipped a frame");
+ // qDebug("skipped a frame");
mediaPlayerState->curDecoder()->videoSetFrame( current_frame, stream );
@@ -343,4 +343,4 @@ void LoopControl::startAudio() {
- if ( currentSample != audioSampleCounter + 1 )
- qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter);
+// if ( currentSample != audioSampleCounter + 1 )
+// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter);
audioMutex->unlock();
@@ -373,3 +373,3 @@ void LoopControl::startAudio() {
if ( sampleWaitTime <= -2000 ) {
- qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
+ // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
@@ -404,3 +404,3 @@ void LoopControl::startAudio() {
- qDebug( "End of file" );
+ // qDebug( "End of file" );
@@ -418,3 +418,3 @@ void LoopControl::killTimers() {
if ( pthread_join(video_tid,&thread_result) != 0 )
- qDebug("thread join error 1");
+ // qDebug("thread join error 1");
pthread_attr_destroy(&video_attr);
@@ -428,3 +428,3 @@ void LoopControl::killTimers() {
if ( pthread_join(audio_tid,&thread_result) != 0 )
- qDebug("thread join error 2");
+ // qDebug("thread join error 2");
pthread_attr_destroy(&audio_attr);
@@ -515,3 +515,3 @@ bool LoopControl::init( const QString& filename ) {
- qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
+ // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
diff --git a/core/multimedia/opieplayer/mediaplayer.cpp b/core/multimedia/opieplayer/mediaplayer.cpp
index 4f3823a..753b2e3 100644
--- a/core/multimedia/opieplayer/mediaplayer.cpp
+++ b/core/multimedia/opieplayer/mediaplayer.cpp
@@ -82,3 +82,3 @@ void MediaPlayer::play() {
void MediaPlayer::setPlaying( bool play ) {
- qDebug("MediaPlayer setPlaying");
+ // qDebug("MediaPlayer setPlaying %d", play);
if ( !play ) {
@@ -93,3 +93,3 @@ void MediaPlayer::setPlaying( bool play ) {
}
- qDebug("about to ctrash");
+ // qDebug("about to ctrash");
const DocLnk *playListCurrent = playList->current();
@@ -258,3 +258,3 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
case Key_F12: //home
- qDebug("Blank here");
+ // qDebug("Blank here");
break;
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp
index cf166d6..6823076 100644
--- a/core/multimedia/opieplayer/mediaplayerstate.cpp
+++ b/core/multimedia/opieplayer/mediaplayerstate.cpp
@@ -129,3 +129,3 @@ MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() {
void MediaPlayerState::loadPlugins() {
- qDebug("load plugins");
+ // qDebug("load plugins");
#ifndef QT_NO_COMPONENT
diff --git a/core/multimedia/opieplayer/om3u.cpp b/core/multimedia/opieplayer/om3u.cpp
index 3541e5f..8b92a8c 100644
--- a/core/multimedia/opieplayer/om3u.cpp
+++ b/core/multimedia/opieplayer/om3u.cpp
@@ -72,3 +72,3 @@ void Om3u::readM3u() {
s=t.readLine();
- qDebug(s);
+ // qDebug(s);
if( s.find( "#", 0, TRUE) == -1 ) {
@@ -137,3 +137,3 @@ void Om3u::write() { //writes list to m3u file
for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
- qDebug(*it);
+ // qDebug(*it);
list += *it+"\n";
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp
index 67187f8..94567f2 100644
--- a/core/multimedia/opieplayer/playlistselection.cpp
+++ b/core/multimedia/opieplayer/playlistselection.cpp
@@ -196,3 +196,3 @@ void PlayListSelection::writeCurrent( Config& cfg ) {
cfg.writeEntry("current", item->text(0) );
- qDebug(item->text(0));
+ // qDebug(item->text(0));
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 7ea95ab..1fc7dd8 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -309,3 +309,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
LTab = new QWidget( tabWidget, "LTab" );
- playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy
+ playLists = new FileSelector( "playlist/plain;audio/x-mpegurl", LTab, "fileselector" , FALSE, FALSE);
@@ -315,3 +315,2 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
layoutL->addMultiCellWidget( playLists, 0, 0, 0, 1 );
-// playLists->setMinimumSize(233,260);
@@ -360,8 +359,8 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
readConfig( cfg );
- QString currentPlaylist = cfg.readEntry("CurrentPlaylist","default");
- loadList(DocLnk( currentPlaylist));
- setCaption(tr("OpiePlayer: ")+ fullBaseName ( QFileInfo(currentPlaylist)));
+
+ currentPlayList = cfg.readEntry("CurrentPlaylist","default");
+ loadList(DocLnk( currentPlayList));
+ setCaption(tr("OpiePlayer: ")+ fullBaseName ( QFileInfo(currentPlayList)));
initializeStates();
- // audioUI->setFocus();
}
@@ -423,11 +422,12 @@ void PlayListWidget::writeConfig( Config& cfg ) const {
// of disk space, but check it anyway.
- if ( !lnk->writeLink() ) {
- QMessageBox::critical( 0, tr("Out of space"),
- tr( "There was a problem saving "
- "the playlist.\n"
- "Your playlist "
- "may be missing some entries\n"
- "the next time you start it." )
- );
- }
+// if ( !lnk->writeLink() ) {
+// QMessageBox::critical( 0, tr("Out of space"),
+// tr( "There was a problem saving "
+// "the playlist.\n"
+// "Your playlist "
+// "may be missing some entries\n"
+// "the next time you start it." )
+// );
+// }
+
}
@@ -449,2 +449,3 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) {
mediaPlayerState->setPlaying( true);
+
}
@@ -455,2 +456,7 @@ void PlayListWidget::clearList() {
d->selectedFiles->removeSelected();
+ Config cfg( "OpiePlayer" );
+ cfg.setGroup("PlayList");
+ cfg.writeEntry("CurrentPlaylist","");
+ currentPlayList="";
+
}
@@ -499,6 +505,3 @@ void PlayListWidget::setDocument(const QString& fileref) {
d->setDocumentUsed = TRUE;
- d->selectedFiles->setSelected(d->selectedFiles->firstChild(),true );
- mediaPlayerState->setPlaying( FALSE );
- qApp->processEvents();
- mediaPlayerState->setPlaying( TRUE );
+ setDocumentEx(fileref);
}
@@ -506,3 +509,5 @@ void PlayListWidget::setDocument(const QString& fileref) {
void PlayListWidget::setDocumentEx(const QString& fileref) {
-
+ qDebug("opieplayer receive "+fileref);
+ clearList();
+ DocLnk lnk;
QFileInfo fileInfo(fileref);
@@ -513,3 +518,3 @@ void PlayListWidget::setDocumentEx(const QString& fileref) {
}
- qDebug("setDocument "+fileref);
+ // qDebug("<<<<<<<<<<<<<<<<<<<<<<setDocument "+fileref);
QString extension = fileInfo.extension(false);
@@ -523,5 +528,5 @@ void PlayListWidget::setDocumentEx(const QString& fileref) {
clearList();
- DocLnk lnk;
lnk.setName( fileInfo.baseName() ); //sets name
lnk.setFile( fileref ); //sets file name
+ lnk.setIcon("Sound");
//addToSelection( lnk );
@@ -531,9 +536,18 @@ void PlayListWidget::setDocumentEx(const QString& fileref) {
} else {
- clearList();
- DocLnk lnk;
+ if( fileref.find(".desktop",0,TRUE) != -1) {
+ lnk = DocLnk(fileref);
+ } else {
lnk.setName( fileInfo.baseName() ); //sets name
lnk.setFile( fileref ); //sets file name
+ lnk.setIcon("Sound");
+ }
+
addToSelection( lnk );
// addToSelection( DocLnk( fileref ) );
+ lnk.removeLinkFile();
+ // qApp->processEvents();
+ }
+ setCaption(tr("OpiePlayer"));
d->setDocumentUsed = TRUE;
+ d->selectedFiles->setSelected(d->selectedFiles->firstChild(),true );
mediaPlayerState->setPlaying( FALSE );
@@ -541,5 +555,3 @@ void PlayListWidget::setDocumentEx(const QString& fileref) {
mediaPlayerState->setPlaying( TRUE );
- // qApp->processEvents();
- setCaption(tr("OpiePlayer"));
- }
+
}
@@ -548,4 +560,3 @@ void PlayListWidget::setDocumentEx(const QString& fileref) {
void PlayListWidget::setActiveWindow() {
- qDebug("SETTING active window");
-
+ // qDebug("SETTING active window");
// When we get raised we need to ensure that it switches views
@@ -563,18 +574,2 @@ void PlayListWidget::useSelectedDocument() {
const DocLnk *PlayListWidget::current() { // this is fugly
-
-// if( fromSetDocument) {
-// qDebug("from setDoc");
-// DocLnkSet files;
-// Global::findDocuments(&files, "video/*;audio/*");
-// QListIterator<DocLnk> dit( files.children() );
-// for ( ; dit.current(); ++dit ) {
-// if(dit.current()->linkFile() == setDocFileRef) {
-// qDebug(setDocFileRef);
-// return dit;
-// }
-// }
-// } else
-
- qDebug("current");
-
switch (tabWidget->currentPageIndex()) {
@@ -582,3 +577,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly
{
- qDebug("playlist");
+ // qDebug("playlist");
if ( mediaPlayerState->playlist() ) {
@@ -595,3 +590,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly
{
- qDebug("audioView");
+ // qDebug("audioView");
QListIterator<DocLnk> dit( files.children() );
@@ -599,3 +594,2 @@ const DocLnk *PlayListWidget::current() { // this is fugly
if( dit.current()->name() == audioView->currentItem()->text(0) && !insanityBool) {
- qDebug("here");
insanityBool=TRUE;
@@ -608,3 +602,2 @@ const DocLnk *PlayListWidget::current() { // this is fugly
{
- qDebug("videoView");
QListIterator<DocLnk> Vdit( vFiles.children() );
@@ -719,3 +712,2 @@ void PlayListWidget::setView( char view ) {
void PlayListWidget::addSelected() {
- qDebug("addSelected");
DocLnk lnk;
@@ -769,3 +761,2 @@ void PlayListWidget::playIt( QListViewItem *) {
// mediaPlayerState->curPosition =0;
- qDebug("playIt");
// mediaPlayerState->setPlaying(FALSE);
@@ -843,3 +834,2 @@ void PlayListWidget::tabChanged(QWidget *) {
void PlayListWidget::btnPlay(bool b) {
- qDebug("<<<<<<<<<<<<<<<BtnPlay %d", b);
// mediaPlayerState->setPlaying(b);
@@ -848,3 +838,2 @@ void PlayListWidget::btnPlay(bool b) {
{
- qDebug("1");
// if( d->selectedFiles->current()->file().find(" ",0,TRUE) != -1
@@ -861,3 +850,2 @@ void PlayListWidget::btnPlay(bool b) {
{
- qDebug("2");
// d->selectedFiles->unSelect();
@@ -873,3 +861,2 @@ void PlayListWidget::btnPlay(bool b) {
{
- qDebug("3");
@@ -924,3 +911,2 @@ void PlayListWidget::playSelected()
{
- qDebug("playSelected");
btnPlay( true);
@@ -951,3 +937,3 @@ void PlayListWidget::listDelete() {
cfg.setGroup("PlayList");
- QString currentPlaylist = cfg.readEntry("CurrentPlaylist","");
+ currentPlayList = cfg.readEntry("CurrentPlaylist","");
QString file;
@@ -1075,3 +1061,2 @@ void PlayListWidget::populateVideoView() {
void PlayListWidget::openFile() {
- qDebug("<<<<<<<<<OPEN File");
QString filename, name;
@@ -1082,4 +1067,3 @@ void PlayListWidget::openFile() {
filename = fileDlg->text();
- qDebug( "Selected filename is " + filename );
-// Om3u *m3uList;
+ // qDebug( "Selected filename is " + filename );
DocLnk lnk;
@@ -1093,3 +1077,2 @@ void PlayListWidget::openFile() {
-// m3uFile = filename.left( filename.find( ":",8,TRUE));
m3uFile = filename;
@@ -1099,11 +1082,3 @@ void PlayListWidget::openFile() {
filename = m3uFile;
-// qDebug("1 "+m3uFile);
-// } else if(filename.left(4) == "http"){
-// m3uFile=filename;
-// m3uFile = m3uFile.right( m3uFile.length() - 7);
-// qDebug("2 "+m3uFile);
-// } else{
-// m3uFile=filename;
-// qDebug("3 "+m3uFile);
- }
+ = }
lnk.setName( m3uFile ); //sets name
@@ -1123,2 +1098,3 @@ void PlayListWidget::openFile() {
d->selectedFiles->addToSelection( lnk);
+ lnk.removeLinkFile();
writeCurrentM3u();
@@ -1136,3 +1112,3 @@ reads m3u and shows files/urls to playlist widget */
void PlayListWidget::readm3u( const QString &filename ) {
- qDebug( "read m3u filename " + filename );
+ // qDebug( "read m3u filename " + filename );
@@ -1193,3 +1169,3 @@ void PlayListWidget::readPls( const QString &filename ) {
- qDebug( "pls filename is " + filename );
+ // qDebug( "pls filename is " + filename );
Om3u *m3uList;
@@ -1236,8 +1212,8 @@ void PlayListWidget::readPls( const QString &filename ) {
void PlayListWidget::writeCurrentM3u() {
- qDebug("writing to current m3u");
+ // qDebug("writing to current m3u");
Config cfg( "OpiePlayer" );
cfg.setGroup("PlayList");
- QString currentPlaylist = cfg.readEntry("CurrentPlaylist","");
+ currentPlayList = cfg.readEntry("CurrentPlaylist","");
Om3u *m3uList;
- m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate );
+ m3uList = new Om3u( currentPlayList, IO_ReadWrite | IO_Truncate );
@@ -1245,3 +1221,3 @@ void PlayListWidget::writeCurrentM3u() {
do {
- qDebug( "writeCurrentM3u " +d->selectedFiles->current()->file());
+ // qDebug( "writeCurrentM3u " +d->selectedFiles->current()->file());
m3uList->add( d->selectedFiles->current()->file() );
@@ -1249,3 +1225,3 @@ void PlayListWidget::writeCurrentM3u() {
while ( d->selectedFiles->next() );
- qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" );
+ // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" );
m3uList->write();
@@ -1306,3 +1282,3 @@ void PlayListWidget::writem3u() {
if(!lnk.writeLink()) {
- qDebug("Writing doclink did not work");
+ // qDebug("Writing doclink did not work");
}
@@ -1336,3 +1312,2 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
case Key_Q: //add to playlist
- qDebug("Add");
addSelected();
@@ -1347,3 +1322,2 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
case Key_Space:
- qDebug("Play");
// playSelected(); puh
@@ -1400,3 +1374,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *)
void PlayListWidget::doBlank() {
- qDebug("do blanking");
+ // qDebug("do blanking");
fd=open("/dev/fb0",O_RDWR);
@@ -1412,3 +1386,3 @@ void PlayListWidget::doUnblank() {
// fd=open("/dev/fb0",O_RDWR);
- qDebug("do unblanking");
+ // qDebug("do unblanking");
if (fd != -1) {
@@ -1463,3 +1437,3 @@ void PlayListWidget::skinsMenuActivated( int item ) {
void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
- qDebug("qcop message "+msg );
+ // qDebug("qcop message "+msg );
QDataStream stream ( data, IO_ReadOnly );
@@ -1500,3 +1474,2 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
stream >> file;
-
} else if ( msg == "setDocument(QString)" ) { //loop or not loop
@@ -1504,3 +1477,2 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
}
-
}
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 48104ca..02c8568 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -88,3 +88,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
- qDebug("skin path " + skinPath);
+ // qDebug("skin path " + skinPath);
@@ -103,3 +103,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
"/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
- qDebug("loading "+filename);
+ // qDebug("loading "+filename);
masks[i] = new QBitmap( filename );
@@ -121,3 +121,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
}
- qDebug("finished loading first pics");
+ // qDebug("finished loading first pics");
for ( int i = 0; i < 7; i++ )
@@ -353,3 +353,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
case VideoPlay: {
- qDebug("play");
+ // qDebug("play");
if( !mediaPlayerState->playing()) {
@@ -361,3 +361,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
if( mediaPlayerState->isPaused ) {
- qDebug("isPaused");
+ // qDebug("isPaused");
setToggleButton( i, FALSE );
@@ -366,3 +366,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
} else if( !mediaPlayerState->isPaused ) {
- qDebug("is not paused");
+ // qDebug("is not paused");
setToggleButton( i, TRUE );
@@ -375,3 +375,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
- case VideoStop: qDebug("stop"); mediaPlayerState->setPlaying( FALSE ); setToggleButton( i+1, true); setToggleButton( i, true ); return;
+ case VideoStop: mediaPlayerState->setPlaying( FALSE ); setToggleButton( i+1, true); setToggleButton( i, true ); return;
case VideoNext: mediaPlayerState->setNext(); return;