vdr-1.3.38 Patches for Playerplugins (MsgReplaying)

Message ID 1136738463.5208.36.camel@wopr.deltab.de
State New
Headers

Commit Message

Andreas Brachold Jan. 8, 2006, 4:41 p.m. UTC
  Hi,

i collected a patchset for some player plugins.

My motive is a common used of the change interface of 
cStatus::MsgReplaying => Replaying

I would generally wished a using like for starting:

cStatus::MsgReplaying(this, 
			"Pluginname",  // to identify player
			"Playbacked filetitle or name", 
			true); // bool bPlayback_started

and stopping : 

cStatus::MsgReplaying(this, 
			"Pluginname", 
			 NULL, 
			 false); //bool bPlayback_stopped



so that now Plugins like GraphLCD-Plugin recognition which player was
started. Too show matching images or animations on there display.


--------------------------------

A totally other idee as solution is a function that every player
cControl must overloaded :

class cControl : public cOsdObject {

const char* GetPlayerTitle() const = 0;


}


vdr/dvbplayer.h
const char* cDvbPlayerControl::GetPlayerTitle() const 
	{
		return "VDR"; 
	}



PLUGIN/src/image/control-image.h
const char* cImagePlayerControl::GetPlayerTitle() const 
	{ 
		return "IMAGE"; 
	}


Andreas
  

Patch

Index: HISTORY
===================================================================
--- HISTORY	(Revision 22)
+++ HISTORY	(Arbeitskopie)
@@ -1,6 +1,9 @@ 
 VDR Plugin 'image' Revision History
 -----------------------------------
 
+2006-01-08
+- Bounce to vdr-1.3.38 (Required)
+
 2006-01-06
 - add italian/dutch/portuguese/spanish translations via babelfish
 
Index: image.c
===================================================================
--- image.c	(Revision 22)
+++ image.c	(Arbeitskopie)
@@ -36,7 +36,7 @@ 
 #include "commands.h"
 #include "liboutput/encode.h"
 
-static const char *VERSION        = "0.2.4";
+static const char *VERSION        = "0.2.5";
 static const char *DESCRIPTION    = "A Image Viewer plugin";
 static const char *MAINMENUENTRY  = "Image";
 
Index: control-image.c
===================================================================
--- control-image.c	(Revision 22)
+++ control-image.c	(Arbeitskopie)
@@ -59,7 +59,7 @@ 
  , m_pDisplayReplay(NULL)
 {
   // Notity all cStatusMonitor
-  cStatus::MsgReplaying(this, "[image]");
+  cStatus::MsgReplaying(this, "image", NULL, true );
   
   m_tStarted = time(NULL);
   
@@ -87,7 +87,7 @@ 
     delete m_pImageMenu;
   m_pImageMenu = NULL;
   // Notity cleanup all cStatusMonitor
-  cStatus::MsgReplaying(this, NULL);
+  cStatus::MsgReplaying(this, "image", NULL, false);
   // Hide OSD
   HideOSD();
   if(m_pDisplayReplay) {
@@ -152,15 +152,15 @@ 
   char* sz = 0;
   if(IsConvertRunning())  // Display that convert is running
   {
-    asprintf(&sz,"[image] %s",tr("Convert..."));
+    asprintf(&sz,"%s",tr("Convert..."));
   }
   else 
   {
     switch(m_ePlayMode)
     {
-      case ePlayModeNormal: asprintf(&sz,"[image] %s",FileName());break;
-      case ePlayModeJump:   asprintf(&sz,"[image] %s",tr("Select picture via key 1..9!"));break;
-      case ePlayModeZoom:   asprintf(&sz,"[image] %s %dx",tr("Zoom"),m_nZoomFactor);break;
+      case ePlayModeNormal: asprintf(&sz,"%s",FileName());break;
+      case ePlayModeJump:   asprintf(&sz,"%s",tr("Select picture via key 1..9!"));break;
+      case ePlayModeZoom:   asprintf(&sz,"%s %dx",tr("Zoom"),m_nZoomFactor);break;
     }
   }
   if(sz)
@@ -171,7 +171,7 @@ 
       if(m_szLastShowStatusMsg)
         free(m_szLastShowStatusMsg);
       m_szLastShowStatusMsg = sz;
-      cStatus::MsgReplaying(this, m_szLastShowStatusMsg);
+      cStatus::MsgReplaying(this, "image" , m_szLastShowStatusMsg, true );
     }
     else 
       free(sz);
Index: README.DE
===================================================================
--- README.DE	(Revision 22)
+++ README.DE	(Arbeitskopie)
@@ -18,7 +18,7 @@ 
 Benötigt:
 -----------
 - Full-Featured DVB Karte 
-- vdr 1.3.29+ 
+- vdr 1.3.38+ 
 - das Plugin ist abhängig vom Paket libavcodec1-dev zu übersetzen, (getestet mit ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs)
 - und Paket netpbm sowie libavcodec1 zur Ausführung 
 - netpbm 10.0+ (prüfe ob das Tool "anytopnm" existiert)
Index: README
===================================================================
--- README	(Revision 22)
+++ README	(Arbeitskopie)
@@ -18,7 +18,7 @@ 
 Required:
 -----------
 - fullfeatured dvb card
-- vdr 1.3.29+
+- vdr 1.3.38+
 - to compile plugin depends package libavcodec1-dev (tested with ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs)
 - to run your will need package netpbm and libavcodec1
 - netpbm 10.0+ (check for "anytopnm", if  it does not exist upgrade/install netpbm)