-rw-r--r-- | core/multimedia/opieplayer/config.in | 3 | ||||
-rw-r--r-- | core/multimedia/opieplayer/inputDialog.cpp | 3 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.h | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmpeg3/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/main.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/load_j2b.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/tables.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 4 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/config.in | 3 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/libtremorplugin.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/tremor/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/vorbis.pro | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/wavplugin/config.in | 2 |
15 files changed, 12 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/config.in b/core/multimedia/opieplayer/config.in index dc1b79a..a7ac444 100644 --- a/core/multimedia/opieplayer/config.in +++ b/core/multimedia/opieplayer/config.in @@ -1,12 +1,13 @@ config OPIEPLAYER - boolean "opie-mediaplayer (mediaplayer that plays mp3, mpeg, and wav)" + boolean "Opieplayer" default "y" depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE source core/multimedia/opieplayer/libflash/config.in source core/multimedia/opieplayer/libmad/config.in source core/multimedia/opieplayer/libmpeg3/config.in source core/multimedia/opieplayer/modplug/config.in source core/multimedia/opieplayer/wavplugin/config.in source core/multimedia/opieplayer/vorbis/tremor/config.in source core/multimedia/opieplayer/vorbis/config.in +
\ No newline at end of file diff --git a/core/multimedia/opieplayer/inputDialog.cpp b/core/multimedia/opieplayer/inputDialog.cpp index 62240b2..38b8f53 100644 --- a/core/multimedia/opieplayer/inputDialog.cpp +++ b/core/multimedia/opieplayer/inputDialog.cpp @@ -1,62 +1,59 @@ #include "inputDialog.h" #include <qpe/resource.h> #include <opie/ofiledialog.h> #include <qlineedit.h> -#include <qlayout.h> -#include <qvariant.h> #include <qpushbutton.h> -#include <qwhatsthis.h> InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) { setName( "InputDialog" ); } resize( 234, 115); setMaximumSize( QSize( 240, 40)); setCaption( tr( name ) ); QPushButton *browserButton; browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); browserButton->setGeometry( QRect( 205, 10, 22, 22)); connect( browserButton, SIGNAL(released()),this,SLOT(browse())); LineEdit1 = new QLineEdit( this, "LineEdit1" ); LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); LineEdit1->setFocus(); } /* * return the current text(input) */ QString InputDialog::text() const { return LineEdit1->text(); } /* * Destroys the object and frees any allocated resources */ InputDialog::~InputDialog() { } void InputDialog::browse() { MimeTypes types; QStringList audio, video, all; audio << "audio/*"; audio << "playlist/plain"; audio << "audio/x-mpegurl"; video << "video/*"; video << "playlist/plain"; all += audio; all += video; types.insert("All Media Files", all ); types.insert("Audio", audio ); types.insert("Video", video ); QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); LineEdit1->setText(str); } diff --git a/core/multimedia/opieplayer/libmad/config.in b/core/multimedia/opieplayer/libmad/config.in index 72249dc..1239166 100644 --- a/core/multimedia/opieplayer/libmad/config.in +++ b/core/multimedia/opieplayer/libmad/config.in @@ -1,4 +1,4 @@ config LIBMAD - boolean "opieplayer1-libmadplugin (plugin with shoutcast/icecast support to play MP3 files)" + boolean "libmadplugin" default "y" depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.h b/core/multimedia/opieplayer/libmad/libmadplugin.h index 6747712..b05ba15 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.h +++ b/core/multimedia/opieplayer/libmad/libmadplugin.h @@ -1,117 +1,116 @@ /********************************************************************** ** Copyright (C) 2001 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef LIBMAD_PLUGIN_H #define LIBMAD_PLUGIN_H #include <qstring.h> #include <qpe/mediaplayerplugininterface.h> /* #include "../mediaplayerplugininterface.h" */ // #define OLD_MEDIAPLAYER_API class LibMadPluginData; class LibMadPlugin : public MediaPlayerDecoder { - public: LibMadPlugin(); ~LibMadPlugin(); const char *pluginName() { return "LibMadPlugin"; } const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; } double pluginVersion() { return 1.0; } bool isFileSupported( const QString& ); bool open( const QString& ); bool close(); bool isOpen(); const QString &fileInfo() { return info; } // If decoder doesn't support audio then return 0 here int audioStreams(); int audioChannels( int stream ); int audioFrequency( int stream ); int audioSamples( int stream ); bool audioSetSample( long sample, int stream ); /* int audioBitsPerSample(int) {return 0;} */ long audioGetSample( int stream ); #ifdef OLD_MEDIAPLAYER_API bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); bool audioReadSamples( short *output, int channel, long samples, int stream ); bool audioReReadSamples( short *output, int channel, long samples, int stream ); #else bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); #endif bool read(); bool decode( short *output, long samples, long& samplesRead ); void printID3Tags(); // If decoder doesn't support video then return 0 here int videoStreams() { return 0; } int videoWidth( int ) { return 0; } int videoHeight( int ) { return 0; } double videoFrameRate( int ) { return 0.0; } int videoFrames( int ) { return 0; } bool videoSetFrame( long, int ) { return FALSE; } long videoGetFrame( int ) { return 0; } bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; } bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; } bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; } // Profiling double getTime(); // Ignore if these aren't supported bool setSMP( int ) { return FALSE; } bool setMMX( bool ) { return FALSE; } // Capabilities bool supportsAudio() { return TRUE; } bool supportsVideo() { return FALSE; } bool supportsYUV() { return FALSE; } bool supportsMMX() { return TRUE; } bool supportsSMP() { return FALSE; } bool supportsStereo() { return TRUE; } bool supportsScaling() { return FALSE; } long getPlayTime() { return -1; } private: int is_address_multicast(unsigned long address); int udp_open(char *address, int port); int tcp_open(char *address, int port); int http_read_line(int tcp_sock, char *buf, int size) ; int http_open(const QString& path ); LibMadPluginData *d; QString info; int bufferSize; }; #endif diff --git a/core/multimedia/opieplayer/libmpeg3/config.in b/core/multimedia/opieplayer/libmpeg3/config.in index b965a40..b634594 100644 --- a/core/multimedia/opieplayer/libmpeg3/config.in +++ b/core/multimedia/opieplayer/libmpeg3/config.in @@ -1,4 +1,4 @@ config LIBMPEG3 - boolean "opieplayer1-libmpeg3plugin (play MPEG3 video files)" + boolean "libmpeg3plugin" default "y" depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER diff --git a/core/multimedia/opieplayer/main.cpp b/core/multimedia/opieplayer/main.cpp index 18cd7a6..32dc1d5 100644 --- a/core/multimedia/opieplayer/main.cpp +++ b/core/multimedia/opieplayer/main.cpp @@ -1,56 +1,55 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include <qpe/qpeapplication.h> #include "mediaplayerstate.h" #include "playlistwidget.h" #include "audiowidget.h" #include "videowidget.h" #include "loopcontrol.h" #include "mediaplayer.h" MediaPlayerState *mediaPlayerState; PlayListWidget *playList; AudioWidget *audioUI; VideoWidget *videoUI; LoopControl *loopControl; int main(int argc, char **argv) { QPEApplication a(argc,argv); MediaPlayerState st( 0, "mediaPlayerState" ); mediaPlayerState = &st; PlayListWidget pl( 0, "playList" ); playList = &pl; AudioWidget aw( 0, "audioUI" ); audioUI = &aw; VideoWidget vw( 0, "videoUI" ); videoUI = &vw; LoopControl lc( 0, "loopControl" ); loopControl = &lc; MediaPlayer mp( 0, "mediaPlayer" ); // pl.setCaption( MediaPlayer::tr("OpiePlayer") ); a.showMainDocumentWidget(&pl); return a.exec(); } diff --git a/core/multimedia/opieplayer/modplug/config.in b/core/multimedia/opieplayer/modplug/config.in index 86e4725..769db1b 100644 --- a/core/multimedia/opieplayer/modplug/config.in +++ b/core/multimedia/opieplayer/modplug/config.in @@ -1,4 +1,4 @@ config MODPLUG - boolean "opieplayer1-modplugin (play MOD/XM/S3M/IT amiga tracker modules)" + boolean "modplugin" default "y" depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER diff --git a/core/multimedia/opieplayer/modplug/load_j2b.cpp b/core/multimedia/opieplayer/modplug/load_j2b.cpp index 5f60bbb..4f0b85c 100644 --- a/core/multimedia/opieplayer/modplug/load_j2b.cpp +++ b/core/multimedia/opieplayer/modplug/load_j2b.cpp @@ -1,18 +1,17 @@ /* * This program is free software; you can redistribute it and modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the license or (at your * option) any later version. * * Authors: Olivier Lapicque <olivierl@jps.net> */ /////////////////////////////////////////////////// // // J2B module loader // /////////////////////////////////////////////////// #include "stdafx.h" -#include "sndfile.h" diff --git a/core/multimedia/opieplayer/modplug/tables.cpp b/core/multimedia/opieplayer/modplug/tables.cpp index e7198b2..baf4517 100644 --- a/core/multimedia/opieplayer/modplug/tables.cpp +++ b/core/multimedia/opieplayer/modplug/tables.cpp @@ -1,107 +1,106 @@ /* * This program is free software; you can redistribute it and modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the license or (at your * option) any later version. * * Authors: Olivier Lapicque <olivierl@jps.net> */ #include "stdafx.h" -#include "sndfile.h" #ifndef FASTSOUNDLIB //#pragma data_seg(".tables") #endif extern const BYTE ImpulseTrackerPortaVolCmd[16]; const BYTE ImpulseTrackerPortaVolCmd[16] = { 0x00, 0x01, 0x04, 0x08, 0x10, 0x20, 0x40, 0x60, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; // Period table for Protracker octaves 0-5: extern const WORD ProTrackerPeriodTable[6*12]; const WORD ProTrackerPeriodTable[6*12] = { 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, 856,808,762,720,678,640,604,570,538,508,480,453, 428,404,381,360,339,320,302,285,269,254,240,226, 214,202,190,180,170,160,151,143,135,127,120,113, 107,101,95,90,85,80,75,71,67,63,60,56, 53,50,47,45,42,40,37,35,33,31,30,28 }; extern const WORD ProTrackerTunedPeriods[16*12]; const WORD ProTrackerTunedPeriods[16*12] = { 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, 1700,1604,1514,1430,1348,1274,1202,1134,1070,1010,954,900, 1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948,894, 1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940,888, 1664,1570,1482,1398,1320,1246,1176,1110,1048,990,934,882, 1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926,874, 1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920,868, 1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914,862, 1814,1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960, 1800,1700,1604,1514,1430,1350,1272,1202,1134,1070,1010,954, 1788,1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948, 1774,1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940, 1762,1664,1570,1482,1398,1320,1246,1176,1110,1048,988,934, 1750,1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926, 1736,1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920, 1724,1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914 }; // S3M C-4 periods extern const WORD FreqS3MTable[16]; const WORD FreqS3MTable[16] = { 1712,1616,1524,1440,1356,1280, 1208,1140,1076,1016,960,907, 0,0,0,0 }; // S3M FineTune frequencies extern const WORD S3MFineTuneTable[16]; const WORD S3MFineTuneTable[16] = { 7895,7941,7985,8046,8107,8169,8232,8280, 8363,8413,8463,8529,8581,8651,8723,8757, // 8363*2^((i-8)/(12*8)) }; // Sinus table extern const short int ModSinusTable[64]; const short int ModSinusTable[64] = { 0,12,25,37,49,60,71,81,90,98,106,112,117,122,125,126, 127,126,125,122,117,112,106,98,90,81,71,60,49,37,25,12, 0,-12,-25,-37,-49,-60,-71,-81,-90,-98,-106,-112,-117,-122,-125,-126, -127,-126,-125,-122,-117,-112,-106,-98,-90,-81,-71,-60,-49,-37,-25,-12 }; // Triangle wave table (ramp down) extern const short int ModRampDownTable[64]; const short int ModRampDownTable[64] = { 0,-4,-8,-12,-16,-20,-24,-28,-32,-36,-40,-44,-48,-52,-56,-60, -64,-68,-72,-76,-80,-84,-88,-92,-96,-100,-104,-108,-112,-116,-120,-124, 127,123,119,115,111,107,103,99,95,91,87,83,79,75,71,67, 63,59,55,51,47,43,39,35,31,27,23,19,15,11,7,3 }; // Square wave table extern const short int ModSquareTable[64]; const short int ModSquareTable[64] = { 127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127, 127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127, -127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127, -127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127 }; diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index b393230..8016d8e 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -1,189 +1,189 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ // code added by L. J. Potter Sat 03-02-2002 06:17:54 #define QTOPIA_INTERNAL_FSLP #include <qpe/qcopenvelope_qws.h> #include <qpe/qpemenubar.h> #include <qpe/qpetoolbar.h> #include <qpe/fileselector.h> #include <qpe/qpeapplication.h> #include <qpe/lnkproperties.h> #include <qpe/storage.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/global.h> #include <qpe/resource.h> #include <qaction.h> #include <qcursor.h> #include <qimage.h> #include <qfile.h> #include <qdir.h> #include <qlayout.h> #include <qlabel.h> #include <qlist.h> #include <qlistbox.h> #include <qmainwindow.h> #include <qmessagebox.h> #include <qtoolbutton.h> #include <qtabwidget.h> #include <qlistview.h> #include <qpoint.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qregexp.h> #include <qtextstream.h> //#include <qtimer.h> #include "playlistselection.h" #include "playlistwidget.h" #include "mediaplayerstate.h" #include "inputDialog.h" #include <stdlib.h> #include "audiowidget.h" #include "videowidget.h" #include <unistd.h> #include <sys/file.h> #include <sys/ioctl.h> #include <sys/soundcard.h> // for setBacklight() #include <linux/fb.h> #include <sys/types.h> #include <sys/stat.h> #include <stdlib.h> #define BUTTONS_ON_TOOLBAR #define SIDE_BUTTONS #define CAN_SAVE_LOAD_PLAYLISTS extern AudioWidget *audioUI; extern VideoWidget *videoUI; extern MediaPlayerState *mediaPlayerState; static inline QString fullBaseName ( const QFileInfo &fi ) { QString str = fi. fileName ( ); return str. left ( str. findRev ( '.' )); } -QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg;audio/x-mod;audio/x-ogg"; +QString audioMimes ="audio/mpeg;audio/x-wav;application/ogg;audio/x-mod"; // class myFileSelector { // }; class PlayListWidgetPrivate { public: QToolButton *tbPlay, *tbFull, *tbLoop, *tbScale, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; QFrame *playListFrame; FileSelector *files; PlayListSelection *selectedFiles; bool setDocumentUsed; DocLnk *current; }; class ToolButton : public QToolButton { public: ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) : QToolButton( parent, name ) { setTextLabel( name ); setPixmap( Resource::loadPixmap( icon ) ); setAutoRaise( TRUE ); setFocusPolicy( QWidget::NoFocus ); setToggleButton( t ); connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); QPEMenuToolFocusManager::manager()->addWidget( this ); } }; class MenuItem : public QAction { public: MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) : QAction( text, QString::null, 0, 0 ) { connect( this, SIGNAL( activated() ), handler, slot ); addTo( parent ); } }; PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { d = new PlayListWidgetPrivate; d->setDocumentUsed = FALSE; d->current = NULL; fromSetDocument = FALSE; insanityBool=FALSE; audioScan = FALSE; videoScan = FALSE; // menuTimer = new QTimer( this ,"menu timer"), // connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) ); channel = new QCopChannel( "QPE/Application/opieplayer", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT( qcopReceive(const QCString&, const QByteArray&)) ); setBackgroundMode( PaletteButton ); setCaption( tr("OpiePlayer") ); setIcon( Resource::loadPixmap( "opieplayer/MPEGPlayer" ) ); setToolBarsMovable( FALSE ); // Create Toolbar QPEToolBar *toolbar = new QPEToolBar( this ); toolbar->setHorizontalStretchable( TRUE ); // Create Menubar QPEMenuBar *menu = new QPEMenuBar( toolbar ); menu->setMargin( 0 ); QPEToolBar *bar = new QPEToolBar( this ); bar->setLabel( tr( "Play Operations" ) ); // d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list", // this , SLOT( addSelected()) ); tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); tbDeletePlaylist->setFlat(TRUE); tbDeletePlaylist->setFixedSize(20,20); d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", this , SLOT(addSelected()) ); d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist", this , SLOT(removeSelected()) ); // d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", /*this */mediaPlayerState , SLOT(setPlaying(bool) /* btnPlay() */), TRUE ); d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", this , SLOT( btnPlay(bool) ), TRUE ); d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer/shuffle", mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer/loop", mediaPlayerState, SLOT(setLooping(bool)), TRUE ); tbDeletePlaylist->hide(); QPopupMenu *pmPlayList = new QPopupMenu( this ); menu->insertItem( tr( "File" ), pmPlayList ); new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) ); @@ -1279,193 +1279,193 @@ void PlayListWidget::writem3u() { config.writeEntry("CurrentPlaylist",filename); currentPlayList=filename; if(!lnk.writeLink()) { // qDebug("Writing doclink did not work"); } setCaption(tr("OpiePlayer: ") + name); } } } void PlayListWidget::keyReleaseEvent( QKeyEvent *e) { switch ( e->key() ) { ////////////////////////////// Zaurus keys case Key_F9: //activity // if(audioUI->isHidden()) // audioUI->showMaximized(); break; case Key_F10: //contacts // if( videoUI->isHidden()) // videoUI->showMaximized(); break; case Key_F11: //menu break; case Key_F12: //home // doBlank(); break; case Key_F13: //mail // doUnblank(); break; case Key_Q: //add to playlist addSelected(); break; case Key_R: //remove from playlist removeSelected(); break; // case Key_P: //play // qDebug("Play"); // playSelected(); // break; case Key_Space: // playSelected(); puh break; case Key_1: tabWidget->setCurrentPage(0); break; case Key_2: tabWidget->setCurrentPage(1); break; case Key_3: tabWidget->setCurrentPage(2); break; case Key_4: tabWidget->setCurrentPage(3); break; case Key_Down: if ( !d->selectedFiles->next() ) d->selectedFiles->first(); break; case Key_Up: if ( !d->selectedFiles->prev() ) // d->selectedFiles->last(); break; } } void PlayListWidget::keyPressEvent( QKeyEvent *) { // qDebug("Key press"); // switch ( e->key() ) { // ////////////////////////////// Zaurus keys // case Key_A: //add to playlist // qDebug("Add"); // addSelected(); // break; // case Key_R: //remove from playlist // removeSelected(); // break; // case Key_P: //play // qDebug("Play"); // playSelected(); // break; // case Key_Space: // qDebug("Play"); // playSelected(); // break; // } } void PlayListWidget::doBlank() { - // TODO: why do we blank this way, why don't we use ODevice or ScreenSaver? + // qDebug("do blanking"); #ifdef QT_QWS_DEVFS fd=open("/dev/fb/0",O_RDWR); #else fd=open("/dev/fb0",O_RDWR); #endif if (fd != -1) { ioctl(fd,FBIOBLANK,1); // close(fd); } } void PlayListWidget::doUnblank() { // this crashes opieplayer with a segfault // int fd; // fd=open("/dev/fb0",O_RDWR); // qDebug("do unblanking"); if (fd != -1) { ioctl(fd,FBIOBLANK,0); close(fd); } QCopEnvelope h("QPE/System", "setBacklight(int)"); h <<-3;// v[1]; // -3 Force on } void PlayListWidget::populateSkinsMenu() { int item = 0; defaultSkinIndex = 0; QString skinName; Config cfg( "OpiePlayer" ); cfg.setGroup("Options" ); QString skin = cfg.readEntry( "Skin", "default" ); QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); skinsDir.setFilter( QDir::Dirs ); skinsDir.setSorting(QDir::Name ); const QFileInfoList *skinslist = skinsDir.entryInfoList(); QFileInfoListIterator it( *skinslist ); QFileInfo *fi; while ( ( fi = it.current() ) ) { skinName = fi->fileName(); // qDebug( fi->fileName() ); if( skinName != "." && skinName != ".." && skinName !="CVS" ) { item = skinsMenu->insertItem( fi->fileName() ) ; } if( skinName == "default" ) { defaultSkinIndex = item; } if( skinName == skin ) { skinsMenu->setItemChecked( item, TRUE ); } ++it; } } void PlayListWidget::skinsMenuActivated( int item ) { for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { skinsMenu->setItemChecked( i, FALSE ); } skinsMenu->setItemChecked( item, TRUE ); Config cfg( "OpiePlayer" ); cfg.setGroup("Options"); cfg.writeEntry("Skin", skinsMenu->text( item ) ); } void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { // qDebug("qcop message "+msg ); QDataStream stream ( data, IO_ReadOnly ); if ( msg == "play()" ) { //plays current selection btnPlay( true); } else if ( msg == "stop()" ) { mediaPlayerState->setPlaying( false); } else if ( msg == "togglePause()" ) { mediaPlayerState->togglePaused(); } else if ( msg == "next()" ) { //select next in lis mediaPlayerState->setNext(); } else if ( msg == "prev()" ) { //select previous in list mediaPlayerState->setPrev(); } else if ( msg == "toggleLooping()" ) { //loop or not loop mediaPlayerState->toggleLooping(); } else if ( msg == "toggleShuffled()" ) { //shuffled or not shuffled mediaPlayerState->toggleShuffled(); } else if ( msg == "volUp()" ) { //volume more // emit moreClicked(); // emit moreReleased(); } else if ( msg == "volDown()" ) { //volume less // emit lessClicked(); // emit lessReleased(); } else if ( msg == "play(QString)" ) { //play this now QString file; stream >> file; setDocumentEx( (const QString &) file); } else if ( msg == "add(QString)" ) { //add to playlist QString file; stream >> file; QFileInfo fileInfo(file); diff --git a/core/multimedia/opieplayer/vorbis/config.in b/core/multimedia/opieplayer/vorbis/config.in index bad9922..d66ec88 100644 --- a/core/multimedia/opieplayer/vorbis/config.in +++ b/core/multimedia/opieplayer/vorbis/config.in @@ -1,5 +1,6 @@ config LIBTREMORPLUGIN - boolean "opieplayer1-libtremorplugin (play OGG vorbis files)" + boolean "libtremorplugin" default "y" depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER + comment "tremor is ogg vorbis!!"
\ No newline at end of file diff --git a/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp b/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp index c1e1a23..53c4b2b 100644 --- a/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp +++ b/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp @@ -1,138 +1,137 @@ /**************************************************************************** * libtremorplugin.cpp * * Copyright (C) 2002 Latchesar Ionkov <lucho@ionkov.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ****************************************************************************/ // fixed and adapted for opieplayer 2003 ljp <llornkcor@handhelds.org> #include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <time.h> #include <locale.h> #include <math.h> #include <assert.h> #include <qmap.h> #include "libtremorplugin.h" extern "C" { -#include "tremor/ivorbiscodec.h" #include "tremor/ivorbisfile.h" } #define MPEG_BUFFER_SIZE 65536 //#define debugMsg(a) qDebug(a) #define debugMsg(a) class LibTremorPluginData { public: char* filename; FILE* f; OggVorbis_File vf; vorbis_info* vi; vorbis_comment* vc; bool bos; int csection; QString finfo; }; LibTremorPlugin::LibTremorPlugin() { qDebug("<<<<<<<<<<<<<TREMOR!!!!!>>>>>>>>>>>>>>>>>>"); d = new LibTremorPluginData; d->f = 0; d->vi = 0; d->vc = 0; d->bos = 0; d->csection = 0; d->finfo = ""; } LibTremorPlugin::~LibTremorPlugin() { close(); delete d; } bool LibTremorPlugin::isFileSupported( const QString& path ) { debugMsg( "LibTremorPlugin::isFileSupported" ); // Mpeg file extensions // "mp2","mp3","m1v","m2v","m2s","mpg","vob","mpeg",ac3" // Other media extensions // "wav","mid","mod","s3m","ogg","avi","mov","sid" char *ext = strrchr( path.latin1(), '.' ); // Test file extension if ( ext ) { if ( strncasecmp(ext, ".ogg", 4) == 0 ) return TRUE; } return FALSE; } bool LibTremorPlugin::open( const QString& path ) { debugMsg( "LibTremorPlugin::open" ); d->filename = (char*) path.latin1(); d->f = fopen( d->filename, "r" ); if (d->f == 0) { qDebug("error opening %s", d->filename ); return FALSE; } if (ov_open(d->f, &d->vf, NULL, 0) < 0) { qDebug("error opening %s", d->filename); return FALSE; } d->vc = ov_comment(&d->vf, -1); d->vi = ov_info(&d->vf, -1); d->bos = false; QString comments[] = { "title", "artist", "album", "year", "tracknumber", "" }; QString cdescr[] = { "Title", "Artist", "Album", "Year", "Track", "" }; QMap<QString, QString> cmap; char** cptr = d->vc->user_comments; while (*cptr != 0) { QString s(*cptr); int n = s.find('='); if (n < 0) { continue; } QString key = s.left(n).lower(); QString value = s.mid(n+1); diff --git a/core/multimedia/opieplayer/vorbis/tremor/config.in b/core/multimedia/opieplayer/vorbis/tremor/config.in index 8ee753c..f803d16 100644 --- a/core/multimedia/opieplayer/vorbis/tremor/config.in +++ b/core/multimedia/opieplayer/vorbis/tremor/config.in @@ -1,4 +1,4 @@ config LIBTREMOR - boolean "libtremor (library needed to play OGG files)" + boolean "libtremor" default "y" depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER diff --git a/core/multimedia/opieplayer/vorbis/vorbis.pro b/core/multimedia/opieplayer/vorbis/vorbis.pro index a15cf9c..d566003 100644 --- a/core/multimedia/opieplayer/vorbis/vorbis.pro +++ b/core/multimedia/opieplayer/vorbis/vorbis.pro @@ -1,11 +1,11 @@ TEMPLATE = lib CONFIG += qt warn_on release -HEADERS = libtremorplugin.h libtremorinimpl.h +HEADERS = libtremorplugin.h libtremorpluginimpl.h SOURCES = libtremorplugin.cpp libtremorpluginimpl.cpp TARGET = tremorplugin DESTDIR = $(OPIEDIR)/plugins/codecs INCLUDEPATH += $(OPIEDIR)/include .. tremor DEPENDPATH += $(OPIEDIR)/include .. tremor LIBS += -lqpe -lm -ltremor VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) diff --git a/core/multimedia/opieplayer/wavplugin/config.in b/core/multimedia/opieplayer/wavplugin/config.in index 56bdfab..6e4c4b3 100644 --- a/core/multimedia/opieplayer/wavplugin/config.in +++ b/core/multimedia/opieplayer/wavplugin/config.in @@ -1,4 +1,4 @@ config WAVPLUGIN - boolean "opieplayer1-wavplugin (play WAV files)" + boolean "wavplugin" default "y" depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER |