summaryrefslogtreecommitdiff
authorchicken <chicken>2003-11-17 19:28:21 (UTC)
committer chicken <chicken>2003-11-17 19:28:21 (UTC)
commit56f2b27abab0cbae7548b43be4509965b37e3a92 (patch) (side-by-side diff)
tree210dc84c5dbb1a93aaa5ae358a38a3de3510f493
parent8515000ba00ec666ee5e68fdd3c2786186093b93 (diff)
downloadopie-56f2b27abab0cbae7548b43be4509965b37e3a92.zip
opie-56f2b27abab0cbae7548b43be4509965b37e3a92.tar.gz
opie-56f2b27abab0cbae7548b43be4509965b37e3a92.tar.bz2
merge branch with head
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/config.in4
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/main.cpp9
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/opie-mediaplayer2.control4
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro9
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp69
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h7
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp10
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.h4
11 files changed, 67 insertions, 58 deletions
diff --git a/noncore/multimedia/opieplayer2/config.in b/noncore/multimedia/opieplayer2/config.in
index 27142a8..2272a9b 100644
--- a/noncore/multimedia/opieplayer2/config.in
+++ b/noncore/multimedia/opieplayer2/config.in
@@ -1,6 +1,4 @@
config OPIEPLAYER2
- boolean "opie-mediaplayer2 (streaming capable media player for mp3, mpeg, wav, ogg, quicktime, divx and more)"
+ boolean "opieplayer2"
default "n"
depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
- comment "opie-mediaplayer2-skin-default-landscape automatically selected"
- depends OPIEPLAYER2
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 11ad745..00cfa33 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -1,2 +1,2 @@
- /*
+/*
                This file is part of the Opie Project
@@ -89,3 +89,3 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget )
ts << "audio.num_buffers:50\n";
- ts << "audio.size_buffers:4160\n";
+ ts << "audio.size_buffers:4096\n";
ts << "video.num_buffers:20\n";
@@ -272,3 +272,3 @@ int Lib::length() const {
int iRetVal=0, iTestLoop=0;
-
+
do
diff --git a/noncore/multimedia/opieplayer2/main.cpp b/noncore/multimedia/opieplayer2/main.cpp
index f87cee8..b0a22b2 100644
--- a/noncore/multimedia/opieplayer2/main.cpp
+++ b/noncore/multimedia/opieplayer2/main.cpp
@@ -6,2 +6,9 @@
+
+
+#include <opie/oapplicationfactory.h>
+
+OPIE_EXPORT_APP( OApplicationFactory<PlayListWidget> )
+
+#if 0
int main(int argc, char **argv) {
@@ -20,3 +27,3 @@ int main(int argc, char **argv) {
}
-
+#endif
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 4c9afca..9f51006 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -285,3 +285,2 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
void MediaPlayer::blank( bool b ) {
-// ### FIXME use ODevice::inst()->setDisplayStatus( b );
fd=open("/dev/fb0",O_RDWR);
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index b1f88c9..f193001 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -28,4 +28,2 @@
-#include <assert.h>
-
MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name )
diff --git a/noncore/multimedia/opieplayer2/opie-mediaplayer2.control b/noncore/multimedia/opieplayer2/opie-mediaplayer2.control
index 8e68c57..3e3e856 100644
--- a/noncore/multimedia/opieplayer2/opie-mediaplayer2.control
+++ b/noncore/multimedia/opieplayer2/opie-mediaplayer2.control
@@ -6,4 +6,4 @@ Maintainer: L.J.Potter <ljp@llornkcor.com>, Maximilian Reiss <harlekin@handhelds
Architecture: arm
-Depends: task-opie-minimal, libopie1, zlib1g, opie-mediaplayer2-skin-default | opie-mediaplayer2-skin-default-landscape , libxine1 | opie-mediaplayer2-codecs
-Description: The Opie media player II
+Depends: task-opie-minimal, libopie1, zlib1g, libstdc++2.10-glibc2.2, opie-mediaplayer2-skin-default | opie-mediaplayer2-skin-default-landscape , libxine1 | opie-mediaplayer2-codecs
+Description: The Opie media player
The mediaplayer for Opie. It plays mp3, mpeg, wav, ogg, quicktime, divx and
diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro
index 5dabbab..46e14a0 100644
--- a/noncore/multimedia/opieplayer2/opieplayer2.pro
+++ b/noncore/multimedia/opieplayer2/opieplayer2.pro
@@ -1,4 +1,2 @@
-TEMPLATE = app
-CONFIG = qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG = qt warn_on release quick-app
HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \
@@ -23,7 +21,2 @@ OBJECTS_DIR = qpeobj
-#INCLUDEPATH += $(OPIEDIR)/include
-#DEPENDPATH += $(OPIEDIR)/include
-
-
-
TRANSLATIONS = ../../../i18n/de/opieplayer2.ts \
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index a1a1016..9a9e1ec 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -41,2 +41,3 @@
#include "playlistwidget.h"
+#include "mediaplayer.h"
#include "mediaplayerstate.h"
@@ -49,5 +50,9 @@
-PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
- : PlayListWidgetGui( mediaPlayerState, parent, name ) , currentFileListView( 0 )
+PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl )
+ : PlayListWidgetGui( parent, "playList" ) , currentFileListView( 0 )
{
+ mediaPlayerState = new MediaPlayerState(0, "mediaPlayerState" );
+ m_mp = new MediaPlayer(*this, *mediaPlayerState, 0, "mediaPlayer");
+
+
@@ -62,5 +67,5 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle",
- &mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE );
+ mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE );
d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop",
- &mediaPlayerState, SLOT( setLooping( bool ) ), TRUE );
+ mediaPlayerState, SLOT( setLooping( bool ) ), TRUE );
@@ -88,3 +93,3 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"),
- &mediaPlayerState, SLOT( toggleFullscreen() ) );
+ mediaPlayerState, SLOT( toggleFullscreen() ) );
@@ -92,3 +97,3 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
bool b= cfg.readBoolEntry("FullScreen", 0);
- mediaPlayerState.setFullscreen( b );
+ mediaPlayerState->setFullscreen( b );
pmView->setItemChecked( -16, b );
@@ -127,7 +132,7 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
this, SLOT( tabChanged( QWidget* ) ) );
- connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ),
+ connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ),
d->tbPlay, SLOT( setOn( bool ) ) );
- connect( &mediaPlayerState, SIGNAL( loopingToggled( bool ) ),
+ connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ),
d->tbLoop, SLOT( setOn( bool ) ) );
- connect( &mediaPlayerState, SIGNAL( shuffledToggled( bool ) ),
+ connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ),
d->tbShuffle, SLOT( setOn( bool ) ) );
@@ -136,3 +141,6 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
connect ( gammaSlider, SIGNAL( valueChanged( int ) ),
- &mediaPlayerState, SLOT( setVideoGamma( int ) ) );
+ mediaPlayerState, SLOT( setVideoGamma( int ) ) );
+
+ connect( this, SIGNAL(skinSelected() ),
+ m_mp, SLOT( reloadSkins() ) );
@@ -157,2 +165,3 @@ PlayListWidget::~PlayListWidget() {
delete d;
+ delete m_mp;
}
@@ -161,5 +170,5 @@ PlayListWidget::~PlayListWidget() {
void PlayListWidget::initializeStates() {
- d->tbPlay->setOn( mediaPlayerState.isPlaying() );
- d->tbLoop->setOn( mediaPlayerState.isLooping() );
- d->tbShuffle->setOn( mediaPlayerState.isShuffled() );
+ d->tbPlay->setOn( mediaPlayerState->isPlaying() );
+ d->tbLoop->setOn( mediaPlayerState->isLooping() );
+ d->tbShuffle->setOn( mediaPlayerState->isShuffled() );
d->playListFrame->show();
@@ -343,4 +352,4 @@ void PlayListWidget::setDocument( const QString& fileref ) {
d->setDocumentUsed = TRUE;
- mediaPlayerState.setPlaying( FALSE );
- mediaPlayerState.setPlaying( TRUE );
+ mediaPlayerState->setPlaying( FALSE );
+ mediaPlayerState->setPlaying( TRUE );
}
@@ -368,3 +377,3 @@ const DocLnk *PlayListWidget::current() const { // this is fugly
bool PlayListWidget::prev() {
- if ( mediaPlayerState.isShuffled() ) {
+ if ( mediaPlayerState->isShuffled() ) {
const DocLnk *cur = current();
@@ -382,3 +391,3 @@ bool PlayListWidget::prev() {
if ( !d->selectedFiles->prev() ) {
- if ( mediaPlayerState.isLooping() ) {
+ if ( mediaPlayerState->isLooping() ) {
return d->selectedFiles->last();
@@ -395,3 +404,3 @@ bool PlayListWidget::next() {
//qDebug("<<<<<<<<<<<<next()");
- if ( mediaPlayerState.isShuffled() ) {
+ if ( mediaPlayerState->isShuffled() ) {
return prev();
@@ -399,3 +408,3 @@ bool PlayListWidget::next() {
if ( !d->selectedFiles->next() ) {
- if ( mediaPlayerState.isLooping() ) {
+ if ( mediaPlayerState->isLooping() ) {
return d->selectedFiles->first();
@@ -465,4 +474,4 @@ void PlayListWidget::playIt( QListViewItem *it) {
if(!it) return;
- mediaPlayerState.setPlaying(FALSE);
- mediaPlayerState.setPlaying(TRUE);
+ mediaPlayerState->setPlaying(FALSE);
+ mediaPlayerState->setPlaying(TRUE);
d->selectedFiles->unSelect();
@@ -567,3 +576,3 @@ void PlayListWidget::btnPlay(bool b) {
// mediaPlayerState->setPlaying(false);
- mediaPlayerState.setPlaying(b);
+ mediaPlayerState->setPlaying(b);
insanityBool=FALSE;
@@ -911,4 +920,4 @@ void PlayListWidget::pmViewActivated(int index) {
{
- mediaPlayerState.toggleFullscreen();
- bool b=mediaPlayerState.isFullscreen();
+ mediaPlayerState->toggleFullscreen();
+ bool b=mediaPlayerState->isFullscreen();
pmView->setItemChecked( index, b);
@@ -998,13 +1007,13 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
} else if ( msg == "stop()" ) {
- mediaPlayerState.setPlaying( false);
+ mediaPlayerState->setPlaying( false);
} else if ( msg == "togglePause()" ) {
- mediaPlayerState.togglePaused();
+ mediaPlayerState->togglePaused();
} else if ( msg == "next()" ) { //select next in list
- mediaPlayerState.setNext();
+ mediaPlayerState->setNext();
} else if ( msg == "prev()" ) { //select previous in list
- mediaPlayerState.setPrev();
+ mediaPlayerState->setPrev();
} else if ( msg == "toggleLooping()" ) { //loop or not loop
- mediaPlayerState.toggleLooping();
+ mediaPlayerState->toggleLooping();
} else if ( msg == "toggleShuffled()" ) { //shuffled or not shuffled
- mediaPlayerState.toggleShuffled();
+ mediaPlayerState->toggleShuffled();
} else if ( msg == "volUp()" ) { //volume more
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index fc305cd..29f3e8d 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -49,2 +49,4 @@ class QAction;
class QLabel;
+class MediaPlayerState;
+class MediaPlayer;
@@ -67,3 +69,4 @@ public:
- PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
+ static QString appName() { return QString::fromLatin1("opieplayer2"); }
+ PlayListWidget( QWidget* parent=0, const char* name=0, WFlags = 0 );
~PlayListWidget();
@@ -134,2 +137,4 @@ private:
QListView *currentFileListView;
+
+ MediaPlayer *m_mp;
};
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index 293bf45..fec91ea 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -48,4 +48,4 @@
-PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name )
- : QMainWindow( parent, name ), mediaPlayerState( _mediaPlayerState ) {
+PlayListWidgetGui::PlayListWidgetGui(QWidget* parent, const char* name )
+ : QMainWindow( parent, name ) {
@@ -188,5 +188,5 @@ void PlayListWidgetGui::setActiveWindow() {
// 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
+ MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType();
+ mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate
+ mediaPlayerState->setDisplayType( origDisplayType ); // now switch back
}
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
index c0cd37a..5706d14 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
@@ -95,3 +95,3 @@ class PlayListWidgetGui : public QMainWindow {
public:
- PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent=0, const char* name=0 );
+ PlayListWidgetGui( QWidget* parent=0, const char* name=0 );
~PlayListWidgetGui();
@@ -124,3 +124,3 @@ protected:
- MediaPlayerState &mediaPlayerState;
+ MediaPlayerState *mediaPlayerState;
};