after hours of testing, I don't understand the methods of the receiver.
Maybe I'm totally wrong.
I need: -a method to receive the PES of a given VPID of a Channel -the method should be closed if the VPID of the Channel can't be reached any more
In my opinion this is a receiver! But this receiver will NEVER be detached unless vdr will shutdown. Independent from the Prio. I have tried -10 .... 90 unfortunately it will receive data is an other channel has the same VPID
I have written a simple receiver:
class cPTSReceiver : public cReceiver, cThread { protected: virtual void Activate(bool On); virtual void Receive(uchar *Data, int Length); virtual void Action(void); public: cPTSReceiver(cChannel* channel); bool isAttached(); private: char channelname[30]; bool isrunning; };
//---------cPTSReceiver-----------// cPTSReceiver::cPTSReceiver(cChannel* channel):cReceiver(0,PRIORECEIVER, channel->Vpid()) { dsyslog("created a new receiver for %s with prio %d",channel->Name(),PRIORECEIVER); strcpy(channelname,channel->Name()); channelAttachedTo = channel; }
void cPTSReceiver::Activate(bool On) { // start your own thread for processing the received data isrunning = On; if (isrunning){ dsyslog("attach receiver to %s",channelname); } else dsyslog("detach receiver from %s!",channelname);//will never reached }
bool cPTSReceiver::isAttached(){ return isrunning; }
void cPTSReceiver::Receive(uchar *Data, int Length) {...do something...}
At the moment I use a total crazy way. I give the receiver the device and the channel. Each time the receiver will Receive()data, I test if the Channel of my receiver and the channel of the device are on the same TSID and NID. If not, the user has changed the channel. But this way is very ugly. Klaus sad that the vdr will detach the receiver if the Prio is lower the -1. My Receiver didn't detach at anytime! Please help me 8-)
Patrick
I'm proud to announce version 0.5 of Nordlicht's EPG-Plugin.
What is it? This plugin provides an EPG (Electronic Program Guide) similar to VDR's "What's on now?-menu. Unlike this it also shows channels without epg-infos. You can browse the epg with an adjustable step width. It is also possible to set a time at the setup to which you can jump by keypress, with the keys 1-7 you can jump 1-7 days forward. A bargraph at the "What's on now?"-view shows the progress of the running program. Timers are marked with a clock-icon, recording timers with a 'REC'-icon. It is possible, also for channels without epg-infos, to set timers. At the setup you can select if channelgroupnames and/or channelnumbers should be shown and if encrypted channels should be hidden
Why this name? Nordlicht (german for northern light) is my nickname at vdr-portal.de. Because i had no idea for a proper name i called it like this.
Homepage and Download: http://martins-kabuff.de/nordlichtsepg.en.html (english) http://martins-kabuff.de/nordlichtsepg.html (german)
Greets, Martin Prochnow
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
On Thu, Nov 24, 2005 at 07:27:40PM +0100, Patrick Fischer wrote:
after hours of testing, I don't understand the methods of the receiver.
Maybe I'm totally wrong.
I need: -a method to receive the PES of a given VPID of a Channel -the method should be closed if the VPID of the Channel can't be reached any more
In my opinion this is a receiver! But this receiver will NEVER be detached unless vdr will shutdown.
A perhaps related thing: When developing the vdr-suspend patch http://www.iki.fi/~msmakela/software/vdr/#suspend, I noticed that the loop in cDevice::Action() never releases the tuner, even if no receiver is attached (e.g., when playing a recording while no timer is active, or on a multi-card system when recording from only one transponder). I haven't measured, but I believe that keeping all cards tuned to a transponder may waste several watts. Of course, you may argue that it is negligible compared to the total power consumption (about 57 watts on my box with the hard disk spinning and softdevice suspended and about 68 watts with softdevice running, not counting the monitor and speakers).
Marko