vdr shutdown handling / streamdev plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



J?rg Wendel wrote:
>> For plugin developers, I suggest to keep it simple in there. Its
>> probably a good idea to tr() the string just once and cache it afterwards.
> 
> this would be a nice change in the streamdev plugin.

The attached patch does it.
This patch has one side effect: The message wont be re-translated if the 
selected VDR OSD language is changed, you have to restart to see 
language changes.

Cheers,

Udo
-------------- next part --------------
--- streamdev-server.c.bak	2006-11-15 14:29:20.000000000 +0100
+++ streamdev-server.c	2006-11-15 14:30:51.000000000 +0100
@@ -59,7 +59,9 @@
 {
 	if (cStreamdevServer::Active())
 	{
-		return tr("Streaming active");
+		static const char *Message = NULL;
+		if (!Message) Message = tr("Streaming active");
+		return Message;
 	}
 	return NULL;
 }

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux