Re: [vdr] [PATCH] MaxThemeName and MaxSkinName limit

2013-03-24 Thread Klaus Schmidinger

On 24.03.2013 10:49, Lucian Muresan wrote:

On 23.03.2013 22:50, Klaus Schmidinger wrote:

On 23.03.2013 17:14, Lucian Muresan wrote:

Hi,

thank you Klaus for holding up your release plan for 2.0!
However, I hope this minor patch won't be too much trouble for you, as
it only increases the limit of 16 to theme and skin names, letting them
be NAME_MAX as almost any files, since these names can also be involved
in file names.
Was there a good reason to limit them at 16 only, perhaps the fear that
the name won't fit on the OSD? I don't really think someone would really
make use of as many as 255 characters for this. On the other hand, users
just encountered crashes with plugins which (unfortunately, yet) have
themes of their own, when just adding a new theme with a name longer
than 16 and at the same time the original plugin author relied on
MaxThemeName when allocating the string length.


Those are bugs in the plugins and should be fixed there.
Or is this something that can also happen in the core VDR?


So be it, it's quite easy for plugins to ignore MaxThemeName or allocate
such a string length, say 4*MaxThemeName as long as they mange their own
themes...
I did not test how VDR reacts when it is fed with a theme or a skin with
a name longer than 16 (seems those are the only 2 places in VDR where
you use those, on statically allocating the strings holding the theme
and the skin, which you store to and load from setup...


So, what do you think, easy to adopt?


Well, for one, now is definitely not the right time for a change like this!
And furthermore, skin and theme names should be short. What sense does it
make to call a theme something like This is the theme that implements a
range
of colors from 400 nanometers to 700 nanometers, when you could just plain
simple call it rainbow? ;-)


Not necessary to exaggerate with such an hilarious example, you're
getting near to sarcastic and missing the point, let's just take your
short example in a more realistic scenario:

rainbow_1920x1080.theme
rainbow_1280x768.theme


Themes are all about colors - why do they even need to mention resolutions?

Besides, skins should react dynamically on the current OSD size.


just because there still are plugins having to use skins which are
resolution-dependent, so those names aren't at all that uncommonly long
like your example, yet they try to carry some little useful information.
And still, one of them is already violating the limit (if we do not
consider the file extension). Of course, you might say, take out the
'_', or the 'x', I could answer I'd rather take out some letter out of
rainbow, and so on, you see what I'm trying to point out, it's hitting
a limit difficult to argue...


So I'd say the limit is there for a reason, and should stay there.


Could you at least please, name it?


Keeping the names *short* ;-)

This limit has been in there for almost ten years and has apparently
never been a problem (at least not to my knowledge). I can't change that
so close before the release of a major new version - even if it might
look like it won't break anything. You can get back to me with this after
version 2.0.0 is out. Version 2.1.x can pick up such changes again...

Klaus


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] MaxThemeName and MaxSkinName limit

2013-03-24 Thread Helmut Auer

Am 24.03.2013 11:00, schrieb Klaus Schmidinger:


This limit has been in there for almost ten years and has apparently
never been a problem (at least not to my knowledge).


Sorry to hack this thread , but my wound is still wide open :(
There also was a makefile concept for ten years and apparently no one has a problem with it, but 
it was changed and that that has cost me many many hours and days and all the fun I had with VDR 
before ...



--
Helmut Auer, hel...@helmutauer.de

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] MaxThemeName and MaxSkinName limit

2013-03-24 Thread Lucian Muresan
Hi,

On 24.03.2013 11:00, Klaus Schmidinger wrote:
[...]
 rainbow_1920x1080.theme
 rainbow_1280x768.theme
 
 Themes are all about colors - why do they even need to mention resolutions?
 
 Besides, skins should react dynamically on the current OSD size.

as mentioned right after giving the example, that's the way some of the
themes unfortunately work, but that's due to the technology they use
(they are displaying background images and the like, which are
pre-generated for that exact resolution, possibly a dynamic scaling
won't look right in those cases). On the other hand, I'm completely with
you, they should behave better, but they are not my skins, nor do I
particularly use them, I was only trying to help the users a bit, which
add such skins without touching any code...

 just because there still are plugins having to use skins which are
 resolution-dependent, so those names aren't at all that uncommonly long
 like your example, yet they try to carry some little useful information.
 And still, one of them is already violating the limit (if we do not
 consider the file extension). Of course, you might say, take out the
 '_', or the 'x', I could answer I'd rather take out some letter out of
 rainbow, and so on, you see what I'm trying to point out, it's hitting
 a limit difficult to argue...

 So I'd say the limit is there for a reason, and should stay there.

 Could you at least please, name it?
 
 Keeping the names *short* ;-)

Seriously ;) ?

 This limit has been in there for almost ten years and has apparently
 never been a problem (at least not to my knowledge). I can't change that
 so close before the release of a major new version - even if it might
 look like it won't break anything. You can get back to me with this after
 version 2.0.0 is out. Version 2.1.x can pick up such changes again...

That's fair enough and also ok with me, thanks.

Regards,
Lucian


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [PATCH] MaxThemeName and MaxSkinName limit

2013-03-23 Thread Lucian Muresan
Hi,

thank you Klaus for holding up your release plan for 2.0!
However, I hope this minor patch won't be too much trouble for you, as
it only increases the limit of 16 to theme and skin names, letting them
be NAME_MAX as almost any files, since these names can also be involved
in file names.
Was there a good reason to limit them at 16 only, perhaps the fear that
the name won't fit on the OSD? I don't really think someone would really
make use of as many as 255 characters for this. On the other hand, users
just encountered crashes with plugins which (unfortunately, yet) have
themes of their own, when just adding a new theme with a name longer
than 16 and at the same time the original plugin author relied on
MaxThemeName when allocating the string length.
So, what do you think, easy to adopt?

Regards,
Lucian
diff -Naur vdr-1.7.42_orig/config.h vdr-1.7.42/config.h
--- vdr-1.7.42_orig/config.h2013-03-16 16:12:14.0 +0100
+++ vdr-1.7.42/config.h 2013-03-23 16:57:48.378701000 +0100
@@ -53,8 +53,8 @@
 #define MAXOSDHEIGHT 1200
 
 #define MaxFileName NAME_MAX // obsolete - use NAME_MAX directly instead!
-#define MaxSkinName 16
-#define MaxThemeName 16
+#define MaxSkinName NAME_MAX // obsolete - use NAME_MAX directly instead!
+#define MaxThemeName NAME_MAX // obsolete - use NAME_MAX directly instead!
 
 // Basically VDR works according to the DVB standard, but there are 
countries/providers
 // that use other standards, which in some details deviate from the DVB 
standard.
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] MaxThemeName and MaxSkinName limit

2013-03-23 Thread Klaus Schmidinger

On 23.03.2013 17:14, Lucian Muresan wrote:

Hi,

thank you Klaus for holding up your release plan for 2.0!
However, I hope this minor patch won't be too much trouble for you, as
it only increases the limit of 16 to theme and skin names, letting them
be NAME_MAX as almost any files, since these names can also be involved
in file names.
Was there a good reason to limit them at 16 only, perhaps the fear that
the name won't fit on the OSD? I don't really think someone would really
make use of as many as 255 characters for this. On the other hand, users
just encountered crashes with plugins which (unfortunately, yet) have
themes of their own, when just adding a new theme with a name longer
than 16 and at the same time the original plugin author relied on
MaxThemeName when allocating the string length.


Those are bugs in the plugins and should be fixed there.
Or is this something that can also happen in the core VDR?


So, what do you think, easy to adopt?


Well, for one, now is definitely not the right time for a change like this!
And furthermore, skin and theme names should be short. What sense does it
make to call a theme something like This is the theme that implements a range
of colors from 400 nanometers to 700 nanometers, when you could just plain
simple call it rainbow? ;-)

So I'd say the limit is there for a reason, and should stay there.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr