summaryrefslogtreecommitdiff
path: root/core/multimedia
Unidiff
Diffstat (limited to 'core/multimedia') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.cpp2
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp2
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp
index b700cd1..8b0fbbc 100644
--- a/core/multimedia/opieplayer/mediaplayerstate.cpp
+++ b/core/multimedia/opieplayer/mediaplayerstate.cpp
@@ -118,49 +118,49 @@ MediaPlayerDecoder *MediaPlayerState::curDecoder() {
118} 118}
119 119
120 120
121// ### hack to get true sample count 121// ### hack to get true sample count
122MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { 122MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() {
123 return libmpeg3decoder; 123 return libmpeg3decoder;
124} 124}
125 125
126// ### hack to get true sample count 126// ### hack to get true sample count
127// MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { 127// MediaPlayerDecoder *MediaPlayerState::libWavDecoder() {
128// return libwavdecoder; 128// return libwavdecoder;
129// } 129// }
130 130
131void MediaPlayerState::loadPlugins() { 131void MediaPlayerState::loadPlugins() {
132 // odebug << "load plugins" << oendl; 132 // odebug << "load plugins" << oendl;
133#ifndef QT_NO_COMPONENT 133#ifndef QT_NO_COMPONENT
134 QValueList<MediaPlayerPlugin>::Iterator mit; 134 QValueList<MediaPlayerPlugin>::Iterator mit;
135 for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { 135 for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) {
136 (*mit).iface->release(); 136 (*mit).iface->release();
137 (*mit).library->unload(); 137 (*mit).library->unload();
138 delete (*mit).library; 138 delete (*mit).library;
139 } 139 }
140 pluginList.clear(); 140 pluginList.clear();
141 141
142 QString path = QPEApplication::qpeDir() + "/plugins/codecs"; 142 QString path = QPEApplication::qpeDir() + "plugins/codecs";
143 QDir dir( path, "lib*.so" ); 143 QDir dir( path, "lib*.so" );
144 QStringList list = dir.entryList(); 144 QStringList list = dir.entryList();
145 QStringList::Iterator it; 145 QStringList::Iterator it;
146 for ( it = list.begin(); it != list.end(); ++it ) { 146 for ( it = list.begin(); it != list.end(); ++it ) {
147 MediaPlayerPluginInterface *iface = 0; 147 MediaPlayerPluginInterface *iface = 0;
148 QLibrary *lib = new QLibrary( path + "/" + *it ); 148 QLibrary *lib = new QLibrary( path + "/" + *it );
149// odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl; 149// odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl;
150 150
151 if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { 151 if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) {
152 152
153// odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl; 153// odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl;
154 154
155 MediaPlayerPlugin plugin; 155 MediaPlayerPlugin plugin;
156 plugin.library = lib; 156 plugin.library = lib;
157 plugin.iface = iface; 157 plugin.iface = iface;
158 plugin.decoder = plugin.iface->decoder(); 158 plugin.decoder = plugin.iface->decoder();
159 plugin.encoder = plugin.iface->encoder(); 159 plugin.encoder = plugin.iface->encoder();
160 pluginList.append( plugin ); 160 pluginList.append( plugin );
161 161
162 // ### hack to get true sample count 162 // ### hack to get true sample count
163 if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") ) 163 if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") )
164 libmpeg3decoder = plugin.decoder; 164 libmpeg3decoder = plugin.decoder;
165 165
166 } else { 166 } else {
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 46aeff2..db2bf1b 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1361,49 +1361,49 @@ void PlayListWidget::doBlank() {
1361 } 1361 }
1362} 1362}
1363 1363
1364void PlayListWidget::doUnblank() { 1364void PlayListWidget::doUnblank() {
1365 // this crashes opieplayer with a segfault 1365 // this crashes opieplayer with a segfault
1366 // int fd; 1366 // int fd;
1367 // fd=open("/dev/fb0",O_RDWR); 1367 // fd=open("/dev/fb0",O_RDWR);
1368 // odebug << "do unblanking" << oendl; 1368 // odebug << "do unblanking" << oendl;
1369 if (fd != -1) { 1369 if (fd != -1) {
1370 ioctl(fd,FBIOBLANK,0); 1370 ioctl(fd,FBIOBLANK,0);
1371 close(fd); 1371 close(fd);
1372 } 1372 }
1373 QCopEnvelope h("QPE/System", "setBacklight(int)"); 1373 QCopEnvelope h("QPE/System", "setBacklight(int)");
1374 h <<-3;// v[1]; // -3 Force on 1374 h <<-3;// v[1]; // -3 Force on
1375} 1375}
1376 1376
1377void PlayListWidget::populateSkinsMenu() { 1377void PlayListWidget::populateSkinsMenu() {
1378 int item = 0; 1378 int item = 0;
1379 defaultSkinIndex = 0; 1379 defaultSkinIndex = 0;
1380 QString skinName; 1380 QString skinName;
1381 Config cfg( "OpiePlayer" ); 1381 Config cfg( "OpiePlayer" );
1382 cfg.setGroup("Options" ); 1382 cfg.setGroup("Options" );
1383 QString skin = cfg.readEntry( "Skin", "default" ); 1383 QString skin = cfg.readEntry( "Skin", "default" );
1384 1384
1385 QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); 1385 QDir skinsDir( QPEApplication::qpeDir() + "pics/opieplayer2/skins" );
1386 skinsDir.setFilter( QDir::Dirs ); 1386 skinsDir.setFilter( QDir::Dirs );
1387 skinsDir.setSorting(QDir::Name ); 1387 skinsDir.setSorting(QDir::Name );
1388 const QFileInfoList *skinslist = skinsDir.entryInfoList(); 1388 const QFileInfoList *skinslist = skinsDir.entryInfoList();
1389 QFileInfoListIterator it( *skinslist ); 1389 QFileInfoListIterator it( *skinslist );
1390 QFileInfo *fi; 1390 QFileInfo *fi;
1391 while ( ( fi = it.current() ) ) { 1391 while ( ( fi = it.current() ) ) {
1392 skinName = fi->fileName(); 1392 skinName = fi->fileName();
1393 // odebug << fi->fileName() << oendl; 1393 // odebug << fi->fileName() << oendl;
1394 if( skinName != "." && skinName != ".." && skinName !="CVS" ) { 1394 if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
1395 item = skinsMenu->insertItem( fi->fileName() ) ; 1395 item = skinsMenu->insertItem( fi->fileName() ) ;
1396 } 1396 }
1397 if( skinName == "default" ) { 1397 if( skinName == "default" ) {
1398 defaultSkinIndex = item; 1398 defaultSkinIndex = item;
1399 } 1399 }
1400 if( skinName == skin ) { 1400 if( skinName == skin ) {
1401 skinsMenu->setItemChecked( item, TRUE ); 1401 skinsMenu->setItemChecked( item, TRUE );
1402 } 1402 }
1403 ++it; 1403 ++it;
1404 } 1404 }
1405} 1405}
1406 1406
1407void PlayListWidget::skinsMenuActivated( int item ) { 1407void PlayListWidget::skinsMenuActivated( int item ) {
1408 for( int i = defaultSkinIndex; i > defaultSkinIndex - static_cast<int>(skinsMenu->count()); i-- ) { 1408 for( int i = defaultSkinIndex; i > defaultSkinIndex - static_cast<int>(skinsMenu->count()); i-- ) {
1409 skinsMenu->setItemChecked( i, FALSE ); 1409 skinsMenu->setItemChecked( i, FALSE );
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 2396ed5..c545511 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -77,49 +77,49 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
77 QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) 77 QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 )
78{ 78{
79 setCaption( tr("OpiePlayer") ); 79 setCaption( tr("OpiePlayer") );
80 Config cfg("OpiePlayer"); 80 Config cfg("OpiePlayer");
81 81
82 cfg.setGroup("Options"); 82 cfg.setGroup("Options");
83 skin = cfg.readEntry("Skin","default"); 83 skin = cfg.readEntry("Skin","default");
84 84
85 QString skinPath; 85 QString skinPath;
86 skinPath = "opieplayer2/skins/" + skin; 86 skinPath = "opieplayer2/skins/" + skin;
87 if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists()) 87 if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists())
88 skinPath = "opieplayer2/skins/default"; 88 skinPath = "opieplayer2/skins/default";
89 89
90 90
91// QString skinPath = "opieplayer2/skins/" + skin; 91// QString skinPath = "opieplayer2/skins/" + skin;
92 92
93 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 93 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
94 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 94 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
95 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); 95 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
96 96
97 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); 97 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
98 imgButtonMask->fill( 0 ); 98 imgButtonMask->fill( 0 );
99 99
100 for ( int i = 0; i < 7; i++ ) { 100 for ( int i = 0; i < 7; i++ ) {
101 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + 101 QString filename = QString( QPEApplication::qpeDir() + "pics/" + skinPath +
102 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); 102 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
103 // odebug << "loading "+filename << oendl; 103 // odebug << "loading "+filename << oendl;
104 masks[i] = new QBitmap( filename ); 104 masks[i] = new QBitmap( filename );
105 105
106 if ( !masks[i]->isNull() ) { 106 if ( !masks[i]->isNull() ) {
107 QImage imgMask = masks[i]->convertToImage(); 107 QImage imgMask = masks[i]->convertToImage();
108 uchar **dest = imgButtonMask->jumpTable(); 108 uchar **dest = imgButtonMask->jumpTable();
109 for ( int y = 0; y < imgUp->height(); y++ ) { 109 for ( int y = 0; y < imgUp->height(); y++ ) {
110 uchar *line = dest[y]; 110 uchar *line = dest[y];
111 for ( int x = 0; x < imgUp->width(); x++ ) { 111 for ( int x = 0; x < imgUp->width(); x++ ) {
112 if ( !qRed( imgMask.pixel( x, y ) ) ) 112 if ( !qRed( imgMask.pixel( x, y ) ) )
113 line[x] = i + 1; 113 line[x] = i + 1;
114 } 114 }
115 } 115 }
116 } 116 }
117 } 117 }
118 for ( int i = 0; i < 7; i++ ) { 118 for ( int i = 0; i < 7; i++ ) {
119 buttonPixUp[i] = NULL; 119 buttonPixUp[i] = NULL;
120 buttonPixDown[i] = NULL; 120 buttonPixDown[i] = NULL;
121 } 121 }
122 122
123 QWidget *d = QApplication::desktop(); 123 QWidget *d = QApplication::desktop();
124 int width = d->width(); 124 int width = d->width();
125 int height = d->height(); 125 int height = d->height();