Mailing List archive

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

[linux-dvb] Re: Are frontend events queued?



Wolfgang Fritz wrote:
Hello,

I'm trying to get some facts about the infamous "video data stream
broken" error in VDR.

The following modified code from VDR-1.3.10/dvbdevice.c cDvbTuner::Action

  active = true;
  while (active) {
        ....
        if (tunerStatus == tsTuned) {
           fe_status_t status = fe_status_t(0);
           CHECK(ioctl(fd_frontend, FE_READ_STATUS, &status));
           if (status & FE_HAS_LOCK) {
              tunerStatus = tsLocked;
	      dsyslog ("Frontend %d locked", cardIndex);
	      }
           }
        if (tunerStatus != tsIdle) {
           dvb_frontend_event event;
           if (ioctl(fd_frontend, FE_GET_EVENT, &event) == 0) {
	      dsyslog ("Event on frontend %d: %02x", cardIndex, event.status);
              if (event.status & FE_REINIT) {
                 tunerStatus = tsSet;
                 esyslog("ERROR: frontend %d was reinitialized -
re-tuning", cardIndex);
                 continue;
                 }
              }
           }
     ....
        bool fast = (tunerStatus == tsTuned) || (ciHandler &&
(time(NULL) - startTime < 20));
        newSet.TimedWait(mutex, fast ? 100 : 1000);
        }

sometimes gives the following output:

Jul 21 19:06:21 vdr vdr[1697]: Event on frontend 1: 00
Jul 21 19:06:21 vdr vdr[1697]: Frontend 1 locked
Jul 21 19:06:21 vdr vdr[1697]: Event on frontend 1: 03
Jul 21 19:06:22 vdr vdr[1697]: Event on frontend 1: 1f

What does this mean?

- Did the frontend really lose lock for a short time?
yes.

Frontend events are queued but a while ago there were a discussion (I believe on this list but I'm not perfectly sure... maybe it was in the #dbox2 irc - ) where we ended in consens that it does not really makes sense from a userspace point of view to queue the events and the event ringbuffer code might basically vanish.

Also the frontend thread handling might get simpler in this case.

Holger




Home | Main Index | Thread Index