summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorworo <woro@e10066b5-e1e2-0310-b819-94efdf66514b>2008-04-18 02:02:35 +0000
committerworo <woro@e10066b5-e1e2-0310-b819-94efdf66514b>2008-04-18 02:02:35 +0000
commitb72f5a176e455d33852a22c75c25a6afface8ee0 (patch)
tree30dd55c0b89a5f20490ccb195ed702972902aed2
parent7fdc6c635561d3558ea6f6398f6760ba35b75c9c (diff)
downloadvdr-plugin-muggle-b72f5a176e455d33852a22c75c25a6afface8ee0.tar.gz
vdr-plugin-muggle-b72f5a176e455d33852a22c75c25a6afface8ee0.tar.bz2
remove compile option USE_BITMAP, add it as a new background
mode git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@1193 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r--HISTORY3
-rw-r--r--Makefile9
-rw-r--r--README8
-rw-r--r--bitmap.h2
-rw-r--r--mg_setup.c2
-rw-r--r--mg_setup.h3
-rw-r--r--muggle.c2
-rw-r--r--po/de.po5
-rw-r--r--po/fi.po9
-rw-r--r--po/fr.po5
-rw-r--r--po/muggle.pot5
-rw-r--r--vdr_player.c47
-rw-r--r--vdr_player.h2
-rw-r--r--vdr_setup.c9
14 files changed, 55 insertions, 56 deletions
diff --git a/HISTORY b/HISTORY
index b735dcf..53ab59c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -346,3 +346,6 @@ XXXXXXXXXX: Version 0.0.8-ALPHA
- make the compile option USE_BITMAP work again on unmodified FF cards
- make sure a displayed list is never empty by moving up in the tree if needed.
If the list is then still empty, display an item "Synchronize data base".
+- change the compile option USE_BITMAP into a setup variant: New background mode "Bitmap".
+ This is for those whose computers have problems with showing mpeg covers like
+ "timeout waiting for LoadBitmap" in the FF card driver \ No newline at end of file
diff --git a/Makefile b/Makefile
index 66adfdb..730ff70 100644
--- a/Makefile
+++ b/Makefile
@@ -94,16 +94,11 @@ OBJS = $(PLUGIN).o mg_valmap.o mg_thread_sync.o \
vdr_decoder_mp3.o vdr_stream.o vdr_decoder.o vdr_player.o \
vdr_setup.o mg_setup.o mg_incremental_search.o mg_image_provider.o \
mg_skin.o quantize.o mg_playcommands.o pcmplayer.o \
- lyrics.o
+ lyrics.o bitmap.o imagecache.o
-PLAYLIBS = -lmad $(shell taglib-config --libs)
+PLAYLIBS = -lmad $(shell taglib-config --libs) -lImlib2
MILIBS = $(shell taglib-config --libs)
-ifdef USE_BITMAP
-DEFINES += -DUSE_BITMAP
-OBJS += bitmap.o imagecache.o
-PLAYLIBS += -lImlib2
-endif
ifdef HAVE_SQLITE
DB_OBJ = mg_db_gd_sqlite.o
diff --git a/README b/README
index fd42d0c..7b43c67 100644
--- a/README
+++ b/README
@@ -74,6 +74,10 @@ required packages are
- mjpegtools (Debian package mjpegtools)
- netpbm (Debian package netpbm)
+Since release 0.2.0 Muggle has a new player OSD. It now also requires
+the package
+ - Imlib2 (Debian packages libimlib2 and libimlib2-dev for compilation)
+
\section install INSTALLING
Unpack the sources in PLUGINS/src below your VDR directory (i.e. where
@@ -256,7 +260,9 @@ Muggle can display cover images (and others). Set the setup entry
"Background mode" to "Cover small" or "Cover big" to enable this
feature. "Cover small" puts it into the lower right corner which
is unused by the main player screen, "Cover big" shows it on
-the full screen as background image.
+the full screen as background image. If you get problems with your
+FF card like "timeout waiting for Loadbitmap", please use the background
+mode "Bitmap".
Please note that the mechanism to find images has changed in release 0.1.9
(and may be changed again in future versions). The images are now
diff --git a/bitmap.h b/bitmap.h
index 186eaa7..07ea1f6 100644
--- a/bitmap.h
+++ b/bitmap.h
@@ -2,7 +2,6 @@
* Borrowed from vdr-text2skin
*/
-#ifdef USE_BITMAP
#ifndef VDR_MP3BITMAP_H
#define VDR_MP3BITMAP_H
@@ -98,4 +97,3 @@ inline void cMP3Bitmap::SetColor(int Index, tColor Color) {
mBitmaps[mCurrent]->SetColor(Index, Color);
}
#endif // VDR_MP3BITMAP_H
-#endif
diff --git a/mg_setup.c b/mg_setup.c
index d36f103..fdd208a 100644
--- a/mg_setup.c
+++ b/mg_setup.c
@@ -60,9 +60,7 @@ mgSetup::mgSetup () {
//Player:
ArtistFirst = 0;
-#ifdef USE_BITMAP
ImgAlpha = 255;
-#endif
Jumptime = 30;
// stuff related to cover image display
diff --git a/mg_setup.h b/mg_setup.h
index e94129f..84324ad 100644
--- a/mg_setup.h
+++ b/mg_setup.h
@@ -32,6 +32,7 @@ using namespace std;
#define backgrCoverSmall 1
#define backgrCoverBig 2
#define backgrLive 3
+#define backgrBitmap 4
/*!
* \brief storage for setup data
@@ -70,9 +71,7 @@ class mgSetup
// Player:
int ArtistFirst;
-#ifdef USE_BITMAP
int ImgAlpha;
-#endif
int Jumptime;
int DeleteStaleReferences;
diff --git a/muggle.c b/muggle.c
index 6fdb4a8..365d757 100644
--- a/muggle.c
+++ b/muggle.c
@@ -120,10 +120,8 @@ bool mgMuggle::SetupParse (const char *Name, const char *Value) {
the_setup.Jumptime = atoi(Value);
else if (!strcasecmp(Name, "ArtistFirst"))
the_setup.ArtistFirst = atoi(Value);
-#ifdef USE_BITMAP
else if (!strcasecmp(Name, "ImgAlpha"))
the_setup.ImgAlpha = atoi(Value);
-#endif
else
return false;
diff --git a/po/de.po b/po/de.po
index 75cc974..08a8f0e 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: <vdr-muggle-develop@sourceforge.net>\n"
-"POT-Creation-Date: 2008-04-15 03:21+0200\n"
+"POT-Creation-Date: 2008-04-18 03:44+0200\n"
"PO-Revision-Date: 2008-04-11 19:38+0200\n"
"Last-Translator: Wolfgang Rohdewald <wolfgang@rohdewald.de>\n"
"Language-Team: deutsch <vdr-muggle-i18n@sourceforge.net>\n"
@@ -353,6 +353,9 @@ msgstr "Großes Cover"
msgid "Live"
msgstr "TV-Bild"
+msgid "Bitmap"
+msgstr ""
+
msgid "Background mode"
msgstr "Hintergrundmodus"
diff --git a/po/fi.po b/po/fi.po
index 8e41498..0d0bac5 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: fi\n"
"Report-Msgid-Bugs-To: <vdr-muggle-develop@sourceforge.net>\n"
-"POT-Creation-Date: 2008-04-13 09:27+0200\n"
+"POT-Creation-Date: 2008-04-18 03:44+0200\n"
"PO-Revision-Date: 2008-04-13 12:59+0300\n"
"Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"
"Language-Team: Finnish <vdr-muggle-i18n@sourceforge.net>\n"
@@ -36,6 +36,9 @@ msgstr "Tiedostoa %s ei löydy"
msgid "Commands"
msgstr "Komennot"
+msgid "Database is empty"
+msgstr ""
+
msgid "Genre"
msgstr "Tyylilaji"
@@ -349,6 +352,9 @@ msgstr "Suuri kansikuva"
msgid "Live"
msgstr "live"
+msgid "Bitmap"
+msgstr ""
+
msgid "Background mode"
msgstr "Taustamoodi"
@@ -372,4 +378,3 @@ msgstr "Kansikuvan läpinäkyvyys"
msgid "Delete stale references"
msgstr "Tuhoa vanhentuneet viittaukset"
-
diff --git a/po/fr.po b/po/fr.po
index 37bf6b6..a9b5c54 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: <vdr-muggle-develop@sourceforge.net>\n"
-"POT-Creation-Date: 2008-04-15 03:21+0200\n"
+"POT-Creation-Date: 2008-04-18 03:44+0200\n"
"PO-Revision-Date: 2008-04-11 20:27+0200\n"
"Last-Translator: Wolfgang Rohdewald <wolfgang@rohdewald.de>\n"
"Language-Team: deutsch <vdr-muggle-i18n@sourceforge.net>\n"
@@ -352,6 +352,9 @@ msgstr "Image grand"
msgid "Live"
msgstr "Live"
+msgid "Bitmap"
+msgstr ""
+
msgid "Background mode"
msgstr "Background mode"
diff --git a/po/muggle.pot b/po/muggle.pot
index 2c10cac..f67da5f 100644
--- a/po/muggle.pot
+++ b/po/muggle.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: <vdr-muggle-develop@sourceforge.net>\n"
-"POT-Creation-Date: 2008-04-15 07:37+0200\n"
+"POT-Creation-Date: 2008-04-18 03:51+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -349,6 +349,9 @@ msgstr ""
msgid "Live"
msgstr ""
+msgid "Bitmap"
+msgstr ""
+
msgid "Background mode"
msgstr ""
diff --git a/vdr_player.c b/vdr_player.c
index 25059e7..e4bc8df 100644
--- a/vdr_player.c
+++ b/vdr_player.c
@@ -343,9 +343,7 @@ mgPlayerControl::InitLayout(void) {
clrProgressbarFG = clrStatusBG;
clrProgressbarBG = clrStatusTextFG;
-#ifdef USE_BITMAP
imgalpha = the_setup.ImgAlpha;
-#endif
rows = 7;
osdheight = Setup.OSDHeight;
@@ -363,7 +361,7 @@ mgPlayerControl::InitLayout(void) {
InfoBottom = PBTop - 1;
int imagex1,imagey1,imagex2,imagey2;
listdepth=4;
- if (the_setup.BackgrMode==backgrCoverSmall) {
+ if (the_setup.BackgrMode==backgrCoverSmall || the_setup.BackgrMode==backgrBitmap) {
CoverWidth = PBBottom-lh;
while (1) {
CoverX = osdwidth - CoverWidth -3*fw -2;
@@ -400,11 +398,10 @@ mgPlayerControl::InitLayout(void) {
}
if (!m_img_provider) {
tArea coverarea = { imagex1, imagey1, imagex2, imagey2};
-#if USE_BITMAP
- m_img_provider = new mgImageProvider(coverarea);
-#else
- m_img_provider = new mgMpgImageProvider(coverarea);
-#endif
+ if (the_setup.BackgrMode==backgrBitmap)
+ m_img_provider = new mgImageProvider(coverarea);
+ else
+ m_img_provider = new mgMpgImageProvider(coverarea);
}
}
@@ -586,9 +583,8 @@ mgPlayerControl::ProgressAreas(int& NumAreas) {
InitArea(result[NumAreas++],0, fh -2, x1 -1, 2*fh -1, 2); // between top and tracklist
InitArea(result[NumAreas++],0, 2*fh, x1 -1, lh -1, listdepth); // tracklist
InitArea(result[NumAreas++],0, lh, CoverX-1, PBTop-1 , listdepth); // Info
-#ifdef USE_BITMAP
- InitArea(result[NumAreas++],CoverX, lh, x1 - 1, BottomTop-1, coverdepth); // Cover
-#endif
+ if (the_setup.BackgrMode==backgrBitmap)
+ InitArea(result[NumAreas++],CoverX, lh, x1 - 1, BottomTop-1, coverdepth); // Cover
InitArea(result[NumAreas++],0, PBTop , CoverX-1, BottomTop-1 , 2); // Progressbar
InitArea(result[NumAreas++],0, BottomTop , x1 -1, osdheight-1 , 4); // Bottom
return result;
@@ -631,9 +627,8 @@ mgPlayerControl::ShowProgress (bool open) {
osd->DrawRectangle(0 , InfoTop , CoverX-1 , PBBottom ,clrInfoBG1);
// Cover
-#ifdef USE_BITMAP
- osd->DrawRectangle(CoverX , InfoTop , x1 -1 , PBBottom ,clrInfoBG1);
-#endif
+ if (the_setup.BackgrMode==backgrBitmap)
+ osd->DrawRectangle(CoverX , InfoTop , x1 -1 , PBBottom ,clrInfoBG1);
// Info
osd->DrawRectangle(3*fw, lh + 27 + fh/2 , CoverX-2*fw+1, PBBottom , clrInfoBG2);
@@ -686,9 +681,8 @@ mgPlayerControl::ShowProgress (bool open) {
}
if (CoverChanged()) {
-#ifdef USE_BITMAP
- osd->DrawRectangle(CoverX, lh, x1 -1, PBBottom, clrInfoBG1);
-#endif
+ if (the_setup.BackgrMode==backgrBitmap)
+ osd->DrawRectangle(CoverX, lh, x1 -1, PBBottom, clrInfoBG1);
LoadCover();
flush = true;
}
@@ -1272,14 +1266,14 @@ void mgPlayerControl::LoadCover(void) {
fw=6;
fh=27;
-#if USE_BITMAP
- int bmpcolors = 15; // TODO xine can handle 256
- cMP3Bitmap *bmp;
- if ((bmp = cMP3Bitmap::Load(coverpicture, imgalpha, CoverWidth, CoverWidth, bmpcolors)) !=NULL) {
- osd->DrawRectangle(CoverX, lh, osdwidth -1, PBBottom, clrInfoBG1);
- osd->DrawBitmap(CoverX , PBBottom -CoverWidth, bmp->Get(), clrTransparent, clrTransparent, true);
+ if (the_setup.BackgrMode==backgrBitmap) {
+ int bmpcolors = 15; // TODO xine can handle 256
+ cMP3Bitmap *bmp;
+ if ((bmp = cMP3Bitmap::Load(coverpicture, imgalpha, CoverWidth, CoverWidth, bmpcolors)) !=NULL) {
+ osd->DrawRectangle(CoverX, lh, osdwidth -1, PBBottom, clrInfoBG1);
+ osd->DrawBitmap(CoverX , PBBottom -CoverWidth, bmp->Get(), clrTransparent, clrTransparent, true);
+ }
}
-#endif
#ifdef HAVE_TUNED_GTFT
cPlugin *graphtft=cPluginManager::GetPlugin("graphtft");
@@ -1431,9 +1425,8 @@ mgPlayerControl::CheckImage() {
return;
if (!player)
return;
-#ifdef USE_BITMAP
- if (cmdOsd) return;
-#endif
+ if (the_setup.BackgrMode==backgrBitmap && cmdOsd)
+ return;
long elapsed=time(0)-m_imageshowtime;
if (elapsed >= the_setup.ImageShowDuration
|| (m_current_image.size()==0 && elapsed>1)) {
diff --git a/vdr_player.h b/vdr_player.h
index d47b37a..735ef40 100644
--- a/vdr_player.h
+++ b/vdr_player.h
@@ -120,9 +120,7 @@ class mgPlayerControl:public cControl, cStatus
int clrStatusYellow;
int clrStatusBlue;
int clrStatusTextFG;
-#ifdef USE_BITMAP
int imgalpha;
-#endif
int mpgdif;
bool layout_initialized;
//
diff --git a/vdr_setup.c b/vdr_setup.c
index d117772..385961c 100644
--- a/vdr_setup.c
+++ b/vdr_setup.c
@@ -25,7 +25,7 @@
static const char* chars_allowed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_./";
-static const char *bgmodes[4];
+static const char *bgmodes[5];
// --- mgMenuSetup -----------------------------------------------------------
@@ -61,9 +61,10 @@ mgMenuSetup::mgMenuSetup () {
bgmodes[backgrCoverSmall] = tr("Cover small");
bgmodes[backgrCoverBig] = tr("Cover big");
bgmodes[backgrLive] = tr("Live");
+ bgmodes[backgrBitmap] = tr("Bitmap");
Add (new
cMenuEditStraItem (tr ("Background mode"), &the_setup.BackgrMode,
- 4, bgmodes ) );
+ 5, bgmodes ) );
Add (new
cMenuEditIntItem (tr ("Image show duration (secs)"),
&the_setup.ImageShowDuration, 1, 100));
@@ -80,11 +81,9 @@ mgMenuSetup::mgMenuSetup () {
Add (new
cMenuEditIntItem (tr ("Fastforward jump (secs)"),
&the_setup.Jumptime, 1, 100));
-#ifdef USE_BITMAP
Add (new
cMenuEditIntItem (tr("Setup.muggle$Transparency for cover"),
&the_setup.ImgAlpha,1,255));
-#endif
// Synchronization
Add (new
cMenuEditBoolItem (tr ("Delete stale references"), &the_setup.DeleteStaleReferences,
@@ -109,9 +108,7 @@ mgMenuSetup::Store (void) {
SetupStore ("Only48kHz", the_setup.Only48kHz);
SetupStore ("DeleteStaleReferences", the_setup.DeleteStaleReferences);
SetupStore ("ImageShowDuration", the_setup.ImageShowDuration);
-#ifdef USE_BITMAP
SetupStore ("ImgAlpha", the_setup.ImgAlpha);
-#endif
SetupStore ("CacheDir", the_setup.CacheDir);
SetupStore ("ArtistFirst", the_setup.ArtistFirst);
SetupStore ("Jumptime", the_setup.Jumptime);