2010/1/4 Klaus Schmidinger <Klaus.Schmidinger@xxxxxxx>: > On 04.01.2010 16:09, Theunis Potgieter wrote: >> 2010/1/4 Klaus Schmidinger <Klaus.Schmidinger@xxxxxxx>: >>> On 04.01.2010 14:37, Theunis Potgieter wrote: >>>> I was in search for a plug-in that could map alternative long names to >>>> the supposedly current long name of a channel. I guess I didn't search >>>> hard and long enough, but could not find one that would implement this >>>> behaviour. The idea is, that when ever a channel list is called, it >>>> will provide the alternative long name, but saves the original long >>>> name in channels.conf. >>>> >>>> So I thought of implementing one my self. After reading the >>>> PLUGINS.html from VDR-1.7.10, I thought it would be possible. I didn't >>>> see any spoon feeding when it came to channels in the documentation, >>>> so I thought I will have a look at channels.h and there seems to be a >>>> member function called Name() in the tChannelID class. Would it be >>>> wise then to copy the tChannelID class and replace the member function >>>> Name()? >>> tChannelID has no member function named Name(). >>> Maybe you mean the cChannel class? >>> I guess if you change the implementation of cChannel::Name(), then you >>> could do what you want. >> >> Thanks for that. I must have scrolled back up and saw the wrong class, >> I meant cChannel:Name(). >> >>>> Which global pointer will I have to deleted and assign to the new object? >>> I don't understand this question. >>> There is no "new object". >>> You will have to patch the VDR source to implement this. >> >> The idea is that the plug-in would delete the current instance of >> cChannel and instantiate a new cChannel instance in the place there >> of. This without having to patch vdr to implement this feature. There >> for the question about the (e.g. global) pointer that is pointing to >> the original instance of cChannel. Is there a member function in the >> plug-in class that can be called from VDR's main and hand over such a >> pointer? > > There is an object of cChannel for each channel, and they are stored in > a list. You can either patch VDR to modify cChannel::Name() so that it > takes the original name as an index into some database of yours, or > modify the names in your channels.conf and set "Setup/DVB/Update channels" > to "PIDs only". The reason for not wanting to create a patch against the main vdr core was related to this old article: http://www.linuxjournal.com/article/3687 Would you rather prefer a patch with a menu option where you can choose the plug-in that will handle the external mappings of channel names? > > Just curious: what's wrong with the original names? > > Klaus > > _______________________________________________ > vdr mailing list > vdr@xxxxxxxxxxx > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr > _______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr