More debug cosmetics
authorMirakels <mirakels@openpli.org>
Thu, 2 Apr 2015 07:17:05 +0000 (09:17 +0200)
committerMirakels <mirakels@openpli.org>
Thu, 30 Apr 2015 07:43:58 +0000 (09:43 +0200)
102 files changed:
lib/actions/action.cpp
lib/base/buffer.cpp
lib/base/console.cpp
lib/base/ebase.cpp
lib/base/eenv.cpp.in
lib/base/encoding.cpp
lib/base/estring.cpp
lib/base/etpm.cpp
lib/base/filepush.cpp
lib/base/httpstream.cpp
lib/base/init.cpp
lib/base/ioprio.cpp
lib/base/rawfile.cpp
lib/base/ringbuffer.h
lib/base/thread.cpp
lib/base/wrappers.cpp
lib/components/file_eraser.cpp
lib/components/scan.cpp
lib/components/tuxtxtapp.cpp
lib/driver/avswitch.cpp
lib/driver/hdmi_cec.cpp
lib/driver/misc_options.cpp
lib/driver/rc.cpp
lib/driver/rcconsole.cpp
lib/driver/rcinput.cpp
lib/driver/rcsdl.cpp
lib/driver/rfmod.cpp
lib/dvb/cablescan.cpp
lib/dvb/cahandler.cpp
lib/dvb/decoder.cpp
lib/dvb/demux.cpp
lib/dvb/dvb.cpp
lib/dvb/dvbtime.cpp
lib/dvb/epgcache.cpp
lib/dvb/esection.cpp
lib/dvb/esection.h
lib/dvb/fastscan.cpp
lib/dvb/frontend.cpp
lib/dvb/frontendparms.cpp
lib/dvb/metaparser.cpp
lib/dvb/pesparse.cpp
lib/dvb/pmt.cpp
lib/dvb/pmtparse.cpp
lib/dvb/pvrparse.cpp
lib/dvb/scan.cpp
lib/dvb/sec.cpp
lib/dvb/subtitle.cpp
lib/dvb/teletext.cpp
lib/dvb/tstools.cpp
lib/dvb/volume.cpp
lib/dvb_ci/dvbci_resmgr.cpp
lib/gdi/accel.cpp
lib/gdi/epng.cpp
lib/gdi/fb.cpp
lib/gdi/fblcd.cpp
lib/gdi/font.cpp
lib/gdi/gfbdc.cpp
lib/gdi/glcddc.cpp
lib/gdi/gpixmap.cpp
lib/gdi/grc.cpp
lib/gdi/lcd.cpp
lib/gdi/picexif.cpp
lib/gdi/picload.cpp
lib/gdi/sdl.cpp
lib/gui/einput.cpp
lib/gui/einputnumber.cpp
lib/gui/elabel.cpp
lib/gui/elistboxcontent.cpp
lib/gui/epixmap.cpp
lib/gui/esubtitle.cpp
lib/gui/ewidget.cpp
lib/gui/ewidgetdesktop.cpp
lib/gui/ewindow.cpp
lib/gui/ewindowstyle.cpp
lib/gui/ewindowstyleskinned.cpp
lib/mmi/mmi_ui.cpp
lib/nav/core.cpp
lib/network/serversocket.cpp
lib/network/socket.cpp
lib/network/xmlrpc.cpp
lib/python/Plugins/Extensions/SocketMMI/src/socket_mmi.cpp
lib/python/python.cpp
lib/python/python_console.i
lib/python/python_helpers.cpp
lib/service/listboxservice.cpp
lib/service/service.cpp
lib/service/servicedvb.cpp
lib/service/servicedvbrecord.cpp
lib/service/servicedvbstream.cpp
lib/service/servicedvd.cpp
lib/service/servicefs.cpp
lib/service/servicehdmi.cpp
lib/service/servicem2ts.cpp
lib/service/servicemp3.cpp
lib/service/servicexine.cpp
main/bsod.cpp
main/enigma-dvbtest.cpp
main/enigma-gdi.cpp
main/enigma-gui.cpp
main/enigma-playlist.cpp
main/enigma-scan.cpp
main/enigma.cpp

index a07271c..85dcfdb 100644 (file)
@@ -84,7 +84,7 @@ void eActionMap::unbindAction(const std::string &context, ePyObject function)
                        return;
                }
        }
-       eFatal("unbindAction with illegal python reference");
+       eFatal("[eActionMap] unbindAction with illegal python reference");
 }
 
 
@@ -208,7 +208,7 @@ void eActionMap::keyPressed(const std::string &device, int key, int flags)
                                }
                        } else
                        {
-//                             eDebug("wildcard.");
+//                             eDebug("[eActionMap] wildcard.");
                                ePyObject pArgs = PyTuple_New(2);
                                PyTuple_SET_ITEM(pArgs, 0, PyInt_FromLong(key));
                                PyTuple_SET_ITEM(pArgs, 1, PyInt_FromLong(flags));
index ba37b59..329c40a 100644 (file)
@@ -131,7 +131,7 @@ int eIOBuffer::fromfile(int fd, int len)
                if (r < 0)
                {
                        if (errno != EWOULDBLOCK && errno != EBUSY && errno != EINTR)
-                               eDebug("couldn't read: %m");
+                               eDebug("[eIOBuffer] read fd=%d: %m", fd);
                }
                else
                {
@@ -159,7 +159,7 @@ int eIOBuffer::tofile(int fd, int len)
                if (w < 0)
                {
                        if (errno != EWOULDBLOCK && errno != EBUSY && errno != EINTR)
-                               eDebug("write: %m");
+                               eDebug("[eIOBuffer] write fd=%d: %m", fd);
                        w=0;
                }
                ptr+=w;
index 699c154..c470cb2 100644 (file)
@@ -43,6 +43,7 @@ int bidirpipe(int pfd[], const char *cmd , const char * const argv[], const char
 
                execvp(cmd, (char * const *)argv);
                                /* the vfork will actually suspend the parent thread until execvp is called. thus it's ok to use the shared arg/cmdline pointers here. */
+               eDebug("[eConsoleAppContainer] Finished %s", cmd);
                _exit(0);
        }
        if (close(pfdout[0]) == -1 || close(pfdin[1]) == -1 || close(pfderr[1]) == -1)
@@ -100,16 +101,19 @@ int eConsoleAppContainer::execute(const char *cmdline, const char * const argv[]
        if (running())
                return -1;
 
+       eDebug("[eConsoleAppContainer] Starting %s", cmdline);
        pid=-1;
        killstate=0;
 
-       // get one read ,one write and the err pipe to the prog..
+       // get one read, one write and the err pipe to the prog..
        pid = bidirpipe(fd, cmdline, argv, m_cwd.empty() ? 0 : m_cwd.c_str());
 
-       if ( pid == -1 )
+       if ( pid == -1 ) {
+               eDebug("[eConsoleAppContainer] failed to start %s", cmdline);
                return -3;
+       }
 
-//     eDebug("pipe in = %d, out = %d, err = %d", fd[0], fd[1], fd[2]);
+//     eDebug("[eConsoleAppContainer] pipe in = %d, out = %d, err = %d", fd[0], fd[1], fd[2]);
 
        ::fcntl(fd[0], F_SETFL, O_NONBLOCK);
        ::fcntl(fd[1], F_SETFL, O_NONBLOCK);
@@ -136,7 +140,7 @@ void eConsoleAppContainer::kill()
 {
        if ( killstate != -1 && pid != -1 )
        {
-               eDebug("user kill(SIGKILL) console App");
+               eDebug("[eConsoleAppContainer] user kill(SIGKILL)");
                killstate=-1;
                /*
                 * Use a negative pid value, to signal the whole process group
@@ -166,7 +170,7 @@ void eConsoleAppContainer::sendCtrlC()
 {
        if ( killstate != -1 && pid != -1 )
        {
-               eDebug("user send SIGINT(Ctrl-C) to console App");
+               eDebug("[eConsoleAppContainer] user send SIGINT(Ctrl-C)");
                /*
                 * Use a negative pid value, to signal the whole process group
                 * ('pid' might not even be running anymore at this point)
@@ -224,7 +228,7 @@ void eConsoleAppContainer::readyRead(int what)
        bool hungup = what & eSocketNotifier::Hungup;
        if (what & (eSocketNotifier::Priority|eSocketNotifier::Read))
        {
-//             eDebug("what = %d");
+//             eDebug("[eConsoleAppContainer] readyRead what = %d", what);
                char* buf = &buffer[0];
                int rd;
                while((rd = read(fd[0], buf, 2048)) > 0)
@@ -263,13 +267,13 @@ void eConsoleAppContainer::readyErrRead(int what)
 {
        if (what & (eSocketNotifier::Priority|eSocketNotifier::Read))
        {
-//             eDebug("what = %d");
+//             eDebug("[eConsoleAppContainer] readyErrRead what = %d", what);
                char* buf = &buffer[0];
                int rd;
                while((rd = read(fd[2], buf, 2048)) > 0)
                {
 /*                     for ( int i = 0; i < rd; i++ )
-                               eDebug("%d = %c (%02x)", i, buf[i], buf[i] );*/
+                               eDebug("[eConsoleAppContainer] %d = %c (%02x)", i, buf[i], buf[i] );*/
                        buf[rd]=0;
                        /*emit*/ dataAvail(buf);
                        stderrAvail(buf);
@@ -293,7 +297,7 @@ void eConsoleAppContainer::readyWrite(int what)
                queue_data &d = outbuf.front();
                int wr = ::write( fd[1], d.data+d.dataSent, d.len-d.dataSent );
                if (wr < 0)
-                       eDebug("eConsoleAppContainer write failed (%m)");
+                       eDebug("[eConsoleAppContainer] write on fd=%d failed: %m", fd[1]);
                else
                        d.dataSent += wr;
                if (d.dataSent == d.len)
@@ -317,7 +321,7 @@ void eConsoleAppContainer::readyWrite(int what)
                                close(filefd[0]);
                                filefd[0] = -1;
                                ::close(fd[1]);
-                               eDebug("readFromFile done - closing eConsoleAppContainer stdin pipe");
+                               eDebug("[eConsoleAppContainer] readFromFile done - closing stdin pipe");
                                fd[1]=-1;
                                dataSent(0);
                                out->stop();
index 0377d43..8554a79 100644 (file)
@@ -56,9 +56,9 @@ void eTimer::start(long msek, bool singleShot)
                bSingleShot = singleShot;
                interval = msek;
                clock_gettime(CLOCK_MONOTONIC, &nextActivation);
-//             eDebug("this = %p\nnow sec = %d, nsec = %d\nadd %d msec", this, nextActivation.tv_sec, nextActivation.tv_nsec, msek);
+//             eDebug("[eTimer] this = %p\nnow sec = %d, nsec = %d\nadd %d msec", this, nextActivation.tv_sec, nextActivation.tv_nsec, msek);
                nextActivation += (msek<0 ? 0 : msek);
-//             eDebug("next Activation sec = %d, nsec = %d", nextActivation.tv_sec, nextActivation.tv_nsec );
+//             eDebug("[eTimer] next Activation sec = %d, nsec = %d", nextActivation.tv_sec, nextActivation.tv_nsec );
                context.addTimer(this);
        }
 }
@@ -73,10 +73,10 @@ void eTimer::startLongTimer(int seconds)
                bActive = bSingleShot = true;
                interval = 0;
                clock_gettime(CLOCK_MONOTONIC, &nextActivation);
-//             eDebug("this = %p\nnow sec = %d, nsec = %d\nadd %d sec", this, nextActivation.tv_sec, nextActivation.tv_nsec, seconds);
+//             eDebug("[eTimer] this = %p\nnow sec = %d, nsec = %d\nadd %d sec", this, nextActivation.tv_sec, nextActivation.tv_nsec, seconds);
                if ( seconds > 0 )
                        nextActivation.tv_sec += seconds;
-//             eDebug("next Activation sec = %d, nsec = %d", nextActivation.tv_sec, nextActivation.tv_nsec );
+//             eDebug("[eTimer] next Activation sec = %d, nsec = %d", nextActivation.tv_sec, nextActivation.tv_nsec );
                context.addTimer(this);
        }
 }
@@ -166,8 +166,8 @@ void eMainloop::removeSocketNotifier(eSocketNotifier *sn)
                return;
        }
        for (i = notifiers.begin(); i != notifiers.end(); ++i)
-               eDebug("fd=%d, sn=%p", i->second->getFD(), (void*)i->second);
-       eFatal("removed socket notifier which is not present, fd=%d", fd);
+               eDebug("[eMainloop::removeSocketNotifier] fd=%d, sn=%p", i->second->getFD(), (void*)i->second);
+       eFatal("[eMainloop::removeSocketNotifier] removed socket notifier which is not present, fd=%d", fd);
 }
 
 int eMainloop::processOneEvent(unsigned int twisted_timeout, PyObject **res, ePyObject additional)
@@ -176,10 +176,10 @@ int eMainloop::processOneEvent(unsigned int twisted_timeout, PyObject **res, ePy
                /* get current time */
 
        if (additional && !PyDict_Check(additional))
-               eFatal("additional, but it's not dict");
+               eFatal("[eMainloop::processOneEvent] additional, but it's not dict");
 
        if (additional && !res)
-               eFatal("additional, but no res");
+               eFatal("[eMainloop::processOneEvent] additional, but no res");
 
        long poll_timeout = -1; /* infinite in case of empty timer list */
 
@@ -287,7 +287,7 @@ int eMainloop::processOneEvent(unsigned int twisted_timeout, PyObject **res, ePy
                                        m_inActivate = 0;
                                }
                                if (pfd[i].revents & (POLLERR|POLLHUP|POLLNVAL))
-                                       eDebug("poll: unhandled POLLERR/HUP/NVAL for fd %d(%d)", pfd[i].fd, pfd[i].revents);
+                                       eDebug("[eMainloop::processOneEvent] unhandled POLLERR/HUP/NVAL for fd %d(%d)", pfd[i].fd, pfd[i].revents);
                        }
                }
                for (; i < fdcount; ++i)
@@ -308,7 +308,7 @@ int eMainloop::processOneEvent(unsigned int twisted_timeout, PyObject **res, ePy
        {
                        /* when we got a signal, we get EINTR. */
                if (errno != EINTR)
-                       eDebug("poll made error (%m)");
+                       eDebug("[eMainloop::processOneEvent] poll made error: %m");
                else
                        return_reason = 2; /* don't assume the timeout has passed when we got a signal */
        }
index 1c2a437..e2c4f4c 100644 (file)
@@ -52,22 +52,22 @@ int eEnv::resolveVar(std::string &dest, const char *src)
        if (ret != 0) {
                switch (ret) {
                case WRDE_BADCHAR:
-                       eDebug("%s: bad character", __func__);
+                       eDebug("[eEnv] %s: bad character", __func__);
                        break;
                case WRDE_BADVAL:
-                       eDebug("%s: bad value", __func__);
+                       eDebug("[eEnv] %s: bad value", __func__);
                        break;
                case WRDE_CMDSUB:
-                       eDebug("%s: invalid command substitution", __func__);
+                       eDebug("[eEnv] %s: invalid command substitution", __func__);
                        break;
                case WRDE_NOSPACE:
-                       eDebug("%s: out of memory", __func__);
+                       eDebug("[eEnv] %s: out of memory", __func__);
                        break;
                case WRDE_SYNTAX:
-                       eDebug("%s: syntax error", __func__);
+                       eDebug("[eEnv] %s: syntax error", __func__);
                        break;
                default:
-                       eDebug("%s: unknown error", __func__);
+                       eDebug("[eEnv] %s: unknown error", __func__);
                        break;
                }
 
index 1171a1b..b49c5c6 100644 (file)
@@ -62,12 +62,12 @@ eDVBTextEncodingHandler::eDVBTextEncodingHandler()
                                        ||(sscanf( line, "%d %d", &tsid, &onid ) == 2 ) )
                                m_TransponderUseTwoCharMapping.insert((tsid<<16)|onid);
                        else
-                               eDebug("encoding.conf: couldn't parse %s", line);
+                               eDebug("[eDVBTextEncodingHandler] encoding.conf: couldn't parse %s", line);
                }
                free(line);
        }
        else
-               eDebug("[eDVBTextEncodingHandler] couldn't open %s !", file.c_str());
+               eDebug("[eDVBTextEncodingHandler] couldn't open %s: %m", file.c_str());
 }
 
 void eDVBTextEncodingHandler::getTransponderDefaultMapping(int tsidonid, int &table)
index a068118..6fd53fc 100644 (file)
@@ -384,18 +384,18 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                        if (table != 11)
                                table=data[i]+4;
                        ++i;
-//                     eDebug("(1..11)text encoded in ISO-8859-%d",table);
+//                     eDebug("[convertDVBUTF8] (1..11)text encoded in ISO-8859-%d",table);
                        break;
                case 0x10:
                {
                        int n=(data[++i]<<8);
                        n |= (data[++i]);
-//                     eDebug("(0x10)text encoded in ISO-8859-%d",n);
+//                     eDebug("[convertDVBUTF8] (0x10)text encoded in ISO-8859-%d",n);
                        ++i;
                        switch(n)
                        {
                                case 12:
-                                       eDebug("unsup. ISO8859-12 enc.");
+                                       eDebug("[convertDVBUTF8] unsup. ISO8859-12 enc.");
                                        break;
                                default:
                                        table=n;
@@ -410,15 +410,15 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                        break;
                case 0x12:
                        ++i;
-                       eDebug("unsup. KSC 5601 enc.");
+                       eDebug("[convertDVBUTF8] unsup. KSC 5601 enc.");
                        break;
                case 0x13:
                        ++i;
-                       eDebug("unsup. GB-2312-1980 enc.");
+                       eDebug("[convertDVBUTF8] unsup. GB-2312-1980 enc.");
                        break;
                case 0x14:
                        ++i;
-                       eDebug("unsup. Big5 subset of ISO/IEC 10646-1 enc.");
+                       eDebug("[convertDVBUTF8] unsup. Big5 subset of ISO/IEC 10646-1 enc.");
                        break;
                case 0x15: // UTF-8 encoding of ISO/IEC 10646-1
                        return std::string((char*)data+1, len-1);
@@ -429,12 +429,12 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                                if (!decoded_string.empty()) return decoded_string;
                        }
                        i++;
-                       eDebug("failed to decode bbc freesat huffman");
+                       eDebug("[convertDVBUTF8] failed to decode bbc freesat huffman");
                        break;
                case 0x0:
                case 0xC ... 0xF:
                case 0x16 ... 0x1E:
-                       eDebug("reserved %d", data[0]);
+                       eDebug("[convertDVBUTF8] reserved %d", data[0]);
                        ++i;
                        break;
        }
@@ -442,7 +442,7 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
        bool useTwoCharMapping = !table || (tsidonid && encodingHandler.getTransponderUseTwoCharMapping(tsidonid));
 
        if (useTwoCharMapping && table == 5) { // i hope this dont break other transponders which realy use ISO8859-5 and two char byte mapping...
-//             eDebug("Cyfra / Cyfrowy Polsat HACK... override given ISO8859-5 with ISO6937");
+//             eDebug("[convertDVBUTF8] Cyfra / Cyfrowy Polsat HACK... override given ISO8859-5 with ISO6937");
                table = 0;
        }
 
@@ -485,7 +485,7 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                }
                if (t+4 > 2047)
                {
-                       eDebug("convertDVBUTF8 buffer to small.. break now");
+                       eDebug("[convertDVBUTF8] buffer to small.. break now");
                        break;
                }
        }
@@ -565,7 +565,7 @@ std::string convertUTF8DVB(const std::string &string, int table)
                                                        coding_table = c885916;
                                                        break;
                                                default:
-                                                       eFatal("unknown coding table %d", table);
+                                                       eFatal("[convertUTF8DVB] unknown coding table %d", table);
                                                        break;
                                        }
                                }
@@ -614,7 +614,7 @@ std::string convertLatin1UTF8(const std::string &string)
                }
                if (t+4 > 2047)
                {
-                       eDebug("convertLatin1UTF8 buffer to small.. break now");
+                       eDebug("[convertLatin1UTF8] buffer to small.. break now");
                        break;
                }
        }
index 5799347..8a3626d 100644 (file)
@@ -28,13 +28,13 @@ eTPM::eTPM()
        fd = socket(PF_UNIX, SOCK_STREAM, 0);
        if (fd < 0)
        {
-               eDebug("[eTPM] socket error");
+               eDebug("[eTPM] socket error: %m");
                return;
        }
 
        if (connect(fd, (const struct sockaddr *)&addr, SUN_LEN(&addr)) < 0)
        {
-               eDebug("[eTPM] connect error");
+               eDebug("[eTPM] connect error %m");
                return;
        }
 
@@ -73,7 +73,7 @@ bool eTPM::send_cmd(enum tpmd_cmd cmd, const void *data, size_t len)
 
        if (write(fd, buf, sizeof(buf)) != (ssize_t)sizeof(buf))
        {
-               fprintf(stderr, "%s: incomplete write\n", __func__);
+               eDebug("[eTPM] %s: incomplete write: %m", __func__);
                return false;
        }
 
@@ -87,7 +87,7 @@ void* eTPM::recv_cmd(unsigned int *tag, size_t *len)
 
        if (read(fd, buf, 4) != 4)
        {
-               fprintf(stderr, "%s: incomplete read\n", __func__);
+               eDebug("[eTPM] %s: incomplete read: %m", __func__);
                return NULL;
        }
 
@@ -101,7 +101,7 @@ void* eTPM::recv_cmd(unsigned int *tag, size_t *len)
        ssize_t rd = read(fd, val, *len);
        if (rd < 0)
        {
-               perror("eTPM::recv_cmd read");
+               eDebug("[eTPM] %s: incomplete read2: %m", __func__);
                free(val);
                val = (void *)0;
        }
@@ -109,7 +109,7 @@ void* eTPM::recv_cmd(unsigned int *tag, size_t *len)
        {
                if ((size_t)rd != *len)
                {
-                       fprintf(stderr, "%s: incomplete read\n", __func__);
+                       eDebug("[eTPM] %s: incomplete read3: %m", __func__);
                        free(val);
                        val = (void *)0;
                }
index a5a7cb3..74708a3 100644 (file)
@@ -20,7 +20,7 @@ eFilePushThread::eFilePushThread(int io_prio_class, int io_prio_level, int block
         m_run_state(0)
 {
        if (m_buffer == NULL)
-               eFatal("Failed to allocate %d bytes", buffersize);
+               eFatal("[eFilePushThread] Failed to allocate %d bytes", buffersize);
        CONNECT(m_messagepump.recv_msg, eFilePushThread::recvEvent);
 }
 
@@ -48,7 +48,7 @@ void eFilePushThread::thread()
        ignore_but_report_signals();
        hasStarted(); /* "start()" blocks until we get here */
        setIoPrio(prio_class, prio);
-       eDebug("FILEPUSH THREAD START");
+       eDebug("[eFilePushThread] START thread");
 
        do
        {
@@ -105,10 +105,10 @@ void eFilePushThread::thread()
                                continue;
                        if (errno == EOVERFLOW)
                        {
-                               eWarning("OVERFLOW while playback?");
+                               eWarning("[eFilePushThread] OVERFLOW while playback?");
                                continue;
                        }
-                       eDebug("eFilePushThread *read error* (%m) - not yet handled");
+                       eDebug("[eFilePushThread] read error: %m");
                }
 
                        /* a read might be mis-aligned in case of a short read. */
@@ -127,13 +127,13 @@ void eFilePushThread::thread()
                                switch (poll(&pfd, 1, 250)) // wait for 250ms
                                {
                                        case 0:
-                                               eDebug("wait for driver eof timeout");
+                                               eDebug("[eFilePushThread] wait for driver eof timeout");
                                                continue;
                                        case 1:
-                                               eDebug("wait for driver eof ok");
+                                               eDebug("[eFilePushThread] wait for driver eof ok");
                                                break;
                                        default:
-                                               eDebug("wait for driver eof aborted by signal");
+                                               eDebug("[eFilePushThread] wait for driver eof aborted by signal");
                                                /* Check m_stop after interrupted syscall. */
                                                if (m_stop)
                                                        break;
@@ -152,13 +152,13 @@ void eFilePushThread::thread()
 
                        if (m_stream_mode)
                        {
-                               eDebug("reached EOF, but we are in stream mode. delaying 1 second.");
+                               eDebug("[eFilePushThread] reached EOF, but we are in stream mode. delaying 1 second.");
                                sleep(1);
                                continue;
                        }
                        else if (++eofcount < 10)
                        {
-                               eDebug("reached EOF, but the file may grow. delaying 1 second.");
+                               eDebug("[eFilePushThread] reached EOF, but the file may grow. delaying 1 second.");
                                sleep(1);
                                continue;
                        }
@@ -183,7 +183,7 @@ void eFilePushThread::thread()
                                        }
                                        if (w < 0 && (errno == EINTR || errno == EAGAIN || errno == EBUSY))
                                                continue;
-                                       eDebug("eFilePushThread WRITE ERROR");
+                                       eDebug("[eFilePushThread] write: %m");
                                        sendEvent(evtWriteError);
                                        break;
                                }
@@ -204,7 +204,7 @@ void eFilePushThread::thread()
                m_run_state = 0;
                m_run_cond.signal(); /* Tell them we're here */
                while (m_stop == 2) {
-                       eDebug("FILEPUSH THREAD PAUSED");
+                       eDebug("[eFilePushThread] PAUSED");
                        m_run_cond.wait(m_run_mutex);
                }
                if (m_stop == 0)
@@ -212,7 +212,7 @@ void eFilePushThread::thread()
        }
 
        } while (m_stop == 0);
-       eDebug("FILEPUSH THREAD STOP");
+       eDebug("[eFilePushThread] STOP");
 }
 
 void eFilePushThread::start(ePtr<iTsSource> &source, int fd_dest)
@@ -231,7 +231,7 @@ void eFilePushThread::stop()
        if (m_stop == 1)
                return;
        m_stop = 1;
-       eDebug("eFilePushThread stopping thread");
+       eDebug("[eFilePushThread] stopping thread");
        m_run_cond.signal(); /* Break out of pause if needed */
        sendSignal(SIGUSR1);
        kill(); /* Kill means join actually */
@@ -241,7 +241,7 @@ void eFilePushThread::pause()
 {
        if (m_stop == 1)
        {
-               eWarning("eFilePushThread::pause called while not running");
+               eWarning("[eFilePushThread] pause called while not running");
                return;
        }
        /* Set thread into a paused state by setting m_stop to 2 and wait
@@ -251,7 +251,7 @@ void eFilePushThread::pause()
        sendSignal(SIGUSR1);
        m_run_cond.signal(); /* Trigger if in weird state */
        while (m_run_state) {
-               eDebug("FILEPUSH waiting for pause");
+               eDebug("[eFilePushThread] waiting for pause");
                m_run_cond.wait(m_run_mutex);
        }
 }
@@ -260,7 +260,7 @@ void eFilePushThread::resume()
 {
        if (m_stop != 2)
        {
-               eWarning("eFilePushThread::resume called while not paused");
+               eWarning("[eFilePushThread] resume called while not paused");
                return;
        }
        /* Resume the paused thread by resetting the flag and
@@ -360,7 +360,7 @@ void eFilePushThreadRecorder::thread()
 #endif
                if (w < 0)
                {
-                       eDebug("[eFilePushThreadRecorder] WRITE ERROR, aborting thread");
+                       eDebug("[eFilePushThreadRecorder] WRITE ERROR, aborting thread: %m");
                        sendEvent(evtWriteError);
                        break;
                }
index 8b1512f..f638532 100644 (file)
@@ -118,7 +118,7 @@ int eHttpStream::openUrl(const std::string &url, std::string &newurl)
        result = sscanf(linebuf, "%99s %d %99s", proto, &statuscode, statusmsg);
        if (result != 3 || (statuscode != 200 && statuscode != 206 && statuscode != 302))
        {
-               eDebug("%s: wrong http response code: %d", __FUNCTION__, statuscode);
+               eDebug("[eHttpStream] %s: wrong http response code: %d", __func__, statuscode);
                goto error;
        }
 
@@ -145,14 +145,14 @@ int eHttpStream::openUrl(const std::string &url, std::string &newurl)
                if (playlist && !strncasecmp(linebuf, "http://", 7))
                {
                        newurl = linebuf;
-                       eDebug("%s: playlist entry: %s", __FUNCTION__, newurl.c_str());
+                       eDebug("[eHttpStream] %s: playlist entry: %s", __func__, newurl.c_str());
                        break;
                }
                if (((statuscode == 301) || (statuscode == 302) || (statuscode == 303) || (statuscode == 307) || (statuscode == 308)) &&
                                strncasecmp(linebuf, "location: ", 10) == 0)
                {
                        newurl = &linebuf[10];
-                       eDebug("%s: redirecting to: %s", __FUNCTION__, newurl.c_str());
+                       eDebug("[eHttpStream] %s: redirecting to: %s", __func__, newurl.c_str());
                        break;
                }
 
@@ -169,7 +169,7 @@ int eHttpStream::openUrl(const std::string &url, std::string &newurl)
        free(linebuf);
        return 0;
 error:
-       eDebug("%s failed", __FUNCTION__);
+       eDebug("[eHttpStream] %s failed", __func__);
        free(linebuf);
        close();
        return -1;
@@ -184,7 +184,7 @@ int eHttpStream::open(const char *url)
         * Spawn a new thread to establish the connection.
         */
        connectionStatus = BUSY;
-       eDebug("eHttpStream::Start thread");
+       eDebug("[eHttpStream] Start thread");
        run();
        return 0;
 }
@@ -199,14 +199,14 @@ void eHttpStream::thread()
                if (openUrl(currenturl, newurl) < 0)
                {
                        /* connection failed */
-                       eDebug("eHttpStream::Thread end NO connection");
+                       eDebug("[eHttpStream] Thread end NO connection");
                        connectionStatus = FAILED;
                        return;
                }
                if (newurl == "")
                {
                        /* we have a valid stream connection */
-                       eDebug("eHttpStream::Thread end connection");
+                       eDebug("[eHttpStream] Thread end connection");
                        connectionStatus = CONNECTED;
                        return;
                }
@@ -216,7 +216,7 @@ void eHttpStream::thread()
                newurl = "";
        }
        /* too many redirect / playlist levels */
-       eDebug("eHttpStream::Thread end NO connection");
+       eDebug("[eHttpStream] hread end NO connection");
        connectionStatus = FAILED;
        return;
 }
index 0243b92..d4612f1 100644 (file)
@@ -44,7 +44,7 @@ void eInit::setRunlevel(int nrl)
                {
                        if ((*i).first == rl)
                        {
-                               eDebug("+ (%d) %s", rl, (*i).second->getDescription());
+                               eDebug("[eInit] + (%d) %s", rl, (*i).second->getDescription());
                                (*i).second->initNow();
                        }
                }
@@ -55,12 +55,12 @@ void eInit::setRunlevel(int nrl)
                for (std::list<std::pair<int,eAutoInit*> >::iterator i(cl->begin()); i!=cl->end(); ++i)
                        if ((*i).first == rl)
                        {
-                               eDebug("- (%d) %s", rl, (*i).second->getDescription());
+                               eDebug("[eInit] - (%d) %s", rl, (*i).second->getDescription());
                                (*i).second->closeNow();
                        }
                rl--;
        }
-       eDebug("reached rl %d", rl);
+       eDebug("[eInit] reached rl %d", rl);
 }
 
 eAutoInit::~eAutoInit()
index 5c8622f..653fd4e 100644 (file)
@@ -66,31 +66,31 @@ void setIoPrio(int prio_class, int prio)
 {
        if (prio_class < 0 || prio_class > 3)
        {
-               eDebug("prio class(%d) out of valid range (0..3)", prio_class);
+               eDebug("[setIoPrio] class(%d) out of valid range (0..3)", prio_class);
                return;
        }
        if (prio < 0 || prio > 7)
        {
-               eDebug("prio level(%d) out of range (0..7)", prio);
+               eDebug("[setIoPrio] level(%d) out of range (0..7)", prio);
                return;
        }
        if (ioprio_set(IOPRIO_WHO_PROCESS, 0 /*pid 0 .. current process*/, prio | prio_class << IOPRIO_CLASS_SHIFT) == -1)
-               eDebug("setIoPrio failed (%m) !");
+               eDebug("[setIoPrio] failed: %m");
        else
-               eDebug("setIoPrio %s level %d ok", to_prio[prio_class], prio);
+               eDebug("[setIoPrio] %s level %d ok", to_prio[prio_class], prio);
 }
 
 void printIoPrio()
 {
        int pid = 0, ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid);
 
-       eDebug("pid=%d, %d", pid, ioprio);
+       eDebug("[printIoPrio] pid=%d, %d", pid, ioprio);
 
        if (ioprio == -1)
-               eDebug("ioprio_get(%m)");
+               eDebug("[printIoPrio] ioprio_get(%m)");
        else {
                int ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT;
                ioprio = ioprio & 0xff;
-               eDebug("%s: prio %d", to_prio[ioprio_class], ioprio);
+               eDebug("[printIoPrio] %s: prio %d", to_prio[ioprio_class], ioprio);
        }
 }
index e4a60a9..8763143 100644 (file)
@@ -39,7 +39,7 @@ int eRawFile::open(const char *filename)
 
 off_t eRawFile::lseek_internal(off_t offset)
 {
-//     eDebug("lseek: %lld, %d", offset, whence);
+//     eDebug("[eRawFile] lseek: %lld, %d", offset, whence);
                /* if there is only one file, use the native lseek - the file could be growing! */
        if (m_nrfiles < 2)
        {
@@ -113,7 +113,7 @@ void eRawFile::scan()
                ::close(f);
                ++m_nrfiles;
        }
-//     eDebug("found %d files, splitsize: %llx, totallength: %llx", m_nrfiles, m_splitsize, m_totallength);
+//     eDebug("[eRawFile] found %d files, splitsize: %llx, totallength: %llx", m_nrfiles, m_splitsize, m_totallength);
 }
 
 int eRawFile::switchOffset(off_t off)
@@ -125,7 +125,7 @@ int eRawFile::switchOffset(off_t off)
                        filenr = m_nrfiles - 1;
                if (filenr != m_current_file)
                {
-//                     eDebug("-> %d", filenr);
+//                     eDebug("[eRawFile] -> %d", filenr);
                        close();
                        m_fd = openFileUncached(filenr);
                        m_last_offset = m_base_offset = m_splitsize * filenr;
index 3118161..7654b5f 100644 (file)
@@ -92,7 +92,7 @@ void queueRingBuffer<T>::enqueue( const T &val )
        // first check for potential overflow
        if( lastFilled->nextLink == lastFree )
        {
-//             eDebug("increase size %d", count);
+//             eDebug("[queueRingBuffer] increase size %d", count);
                link<T> * newLink = new link<T>( val );
                newLink->prevLink = lastFilled;
                newLink->nextLink = lastFilled->nextLink;
index adf008d..52bbcda 100644 (file)
@@ -62,7 +62,7 @@ int eThread::runAsync(int prio, int policy)
        }
 
        if (the_thread) {
-               eDebug("old thread joined %d", pthread_join(the_thread, 0));
+               eDebug("[eThread] old thread joined %d", pthread_join(the_thread, 0));
                the_thread = 0;
        }
 
@@ -70,7 +70,7 @@ int eThread::runAsync(int prio, int policy)
        {
                pthread_attr_destroy(&attr);
                m_alive = 0;
-               eDebug("couldn't create new thread");
+               eDebug("[eThread] couldn't create new thread");
                return -1;
        }
 
@@ -91,7 +91,7 @@ eThread::~eThread()
        if (the_thread)
        {
                /* Warn about this class' design being borked */
-               eWarning("Destroyed thread without joining it, this usually means your thread is now running with a halfway destroyed object");
+               eWarning("[eThread] Destroyed thread without joining it, this usually means your thread is now running with a halfway destroyed object");
                kill();
        }
 }
@@ -103,7 +103,7 @@ int eThread::sync(void)
        m_state.down(); /* this might block */
        res = m_alive;
        if (m_state.value() != 0)
-               eFatal("eThread::sync: m_state.value() == %d - was %d before", m_state.value(), debug_val_before);
+               eFatal("[eThread] sync: m_state.value() == %d - was %d before", m_state.value(), debug_val_before);
        ASSERT(m_state.value() == 0);
        m_state.up();
        return res; /* 0: thread is guaranteed not to run. 1: state unknown. */
@@ -114,7 +114,7 @@ int eThread::sendSignal(int sig)
        if (m_alive)
                return pthread_kill(the_thread, sig);
        else
-               eDebug("send signal to non running thread");
+               eDebug("[eThread] send signal to non running thread");
        return -1;
 }
 
@@ -128,7 +128,7 @@ void eThread::kill()
        int ret = pthread_join(the_thread, NULL);
        the_thread = 0;
        if (ret)
-               eWarning("pthread_join failed, code: %d", ret);
+               eWarning("[eThread] pthread_join failed, code: %d", ret);
 }
 
 void eThread::hasStarted()
index cc5edd8..1c0dc0e 100644 (file)
@@ -45,7 +45,7 @@ int Select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, stru
                        if (exceptfds) *exceptfds = xset;
                        if (timeout) *timeout = interval;
                        if (errno == EINTR) continue;
-                       eDebug("select error (%m)");
+                       eDebug("Select] error: %m");
                        break;
                }
 
@@ -63,7 +63,7 @@ ssize_t singleRead(int fd, void *buf, size_t count)
                if (retval < 0)
                {
                        if (errno == EINTR) continue;
-                       eDebug("singleRead error (%m)");
+                       eDebug("[singleRead] error: %m");
                }
                return retval;
        }
@@ -252,7 +252,7 @@ ssize_t writeAll(int fd, const void *buf, size_t count)
                if (retval < 0)
                {
                        if (errno == EINTR) continue;
-                       eDebug("writeAll error (%m)");
+                       eDebug("[writeAll] error: %m");
                        return retval;
                }
                handledcount += retval;
index 057d6f7..06bebe3 100644 (file)
@@ -63,7 +63,7 @@ void eBackgroundFileEraser::erase(const std::string& filename)
                        } else
                        // if rename fails, try deleting the file itself without renaming.
                        {
-                               eDebug("Rename %s -> %s failed.", filename.c_str(), delname.c_str());
+                               eDebug("[eBackgroundFileEraser] Rename %s -> %s failed: %m", filename.c_str(), delname.c_str());
                                delname = filename;
                        }
                }
@@ -96,7 +96,7 @@ void eBackgroundFileEraser::gotMessage(const Message &msg )
                                        int fd = ::open(c_filename, O_WRONLY|O_SYNC);
                                        if (fd == -1)
                                        {
-                                               eDebug("File %s cannot be opened for writing", c_filename);
+                                               eDebug("[eBackgroundFileEraser] Cannot open %s for writing: %m", c_filename);
                                        }
                                        else
                                        {
@@ -111,7 +111,7 @@ void eBackgroundFileEraser::gotMessage(const Message &msg )
                                                        st.st_size -= erase_speed;
                                                        if (::ftruncate(fd, st.st_size) != 0)
                                                        {
-                                                               eDebug("Failed to truncate %s (%m)", c_filename);
+                                                               eDebug("[eBackgroundFileEraser] Failed to truncate %s: %m", c_filename);
                                                                break; // don't try again
                                                        }
                                                        usleep(500000); // wait half a second
@@ -124,7 +124,7 @@ void eBackgroundFileEraser::gotMessage(const Message &msg )
                if (!unlinked)
                {
                        if ( ::unlink(c_filename) < 0 )
-                               eDebug("remove file %s failed (%m)", c_filename);
+                               eDebug("[eBackgroundFileEraser] removing %s failed: %m", c_filename);
                }
                stop_thread_timer->start(1000, true); // stop thread in one seconds
        }
index f36ca69..34161f7 100644 (file)
@@ -21,17 +21,17 @@ void eComponentScan::scanEvent(int evt)
                        int err;
                        if ((err = eDVBResourceManager::getInstance(res)) != 0)
                        {
-                               eDebug("no resource manager");
+                               eDebug("[eComponentScan] no resource manager");
                                m_failed = 2;
                        } else if ((err = res->getChannelList(db)) != 0)
                        {
                                m_failed = 3;
-                               eDebug("no channel list");
+                               eDebug("[eComponentScan] no channel list");
                        } else
                        {
                                m_scan->insertInto(db);
                                db->flush();
-                               eDebug("scan done!");
+                               eDebug("[eComponentScan] scan done!");
                        }
                        break;
                }
@@ -39,7 +39,7 @@ void eComponentScan::scanEvent(int evt)
                        newService();
                        return;
                case eDVBScan::evtFail:
-                       eDebug("scan failed.");
+                       eDebug("[eComponentScan] scan failed.");
                        m_failed = 1;
                        m_done = 1;
                        break;
@@ -101,7 +101,7 @@ int eComponentScan::start(int feid, int flags, int networkid)
 
        if (mgr->allocateRawChannel(channel, feid))
        {
-               eDebug("scan: allocating raw channel (on frontend %d) failed!", feid);
+               eDebug("[eComponentScan] allocating raw channel (on frontend %d) failed!", feid);
                return -1;
        }
 
@@ -115,9 +115,9 @@ int eComponentScan::start(int feid, int flags, int networkid)
                ePtr<eDVBResourceManager> res;
                int err;
                if ((err = eDVBResourceManager::getInstance(res)) != 0)
-                       eDebug("no resource manager");
+                       eDebug("[eComponentScan] no resource manager");
                else if ((err = res->getChannelList(db)) != 0)
-                       eDebug("no channel list");
+                       eDebug("[eComponentScan] no channel list");
                else
                {
                        if (m_initial.size() > 1)
index a858889..1bb6d88 100644 (file)
@@ -108,6 +108,7 @@ void eTuxtxtApp::setEnableTtCachingOnOff( int onoff )
 {
        if (onoff && !enableTtCaching)          // Switch caching on
        {
+               eDebug("[eTuxttxtApp] enable caching");
                enableTtCaching = true;
                if (pid)
                {
@@ -117,6 +118,7 @@ void eTuxtxtApp::setEnableTtCachingOnOff( int onoff )
        }
        else if (!onoff && enableTtCaching)     // Switch caching off
        {
+               eDebug("[eTuxttxtApp] disable caching");
                enableTtCaching = false;
                int savePid = pid;
                freeCache();
@@ -127,4 +129,4 @@ void eTuxtxtApp::setEnableTtCachingOnOff( int onoff )
 void eTuxtxtApp::handleKey( int key )
 {
        tuxtxt_handlePressedKey(key);
-}
\ No newline at end of file
+}
index 76e99ad..76369bf 100644 (file)
@@ -21,7 +21,7 @@ eAVSwitch::eAVSwitch()
        m_fp_fd = open("/dev/dbox/fp0", O_RDONLY|O_NONBLOCK);
        if (m_fp_fd == -1)
        {
-               eDebug("couldnt open /dev/dbox/fp0 to monitor vcr scart slow blanking changed!");
+               eDebug("[eAVSwitch] failed to open /dev/dbox/fp0 to monitor vcr scart slow blanking changed: %m");
                m_fp_notifier=0;
        }
        else
@@ -52,10 +52,10 @@ int eAVSwitch::getVCRSlowBlanking()
                if (f)
                {
                        if (fscanf(f, "%d", &val) != 1)
-                               eDebug("read /proc/stb/fp/vcr_fns failed!! (%m)");
+                               eDebug("[eAVSwitch] read /proc/stb/fp/vcr_fns failed: %m");
                }
                else if (ioctl(m_fp_fd, FP_IOCTL_GET_VCR, &val) < 0)
-                       eDebug("FP_GET_VCR failed (%m)");
+                       eDebug("[eAVSwitch] FP_GET_VCR failed: %m");
        }
        return val;
 }
@@ -64,7 +64,7 @@ void eAVSwitch::fp_event(int what)
 {
        if (what & POLLERR) // driver not ready for fp polling
        {
-               eDebug("fp driver not read for polling.. so disable polling");
+               eDebug("[eAVSwitch] fp driver not read for polling.. so disable polling");
                m_fp_notifier->stop();
        }
        else
@@ -74,7 +74,7 @@ void eAVSwitch::fp_event(int what)
                {
                        int events;
                        if (fscanf(f, "%d", &events) != 1)
-                               eDebug("read /proc/stb/fp/events failed!! (%m)");
+                               eDebug("[eAVSwitch] read /proc/stb/fp/events failed: %m");
                        else if (events & FP_EVENT_VCR_SB_CHANGED)
                                /* emit */ vcr_sb_notifier(getVCRSlowBlanking());
                }
@@ -82,7 +82,7 @@ void eAVSwitch::fp_event(int what)
                {
                        int val = FP_EVENT_VCR_SB_CHANGED;  // ask only for this event
                        if (ioctl(m_fp_fd, FP_IOCTL_GET_EVENT, &val) < 0)
-                               eDebug("FP_IOCTL_GET_EVENT failed (%m)");
+                               eDebug("[eAVSwitch] FP_IOCTL_GET_EVENT failed: %m");
                        else if (val & FP_EVENT_VCR_SB_CHANGED)
                                /* emit */ vcr_sb_notifier(getVCRSlowBlanking());
                }
@@ -105,7 +105,7 @@ bool eAVSwitch::haveScartSwitch()
        char tmp[255];
        int fd = open("/proc/stb/avs/0/input_choices", O_RDONLY);
        if(fd < 0) {
-               eDebug("cannot open /proc/stb/avs/0/input_choices");
+               eDebug("[eAVSwitch] cannot open /proc/stb/avs/0/input_choices: %m");
                return false;
        }
        read(fd, tmp, 255);
@@ -128,7 +128,7 @@ void eAVSwitch::setInput(int val)
        m_active = val == 0;
 
        if((fd = open("/proc/stb/avs/0/input", O_WRONLY)) < 0) {
-               eDebug("cannot open /proc/stb/avs/0/input");
+               eDebug("[eAVSwitch] cannot open /proc/stb/avs/0/input: %m");
                return;
        }
 
@@ -155,7 +155,7 @@ void eAVSwitch::setColorFormat(int format)
        int fd;
 
        if((fd = open("/proc/stb/avs/0/colorformat", O_WRONLY)) < 0) {
-               printf("cannot open /proc/stb/avs/0/colorformat\n");
+               eDebug("[eAVSwitch] cannot open /proc/stb/avs/0/colorformat: %m");
                return;
        }
        switch(format) {
@@ -191,7 +191,7 @@ void eAVSwitch::setAspectRatio(int ratio)
 
        int fd;
        if((fd = open("/proc/stb/video/aspect", O_WRONLY)) < 0) {
-               eDebug("cannot open /proc/stb/video/aspect");
+               eDebug("[eAVSwitch] cannot open /proc/stb/video/aspect: %m");
                return;
        }
 //     eDebug("set aspect to %s", aspect[ratio]);
@@ -199,7 +199,7 @@ void eAVSwitch::setAspectRatio(int ratio)
        close(fd);
 
        if((fd = open("/proc/stb/video/policy", O_WRONLY)) < 0) {
-               eDebug("cannot open /proc/stb/video/policy");
+               eDebug("[eAVSwitch] cannot open /proc/stb/video/policy: %m");
                return;
        }
 //     eDebug("set ratio to %s", policy[ratio]);
@@ -220,12 +220,12 @@ void eAVSwitch::setVideomode(int mode)
        {
                int fd1 = open("/proc/stb/video/videomode_50hz", O_WRONLY);
                if(fd1 < 0) {
-                       eDebug("cannot open /proc/stb/video/videomode_50hz");
+                       eDebug("[eAVSwitch] cannot open /proc/stb/video/videomode_50hz: %m");
                        return;
                }
                int fd2 = open("/proc/stb/video/videomode_60hz", O_WRONLY);
                if(fd2 < 0) {
-                       eDebug("cannot open /proc/stb/video/videomode_60hz");
+                       eDebug("[eAVSwitch] cannot open /proc/stb/video/videomode_60hz: %m");
                        close(fd1);
                        return;
                }
@@ -238,7 +238,7 @@ void eAVSwitch::setVideomode(int mode)
        {
                int fd = open("/proc/stb/video/videomode", O_WRONLY);
                if(fd < 0) {
-                       eDebug("cannot open /proc/stb/video/videomode");
+                       eDebug("[eAVSwitch] cannot open /proc/stb/video/videomode: %m");
                        return;
                }
                switch(mode) {
@@ -249,7 +249,7 @@ void eAVSwitch::setVideomode(int mode)
                                write(fd, ntsc, strlen(ntsc));
                                break;
                        default:
-                               eDebug("unknown videomode %d", mode);
+                               eDebug("[eAVSwitch] unknown videomode %d", mode);
                }
                close(fd);
        }
@@ -261,7 +261,7 @@ void eAVSwitch::setWSS(int val) // 0 = auto, 1 = auto(4:3_off)
 {
        int fd;
        if((fd = open("/proc/stb/denc/0/wss", O_WRONLY)) < 0) {
-               eDebug("cannot open /proc/stb/denc/0/wss");
+               eDebug("[eAVSwitch] cannot open /proc/stb/denc/0/wss: %m");
                return;
        }
        const char *wss[] = {
index 0be4ca0..495837e 100644 (file)
@@ -53,10 +53,12 @@ eHdmiCEC::eHdmiCEC()
        logicalAddress = 1;
        deviceType = 1; /* default: recorder */
 #ifdef DREAMBOX
-       hdmiFd = ::open("/dev/misc/hdmi_cec0", O_RDWR | O_NONBLOCK | O_CLOEXEC);
+#define HDMIDEV "/dev/misc/hdmi_cec0"
 #else
-       hdmiFd = ::open("/dev/hdmi_cec", O_RDWR | O_NONBLOCK | O_CLOEXEC);
+#define HDMIDEV "/dev/hdmi_cec"
 #endif
+
+       hdmiFd = ::open(HDMIDEV, O_RDWR | O_NONBLOCK | O_CLOEXEC);
        if (hdmiFd >= 0)
        {
 
@@ -70,6 +72,10 @@ eHdmiCEC::eHdmiCEC()
                messageNotifier = eSocketNotifier::create(eApp, hdmiFd, eSocketNotifier::Read | eSocketNotifier::Priority);
                CONNECT(messageNotifier->activated, eHdmiCEC::hdmiEvent);
        }
+       else
+       {
+               eDebug("[eHdmiCEC] cannot open %s: %m", HDMIDEV);
+       }
 }
 
 eHdmiCEC::~eHdmiCEC()
@@ -151,7 +157,7 @@ void eHdmiCEC::getAddressInfo()
                        {
                                if (memcmp(physicalAddress, addressinfo.physical, sizeof(physicalAddress)))
                                {
-                                       eDebug("eHdmiCEC: detected physical address change: %02X%02X --> %02X%02X", physicalAddress[0], physicalAddress[1], addressinfo.physical[0], addressinfo.physical[1]);
+                                       eDebug("[eHdmiCEC] detected physical address change: %02X%02X --> %02X%02X", physicalAddress[0], physicalAddress[1], addressinfo.physical[0], addressinfo.physical[1]);
                                        memcpy(physicalAddress, addressinfo.physical, sizeof(physicalAddress));
                                        reportPhysicalAddress();
                                        /* emit */ addressChanged((physicalAddress[0] << 8) | physicalAddress[1]);
@@ -236,7 +242,7 @@ void eHdmiCEC::hdmiEvent(int what)
                        bool keypressed = false;
                        static unsigned char pressedkey = 0;
 
-                       eDebugNoNewLineStart("eHdmiCEC: received message");
+                       eDebugNoNewLineStart("[eHdmiCEC] received message");
                        for (int i = 0; i < rxmessage.length; i++)
                        {
                                eDebugNoNewLine(" %02X", rxmessage.data[i]);
@@ -389,7 +395,7 @@ void eHdmiCEC::sendMessage(struct cec_message &message)
 {
        if (hdmiFd >= 0)
        {
-               eDebugNoNewLineStart("eHdmiCEC: send message");
+               eDebugNoNewLineStart("[eHdmiCEC] send message");
                for (int i = 0; i < message.length; i++)
                {
                        eDebugNoNewLine(" %02X", message.data[i]);
index 43e6dad..7b24871 100644 (file)
@@ -25,7 +25,7 @@ int Misc_Options::set_12V_output(int state)
        int fd = open("/proc/stb/misc/12V_output", O_WRONLY);
        if (fd < 0)
        {
-               eDebug("couldn't open /proc/stb/misc/12V_output");
+               eDebug("[Misc_Options] cannot open /proc/stb/misc/12V_output: %m");
                return -1;
        }
        const char *str=0;
@@ -45,10 +45,11 @@ bool Misc_Options::detected_12V_output()
        int fd = open("/proc/stb/misc/12V_output", O_WRONLY);
        if (fd < 0)
        {
-               eDebug("couldn't open /proc/stb/misc/12V_output");
+               eDebug("[Misc_Options] 12Vdetect cannot open /proc/stb/misc/12V_output: %m");
                return false;
        }
        close(fd);
+       eDebug("[Misc_Options] 12V output detected");
        return true;
 }
 
index 5b742c3..597aed0 100644 (file)
@@ -74,7 +74,7 @@ eRCShortDriver::eRCShortDriver(const char *filename): eRCDriver(eRCInput::getIns
        handle=open(filename, O_RDONLY|O_NONBLOCK);
        if (handle<0)
        {
-               eDebug("failed to open %s", filename);
+               eDebug("[eRCShortDriver] cannot open %s: %m", filename);
                sn=0;
        } else
        {
@@ -107,7 +107,7 @@ eRCInputEventDriver::eRCInputEventDriver(const char *filename): eRCDriver(eRCInp
        handle=open(filename, O_RDONLY|O_NONBLOCK);
        if (handle<0)
        {
-               eDebug("failed to open %s", filename);
+               eDebug("[eRCInputEventDriver] cannot open %s: %m", filename);
                sn=0;
        } else
        {
@@ -117,14 +117,27 @@ eRCInputEventDriver::eRCInputEventDriver(const char *filename): eRCDriver(eRCInp
                ::ioctl(handle, EVIOCGBIT(EV_KEY, sizeof(keyCaps)), keyCaps);
                memset(evCaps, 0, sizeof(evCaps));
                ::ioctl(handle, EVIOCGBIT(0, sizeof(evCaps)), evCaps);
+#if DUMPKEYS
+               int i;
+               eDebugNoNewlineStart("[eRCInputEventDriver] %s keycaps: ", filename);
+               for (i = 0; i< sizeof(keyCaps); i++)
+                       eDebugNowNewline(" %02X", keyCaps[i]);
+               eDebugNoNewlineStart("\n[eRCInputEventDriver] %s evcaps: ", filename);
+               for (i = 0; i< sizeof(evCaps); i++)
+                       eDebugNowNewline(" %02X", evCaps[i]);
+               eDebugNoNewline("\n");
+#endif
+
        }
 }
 
 std::string eRCInputEventDriver::getDeviceName()
 {
        char name[128]="";
-       if (handle >= 0)
+       if (handle >= 0) {
                ::ioctl(handle, EVIOCGNAME(128), name);
+               eDebug("[eRCInputEventDriver] devicename=%s", name);
+       }
 #ifdef FORCE_ADVANCED_REMOTE
        if (!strcmp(name, "dreambox remote control (native)")) return "dreambox advanced remote control (native)";
 #endif
@@ -137,7 +150,7 @@ void eRCInputEventDriver::setExclusive(bool b)
        {
                int grab = b;
                if (::ioctl(handle, EVIOCGRAB, grab) < 0)
-                       perror("EVIOCGRAB");
+                       eDebug("[eRCInputEventDriver] EVIOCGRAB: %m");
        }
 }
 
@@ -249,9 +262,9 @@ eRCDevice *eRCInput::getDevice(const std::string &id)
        std::map<std::string,eRCDevice*>::iterator i=devices.find(id);
        if (i == devices.end())
        {
-               eDebug("failed, possible choices are:");
+               eDebug("[eRCDevice] failed, possible choices are:");
                for (std::map<std::string,eRCDevice*>::iterator i=devices.begin(); i != devices.end(); ++i)
-                       eDebug("%s", i->first.c_str());
+                       eDebug("[eRCDevice]     %s", i->first.c_str());
                return 0;
        }
        return i->second;
index 4e58442..dc9d3fa 100644 (file)
@@ -10,7 +10,7 @@ eRCConsoleDriver::eRCConsoleDriver(const char *filename): eRCDriver(eRCInput::ge
        handle=open(filename, O_RDONLY|O_NONBLOCK);
        if (handle<0)
        {
-               eDebug("failed to open %s", filename);
+               eDebug("[eRCConsoleDriver] failed to open %s: %m", filename);
                sn=0;
        } else
        {
index 00d1959..9b332f9 100644 (file)
@@ -119,7 +119,7 @@ eRCDeviceInputDev::eRCDeviceInputDev(eRCInputEventDriver *driver, int consolefd)
                consoleFd(consolefd), shiftState(false), capsState(false)
 {
        setExclusive(true);
-       eDebug("Input device \"%s\" is a %s", id.c_str(), iskeyboard ? "keyboard" : (ismouse ? "mouse" : "remotecontrol"));
+       eDebug("[eRCDeviceInputDev] device \"%s\" is a %s", id.c_str(), iskeyboard ? "keyboard" : (ismouse ? "mouse" : "remotecontrol"));
 }
 
 void eRCDeviceInputDev::setExclusive(bool b)
@@ -173,7 +173,7 @@ public:
                        add(filename);
                        ++i;
                }
-               eDebug("Found %d input devices.", i);
+               eDebug("[eInputDeviceInit] Found %d input devices.", i);
        }
 
        ~eInputDeviceInit()
@@ -202,7 +202,7 @@ public:
                                return;
                        }
                }
-               eDebug("Remove '%s', not found", filename);
+               eDebug("[eInputDeviceInit] Remove '%s', not found", filename);
        }
 };
 
index 0705cb0..c0af9fb 100644 (file)
@@ -337,7 +337,7 @@ int eSDLInputDevice::translateKey(SDLKey key)
        P(EURO);
        P(UNDO);
        default:
-               eDebug("unhandled SDL keycode: %d", key);
+               eDebug("[eSDLInputDevice] unhandled SDL keycode: %d", key);
                return KEY_RESERVED;
        }
 
@@ -364,7 +364,7 @@ eSDLInputDriver::~eSDLInputDriver()
 
 void eSDLInputDriver::keyPressed(const SDL_KeyboardEvent *key)
 {
-       eDebug("km=%d enabled=%d locked=%d",
+       eDebug("[eSDLInputDevice] km=%d enabled=%d locked=%d",
                input->getKeyboardMode(), enabled, input->islocked());
 
        if (!enabled || input->islocked())
index 7041829..1238920 100644 (file)
@@ -8,12 +8,12 @@
 #include <lib/base/init_num.h>
 #include <lib/base/eerror.h>
 
-#define IOCTL_SET_CHANNEL                                              0
-#define IOCTL_SET_TESTMODE                                     1
-#define IOCTL_SET_SOUNDENABLE                          2
-#define IOCTL_SET_SOUNDSUBCARRIER              3
-#define IOCTL_SET_FINETUNE                                     4
-#define IOCTL_SET_STANDBY                                              5
+#define IOCTL_SET_CHANNEL              0
+#define IOCTL_SET_TESTMODE             1
+#define IOCTL_SET_SOUNDENABLE          2
+#define IOCTL_SET_SOUNDSUBCARRIER      3
+#define IOCTL_SET_FINETUNE             4
+#define IOCTL_SET_STANDBY              5
 
 eRFmod *eRFmod::instance = 0;
 
@@ -24,7 +24,7 @@ eRFmod::eRFmod()
 
        fd = open("/dev/rfmod0", O_RDWR);
        if (fd < 0)
-               eDebug("couldnt open /dev/rfmod0!!!!");
+               eDebug("[eRFmod] couldnt open /dev/rfmod0: %m");
 }
 
 eRFmod::~eRFmod()
index 65704a7..f5a1b62 100644 (file)
@@ -37,7 +37,7 @@ void eCableScan::start(int frontendid)
 
        if (res->allocateRawChannel(m_channel, frontendid))
        {
-               eDebug("eCableScan: failed to allocate channel!");
+               eDebug("[eCableScan] failed to allocate channel!");
                scanCompleted(-1);
                return;
        }
@@ -64,7 +64,7 @@ void eCableScan::start(int frontendid)
 
 void eCableScan::NITReady(int error)
 {
-       eDebug("eCableScan::NITReady %d", error);
+       eDebug("[eCableScan] NITReady %d", error);
 
        if (!error)
        {
@@ -81,7 +81,7 @@ void eCableScan::NITReady(int error)
 
 void eCableScan::SDTReady(int error)
 {
-       eDebug("eCableScan::SDTReady %d", error);
+       eDebug("[eCableScan] SDTReady %d", error);
 
        if (!error)
        {
@@ -383,7 +383,7 @@ void eCableScan::createBouquets()
                }
                else
                {
-                       eDebug("failed to create bouquet!");
+                       eDebug("[eCableScan] failed to create bouquet!");
                }
        }
        else
@@ -434,7 +434,7 @@ void eCableScan::createBouquets()
                        }
                        else
                        {
-                               eDebug("failed to create bouquet!");
+                               eDebug("[eCableScan] failed to create bouquet!");
                        }
                }
                else
index b545f6d..07067ed 100644 (file)
@@ -582,7 +582,7 @@ int eDVBCAService::buildCAPMT(eTable<ProgramMapSection> *ptr)
 
                while( i != ptr->getSections().end() )
                {
-//                     eDebug("append");
+//                     eDebug("[eDVBCAService] append");
                        capmt.append(*i++);
                }
 
index 5979b53..e194cc3 100644 (file)
@@ -75,17 +75,17 @@ int eDVBAudio::startPid(int pid, int type)
                        break;
                }
                pes.flags    = 0;
-               eDebugNoNewLineStart("[eDVBAudio] DMX_SET_PES_FILTER(0x%02x) - audio%d - ", pid, m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] DMX_SET_PES_FILTER pid=0x%04x ", m_dev, pid);
                if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
                {
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                        return -errno;
                }
                eDebugNoNewLine("ok\n");
-               eDebugNoNewLineStart("[eDVBAudio] DEMUX_START - audio%d - ", m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] DEMUX_START ", m_dev);
                if (::ioctl(m_fd_demux, DMX_START) < 0)
                {
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                        return -errno;
                }
                eDebugNoNewLine("ok\n");
@@ -123,15 +123,15 @@ int eDVBAudio::startPid(int pid, int type)
                        break;
                }
 
-               eDebugNoNewLineStart("[eDVBAudio] AUDIO_SET_BYPASS(%d) - audio%d", bypass, m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_SET_BYPASS bypass=%d ", m_dev, bypass);
                if (::ioctl(m_fd, AUDIO_SET_BYPASS_MODE, bypass) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
                freeze();  // why freeze here?!? this is a problem when only a pid change is requested... because of the unfreeze logic in Decoder::setState
-               eDebugNoNewLineStart("[eDVBAudio] AUDIO_PLAY - ");
+               eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_PLAY ", m_dev);
                if (::ioctl(m_fd, AUDIO_PLAY) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -140,20 +140,19 @@ int eDVBAudio::startPid(int pid, int type)
 
 void eDVBAudio::stop()
 {
-       eDebug("[eDVBAUDIO] AUDIO_STOP - audio%d", m_dev);
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("[eDVBAUDIO] AUDIO_STOP - audio%d", m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_STOP ", m_dev);
                if (::ioctl(m_fd, AUDIO_STOP) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
        if (m_fd_demux >= 0)
        {
-               eDebugNoNewLineStart("[eDVBAUDIO] DEMUX_STOP - audio%d - ", m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] DEMUX_STOP ", m_dev);
                if (::ioctl(m_fd_demux, DMX_STOP) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -163,9 +162,9 @@ void eDVBAudio::flush()
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("[eDVBAUDIO] AUDIO_CLEAR_BUFFER - audio%d ", m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_CLEAR_BUFFER ", m_dev);
                if (::ioctl(m_fd, AUDIO_CLEAR_BUFFER) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -175,9 +174,9 @@ void eDVBAudio::freeze()
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("[eDVBAUDIO] AUDIO_PAUSE - audio%d ", m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_PAUSE ", m_dev);
                if (::ioctl(m_fd, AUDIO_PAUSE) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -187,9 +186,9 @@ void eDVBAudio::unfreeze()
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("[eDVBAUDIO] AUDIO_CONTINUE - audio%d ", m_dev);
+               eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_CONTINUE ", m_dev);
                if (::ioctl(m_fd, AUDIO_CONTINUE) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -206,9 +205,9 @@ void eDVBAudio::setChannel(int channel)
                case aMonoRight: val = AUDIO_MONO_RIGHT; break;
                default: break;
                }
-               eDebugNoNewLineStart("AUDIO_CHANNEL_SELECT(%d) - ", val);
+               eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_CHANNEL_SELECT %d ", m_dev, val);
                if (::ioctl(m_fd, AUDIO_CHANNEL_SELECT, val) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -219,7 +218,7 @@ int eDVBAudio::getPTS(pts_t &now)
        if (m_fd >= 0)
        {
                if (::ioctl(m_fd, AUDIO_GET_PTS, &now) < 0)
-                       eDebug("AUDIO_GET_PTS failed (%m)");
+                       eDebug("[eDVBAudio%d] AUDIO_GET_PTS failed: %m", m_dev);
        }
        return 0;
 }
@@ -231,6 +230,7 @@ eDVBAudio::~eDVBAudio()
                ::close(m_fd);
        if (m_fd_demux >= 0)
                ::close(m_fd_demux);
+       eDebug("[eDVBAudio%d] destroy", m_dev);
 }
 
 DEFINE_REF(eDVBVideo);
@@ -245,20 +245,21 @@ eDVBVideo::eDVBVideo(eDVBDemux *demux, int dev)
        sprintf(filename, "/dev/dvb/adapter%d/video%d", demux ? demux->adapter : 0, dev);
        m_fd = ::open(filename, O_RDWR | O_CLOEXEC);
        if (m_fd < 0)
-               eWarning("%s: %m", filename);
+               eWarning("[eDVBVideo] %s: %m", filename);
        else
        {
+               eDebug("[eDVBVideo] Video Device: %s", filename);
                m_sn = eSocketNotifier::create(eApp, m_fd, eSocketNotifier::Priority);
                CONNECT(m_sn->activated, eDVBVideo::video_event);
        }
-       eDebug("Video Device: %s", filename);
        if (demux)
        {
                sprintf(filename, "/dev/dvb/adapter%d/demux%d", demux->adapter, demux->demux);
                m_fd_demux = ::open(filename, O_RDWR | O_CLOEXEC);
                if (m_fd_demux < 0)
-                       eWarning("%s: %m", filename);
-               eDebug("demux device: %s", filename);
+                       eWarning("[eDVBVideo] %s: %m", filename);
+               else
+                       eDebug("[eDVBVideo] demux device: %s", filename);
        }
        else
        {
@@ -326,9 +327,9 @@ int eDVBVideo::startPid(int pid, int type)
                        break;
                }
 
-               eDebugNoNewLineStart("VIDEO_SET_STREAMTYPE %d - ", streamtype);
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_SET_STREAMTYPE %d - ", m_dev, streamtype);
                if (::ioctl(m_fd, VIDEO_SET_STREAMTYPE, streamtype) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -355,17 +356,17 @@ int eDVBVideo::startPid(int pid, int type)
                        break;
                }
                pes.flags    = 0;
-               eDebugNoNewLineStart("DMX_SET_PES_FILTER(0x%02x) - video%d - ", pid, m_dev);
+               eDebugNoNewLineStart("[eDVBVideo%d] DMX_SET_PES_FILTER pid=0x%04x ", m_dev, pid);
                if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
                {
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                        return -errno;
                }
                eDebugNoNewLine("ok\n");
-               eDebugNoNewLineStart("DEMUX_START - video - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] DEMUX_START ", m_dev);
                if (::ioctl(m_fd_demux, DMX_START) < 0)
                {
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                        return -errno;
                }
                eDebugNoNewLine("ok\n");
@@ -374,9 +375,9 @@ int eDVBVideo::startPid(int pid, int type)
        if (m_fd >= 0)
        {
                freeze();  // why freeze here?!? this is a problem when only a pid change is requested... because of the unfreeze logic in Decoder::setState
-               eDebugNoNewLineStart("VIDEO_PLAY - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_PLAY ", m_dev);
                if (::ioctl(m_fd, VIDEO_PLAY) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -387,18 +388,18 @@ void eDVBVideo::stop()
 {
        if (m_fd_demux >= 0)
        {
-               eDebugNoNewLineStart("DEMUX_STOP - video - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] DEMUX_STOP  ", m_dev);
                if (::ioctl(m_fd_demux, DMX_STOP) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
 
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("VIDEO_STOP - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_STOP ", m_dev);
                if (::ioctl(m_fd, VIDEO_STOP, 1) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -408,9 +409,9 @@ void eDVBVideo::flush()
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("VIDEO_CLEAR_BUFFER - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_CLEAR_BUFFER ", m_dev);
                if (::ioctl(m_fd, VIDEO_CLEAR_BUFFER) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -420,9 +421,9 @@ void eDVBVideo::freeze()
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("VIDEO_FREEZE - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_FREEZE ", m_dev);
                if (::ioctl(m_fd, VIDEO_FREEZE) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -432,9 +433,9 @@ void eDVBVideo::unfreeze()
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("VIDEO_CONTINUE - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_CONTINUE ", m_dev);
                if (::ioctl(m_fd, VIDEO_CONTINUE) < 0)
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
        }
@@ -444,10 +445,10 @@ int eDVBVideo::setSlowMotion(int repeat)
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("VIDEO_SLOWMOTION(%d) - ", repeat);
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_SLOWMOTION %d ", m_dev, repeat);
                int ret = ::ioctl(m_fd, VIDEO_SLOWMOTION, repeat);
                if (ret < 0)
-                       eDebugNoNewLine("failed(%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
                return ret;
@@ -459,10 +460,10 @@ int eDVBVideo::setFastForward(int skip)
 {
        if (m_fd >= 0)
        {
-               eDebugNoNewLineStart("VIDEO_FAST_FORWARD(%d) - ", skip);
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_FAST_FORWARD %d ", m_dev, skip);
                int ret = ::ioctl(m_fd, VIDEO_FAST_FORWARD, skip);
                if (ret < 0)
-                       eDebugNoNewLine("failed(%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                else
                        eDebugNoNewLine("ok\n");
                return ret;
@@ -476,7 +477,7 @@ int eDVBVideo::getPTS(pts_t &now)
        {
                int ret = ::ioctl(m_fd, VIDEO_GET_PTS, &now);
                if (ret < 0)
-                       eDebug("VIDEO_GET_PTS failed(%m)");
+                       eDebug("[eDVBVideo%d] VIDEO_GET_PTS failed: %m", m_dev);
                return ret;
        }
        return 0;
@@ -488,6 +489,7 @@ eDVBVideo::~eDVBVideo()
                ::close(m_fd);
        if (m_fd_demux >= 0)
                ::close(m_fd_demux);
+       eDebug("[eDVBVideo%d] destroy", m_dev);
 }
 
 void eDVBVideo::video_event(int)
@@ -502,10 +504,10 @@ void eDVBVideo::video_event(int)
                if (retval < 0 && errno == EINTR) continue;
                if (retval <= 0) break;
                struct video_event evt;
-               eDebugNoNewLineStart("VIDEO_GET_EVENT - ");
+               eDebugNoNewLineStart("[eDVBVideo%d] VIDEO_GET_EVENT ", m_dev);
                if (::ioctl(m_fd, VIDEO_GET_EVENT, &evt) < 0)
                {
-                       eDebugNoNewLine("failed (%m)\n");
+                       eDebugNoNewLine("failed: %m\n");
                        break;
                }
                else
@@ -517,7 +519,7 @@ void eDVBVideo::video_event(int)
                                m_aspect = event.aspect = evt.u.size.aspect_ratio == 0 ? 2 : 3;  // convert dvb api to etsi
                                m_height = event.height = evt.u.size.h;
                                m_width = event.width = evt.u.size.w;
-                               eDebugNoNewLine("got SIZE_CHANGED %dx%d aspect %d\n", m_width, m_height, m_aspect);
+                               eDebugNoNewLine("SIZE_CHANGED %dx%d aspect %d\n", m_width, m_height, m_aspect);
                                /* emit */ m_event(event);
                        }
                        else if (evt.type == VIDEO_EVENT_FRAME_RATE_CHANGED)
@@ -525,7 +527,7 @@ void eDVBVideo::video_event(int)
                                struct iTSMPEGDecoder::videoEvent event;
                                event.type = iTSMPEGDecoder::videoEvent::eventFrameRateChanged;
                                m_framerate = event.framerate = evt.u.frame_rate;
-                               eDebugNoNewLine("got FRAME_RATE_CHANGED %d fps\n", m_framerate);
+                               eDebugNoNewLine("FRAME_RATE_CHANGED %d fps\n", m_framerate);
                                /* emit */ m_event(event);
                        }
                        else if (evt.type == 16 /*VIDEO_EVENT_PROGRESSIVE_CHANGED*/)
@@ -533,7 +535,7 @@ void eDVBVideo::video_event(int)
                                struct iTSMPEGDecoder::videoEvent event;
                                event.type = iTSMPEGDecoder::videoEvent::eventProgressiveChanged;
                                m_progressive = event.progressive = evt.u.frame_rate;
-                               eDebugNoNewLine("got PROGRESSIVE_CHANGED %d\n", m_progressive);
+                               eDebugNoNewLine("PROGRESSIVE_CHANGED %d\n", m_progressive);
                                /* emit */ m_event(event);
                        }
                        else
@@ -633,7 +635,7 @@ eDVBPCR::eDVBPCR(eDVBDemux *demux, int dev): m_demux(demux), m_dev(dev)
        sprintf(filename, "/dev/dvb/adapter%d/demux%d", demux->adapter, demux->demux);
        m_fd_demux = ::open(filename, O_RDWR | O_CLOEXEC);
        if (m_fd_demux < 0)
-               eWarning("%s: %m", filename);
+               eWarning("[eDVBPCR] %s: %m", filename);
 }
 
 int eDVBPCR::startPid(int pid)
@@ -661,17 +663,17 @@ int eDVBPCR::startPid(int pid)
                break;
        }
        pes.flags    = 0;
-       eDebugNoNewLineStart("DMX_SET_PES_FILTER(0x%02x) - pcr%d - ", pid, m_dev);
+       eDebugNoNewLineStart("[eDVBPCR%d] DMX_SET_PES_FILTER pid=0x%04x ", m_dev, pid);
        if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
        {
-               eDebugNoNewLine("failed (%m)\n");
+               eDebugNoNewLine("failed: %m\n");
                return -errno;
        }
        eDebugNoNewLine("ok\n");
-       eDebugNoNewLineStart("DEMUX_START - pcr - ");
+       eDebugNoNewLineStart("[eDVBPCR%d] DEMUX_START ", m_dev);
        if (::ioctl(m_fd_demux, DMX_START) < 0)
        {
-               eDebugNoNewLine("failed (%m)\n");
+               eDebugNoNewLine("failed: %m\n");
                return -errno;
        }
        eDebugNoNewLine("ok\n");
@@ -680,9 +682,9 @@ int eDVBPCR::startPid(int pid)
 
 void eDVBPCR::stop()
 {
-       eDebugNoNewLineStart("DEMUX_STOP - pcr - ");
+       eDebugNoNewLineStart("[eDVBPCR%d] DEMUX_STOP ", m_dev);
        if (::ioctl(m_fd_demux, DMX_STOP) < 0)
-               eDebugNoNewLine("failed(%m)\n");
+               eDebugNoNewLine("failed: %m\n");
        else
                eDebugNoNewLine("ok\n");
 }
@@ -691,6 +693,7 @@ eDVBPCR::~eDVBPCR()
 {
        if (m_fd_demux >= 0)
                ::close(m_fd_demux);
+       eDebug("[eDVBPCR%d] destroy", m_dev);
 }
 
 DEFINE_REF(eDVBTText);
@@ -702,7 +705,7 @@ eDVBTText::eDVBTText(eDVBDemux *demux, int dev)
        sprintf(filename, "/dev/dvb/adapter%d/demux%d", demux->adapter, demux->demux);
        m_fd_demux = ::open(filename, O_RDWR | O_CLOEXEC);
        if (m_fd_demux < 0)
-               eWarning("%s: %m", filename);
+               eWarning("[eDVBText] %s: %m", filename);
 }
 
 int eDVBTText::startPid(int pid)
@@ -731,17 +734,17 @@ int eDVBTText::startPid(int pid)
        }
        pes.flags    = 0;
 
-       eDebugNoNewLineStart("DMX_SET_PES_FILTER(0x%02x) - ttx%d - ", pid, m_dev);
+       eDebugNoNewLineStart("[eDVBText%d] DMX_SET_PES_FILTER pid=0x%04x ", m_dev, pid);
        if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
        {
-               eDebugNoNewLine("failed(%m)\n");
+               eDebugNoNewLine("failed: %m\n");
                return -errno;
        }
        eDebugNoNewLine("ok\n");
-       eDebugNoNewLineStart("DEMUX_START - ttx - ");
+       eDebugNoNewLineStart("[eDVBText%d] DEMUX_START ", m_dev);
        if (::ioctl(m_fd_demux, DMX_START) < 0)
        {
-               eDebugNoNewLine("failed(%m)\n");
+               eDebugNoNewLine("failed: %m\n");
                return -errno;
        }
        eDebugNoNewLine("ok\n");
@@ -750,9 +753,9 @@ int eDVBTText::startPid(int pid)
 
 void eDVBTText::stop()
 {
-       eDebugNoNewLineStart("DEMUX_STOP - ttx - ");
+       eDebugNoNewLineStart("[eDVBText%d] DEMUX_STOP ", m_dev);
        if (::ioctl(m_fd_demux, DMX_STOP) < 0)
-               eDebugNoNewLine("failed(%m)\n");
+               eDebugNoNewLine("failed: %m\n");
        else
                eDebugNoNewLine("ok\n");
 }
@@ -761,6 +764,7 @@ eDVBTText::~eDVBTText()
 {
        if (m_fd_demux >= 0)
                ::close(m_fd_demux);
+       eDebug("[eDVBText%d] destroy", m_dev);
 }
 
 DEFINE_REF(eTSMPEGDecoder);
@@ -779,7 +783,7 @@ int eTSMPEGDecoder::setState()
                m_changed |= changeText | changeState;
 
        const char *decoder_states[] = {"stop", "pause", "play", "decoderfastforward", "trickmode", "slowmotion"};
-       eDebug("decoder state: %s, vpid=%d, apid=%d", decoder_states[m_state], m_vpid, m_apid);
+       eDebug("[eTSMPEGDecoder] decoder state: %s, vpid=%04x, apid=%04x", decoder_states[m_state], m_vpid, m_apid);
 
        int changed = m_changed;
        if (m_changed & changePCR)
@@ -1013,7 +1017,7 @@ RESULT eTSMPEGDecoder::setAudioChannel(int channel)
                        m_audio_channel=channel;
                }
                else
-                       eDebug("eTSMPEGDecoder::setAudioChannel but no audio decoder exist");
+                       eDebug("[eTSMPEGDecoder] setAudioChannel but no audio decoder exist");
        }
        return 0;
 }
@@ -1180,7 +1184,7 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
 {
        if (m_decoder == 0)
        {
-               eDebug("showSinglePic %s", filename);
+               eDebug("[eTSMPEGDecoder] showSinglePic %s", filename);
                int f = open(filename, O_RDONLY);
                if (f >= 0)
                {
@@ -1205,15 +1209,15 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
                                        streamtype = VIDEO_STREAMTYPE_MPEG2;
 
                                if (ioctl(m_video_clip_fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY) < 0)
-                                       eDebug("VIDEO_SELECT_SOURCE MEMORY failed (%m)");
+                                       eDebug("[eTSMPEGDecoder] VIDEO_SELECT_SOURCE MEMORY failed: %m");
                                if (ioctl(m_video_clip_fd, VIDEO_SET_STREAMTYPE, streamtype) < 0)
-                                       eDebug("VIDEO_SET_STREAMTYPE failed(%m)");
+                                       eDebug("[eTSMPEGDecoder] VIDEO_SET_STREAMTYPE failed: %m");
                                if (ioctl(m_video_clip_fd, VIDEO_PLAY) < 0)
-                                       eDebug("VIDEO_PLAY failed (%m)");
+                                       eDebug("[eTSMPEGDecoder] VIDEO_PLAY failed: %m");
                                if (ioctl(m_video_clip_fd, VIDEO_CONTINUE) < 0)
-                                       eDebug("video: VIDEO_CONTINUE: %m");
+                                       eDebug("[eTSMPEGDecoder] VIDEO_CONTINUE: %m");
                                if (ioctl(m_video_clip_fd, VIDEO_CLEAR_BUFFER) < 0)
-                                       eDebug("video: VIDEO_CLEAR_BUFFER: %m");
+                                       eDebug("[eTSMPEGDecoder] VIDEO_CLEAR_BUFFER: %m");
                                while(pos <= (s.st_size-4) && !(seq_end_avail = (!iframe[pos] && !iframe[pos+1] && iframe[pos+2] == 1 && iframe[pos+3] == 0xB7)))
                                        ++pos;
                                if ((iframe[3] >> 4) != 0xE) // no pes header
@@ -1230,13 +1234,13 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
                }
                else
                {
-                       eDebug("couldnt open %s", filename);
+                       eDebug("[eTSMPEGDecoder] couldnt open %s: %m", filename);
                        return -1;
                }
        }
        else
        {
-               eDebug("only show single pics on first decoder");
+               eDebug("[eTSMPEGDecoder] only show single pics on first decoder");
                return -1;
        }
        return 0;
@@ -1247,9 +1251,9 @@ void eTSMPEGDecoder::finishShowSinglePic()
        if (m_video_clip_fd >= 0)
        {
                if (ioctl(m_video_clip_fd, VIDEO_STOP, 0) < 0)
-                       eDebug("VIDEO_STOP failed (%m)");
+                       eDebug("[eTSMPEGDecoder] VIDEO_STOP failed: %m");
                if (ioctl(m_video_clip_fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX) < 0)
-                               eDebug("VIDEO_SELECT_SOURCE DEMUX failed (%m)");
+                               eDebug("[eTSMPEGDecoder] VIDEO_SELECT_SOURCE DEMUX failed: %m");
                close(m_video_clip_fd);
                m_video_clip_fd = -1;
        }
index 0b37930..f88b46b 100644 (file)
@@ -54,6 +54,7 @@ int eDVBDemux::openDemux(void)
 {
        char filename[32];
        snprintf(filename, sizeof(filename), "/dev/dvb/adapter%d/demux%d", adapter, demux);
+       eDebug("[eDVBDemux] open demux %s", filename);
        return ::open(filename, O_RDWR | O_CLOEXEC);
 }
 
@@ -64,6 +65,7 @@ int eDVBDemux::openDVR(int flags)
 #else
        char filename[32];
        snprintf(filename, sizeof(filename), "/dev/dvb/adapter%d/dvr%d", adapter, demux);
+       eDebug("[eDVBDemux] open dvr %s", filename);
        return ::open(filename, flags);
 #endif
 }
@@ -77,7 +79,7 @@ RESULT eDVBDemux::setSourceFrontend(int fenum)
        int n = DMX_SOURCE_FRONT0 + fenum;
        int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
        if (res)
-               eDebug("DMX_SET_SOURCE failed! - %m");
+               eDebug("[eDVBDemux] DMX_SET_SOURCE Frontend%d failed: %m", fenum);
        else
                source = fenum;
        ::close(fd);
@@ -90,6 +92,8 @@ RESULT eDVBDemux::setSourcePVR(int pvrnum)
        if (fd < 0) return -1;
        int n = DMX_SOURCE_DVR0 + pvrnum;
        int res = ::ioctl(fd, DMX_SET_SOURCE, &n);
+       if (res)
+               eDebug("[eDVBDemux] DMX_SET_SOURCE dvr%d failed: %m", pvrnum);
        source = -1;
        ::close(fd);
        return res;
@@ -140,14 +144,14 @@ RESULT eDVBDemux::getSTC(pts_t &pts, int num)
 
        if (ioctl(fd, DMX_GET_STC, &stc) < 0)
        {
-               eDebug("DMX_GET_STC failed!");
+               eDebug("[eDVBDemux] DMX_GET_STC failed: %m");
                ::close(fd);
                return -1;
        }
 
        pts = stc.stc;
 
-       eDebug("DMX_GET_STC - %lld", pts);
+       eDebug("[eDVBDemux] DMX_GET_STC - %lld", pts);
 
        ::close(fd);
        return 0;
@@ -174,7 +178,7 @@ void eDVBSectionReader::data(int)
        r = ::read(fd, data, 4096);
        if(r < 0)
        {
-               eWarning("ERROR reading section - %m\n");
+               eWarning("[eDVBSectionReader] ERROR reading section - %m\n");
                return;
        }
        if (checkcrc)
@@ -183,14 +187,14 @@ void eDVBSectionReader::data(int)
                unsigned int c;
                if ((c = crc32((unsigned)-1, data, r)))
                {
-                       eDebug("crc32 failed! is %x\n", c);
+                       eDebug("[eDVBSectionReader] section crc32 failed! is %x\n", c);
                        return;
                }
        }
        if (active)
                read(data);
        else
-               eDebug("data.. but not active");
+               eDebug("[eDVBSectionReader] data.. but not active");
 }
 
 eDVBSectionReader::eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res): demux(demux), active(0)
@@ -204,7 +208,7 @@ eDVBSectionReader::eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESUL
                res = 0;
        } else
        {
-               perror("demux->openDemux failed");
+               eWarning("[eDVBSectionReader] demux->openDemux failed: %m");
                res = errno;
        }
 }
@@ -221,7 +225,7 @@ RESULT eDVBSectionReader::setBufferSize(int size)
 {
        int res=::ioctl(fd, DMX_SET_BUFFER_SIZE, size);
        if (res < 0)
-               eDebug("eDVBSectionReader DMX_SET_BUFFER_SIZE failed(%m)");
+               eDebug("[eDVBSectionReader] DMX_SET_BUFFER_SIZE %d failed: %m", size);
        return res;
 }
 
@@ -231,6 +235,7 @@ RESULT eDVBSectionReader::start(const eDVBSectionFilterMask &mask)
        if (fd < 0)
                return -ENODEV;
 
+       eDebug("[eDVBSectionReader] DMX_SET_FILTER pid=%d", mask.pid);
        notifier->start();
 
        dmx_sct_filter_params sct;
@@ -289,14 +294,14 @@ void eDVBPESReader::data(int)
                {
                        if (errno == EAGAIN || errno == EINTR) /* ok */
                                return;
-                       eWarning("ERROR reading PES (fd=%d) - %m", m_fd);
+                       eWarning("[eDVBPESReader] ERROR reading PES (fd=%d): %m", m_fd);
                        return;
                }
 
                if (m_active)
                        m_read(buffer, r);
                else
-                       eWarning("PES reader not active");
+                       eWarning("[eDVBPESReader] PES reader not active");
                if (r != 16384)
                        break;
        }
@@ -304,6 +309,7 @@ void eDVBPESReader::data(int)
 
 eDVBPESReader::eDVBPESReader(eDVBDemux *demux, eMainloop *context, RESULT &res): m_demux(demux), m_active(0)
 {
+       eWarning("[eDVBPESReader] Created. Opening demux");
        m_fd = m_demux->openDemux();
        if (m_fd >= 0)
        {
@@ -314,7 +320,7 @@ eDVBPESReader::eDVBPESReader(eDVBDemux *demux, eMainloop *context, RESULT &res):
                res = 0;
        } else
        {
-               perror("openDemux");
+               eWarning("[eDVBPESReader] openDemux failed: %m");
                res = errno;
        }
 }
@@ -323,7 +329,7 @@ RESULT eDVBPESReader::setBufferSize(int size)
 {
        int res = ::ioctl(m_fd, DMX_SET_BUFFER_SIZE, size);
        if (res < 0)
-               eDebug("eDVBPESReader DMX_SET_BUFFER_SIZE failed(%m)");
+               eDebug("[eDVBPESReader] DMX_SET_BUFFER_SIZE %d failed: %m", size);
        return res;
 }
 
@@ -341,6 +347,7 @@ RESULT eDVBPESReader::start(int pid)
        if (m_fd < 0)
                return -ENODEV;
 
+       eDebug("[eDVBPESReader] DMX_SET_PES_FILTER pid=%04x", pid);
        m_notifier->start();
 
        dmx_pes_filter_params flt;
@@ -354,7 +361,7 @@ RESULT eDVBPESReader::start(int pid)
        res = ::ioctl(m_fd, DMX_SET_PES_FILTER, &flt);
 
        if (res)
-               eWarning("PES filter: DMX_SET_PES_FILTER - %m");
+               eWarning("[eDVBPESReader] DMX_SET_PES_FILTER pid=%04x:  %m", pid);
        if (!res)
                m_active = 1;
        return res;
@@ -390,7 +397,7 @@ eDVBRecordFileThread::eDVBRecordFileThread(int packetsize, int bufferCount):
         m_buffer_use_histogram(bufferCount+1, 0)
 {
        if (m_buffer == MAP_FAILED)
-               eFatal("Failed to allocate filepush buffer, contact MiLo\n");
+               eFatal("[eDVBRecordFileThread] Failed to allocate filepush buffer, contact MiLo\n");
        // m_buffer actually points to a data block large enough to hold ALL buffers. m_buffer will
        // move around during writes, so we must remember where the "head" is.
        m_allocated_buffer = m_buffer;
@@ -580,7 +587,8 @@ void eDVBRecordFileThread::flush()
        eDebug("[eDVBRecordFileThread] buffer usage histogram (%d buffers of %d kB)", bufferCount, m_buffersize>>10);
        for (int i=0; i <= bufferCount; ++i)
        {
-               if (m_buffer_use_histogram[i] != 0) eDebug("     %2d: %6d", i, m_buffer_use_histogram[i]);
+               if (m_buffer_use_histogram[i] != 0)
+                       eDebug("[eDVBRecordFileThread]  %2d: %6d", i, m_buffer_use_histogram[i]);
        }
        if (m_overflow_count)
        {
@@ -692,7 +700,7 @@ RESULT eDVBTSRecorder::start()
 
        if (m_source_fd < 0)
        {
-               eDebug("FAILED to open demux (%s) in ts recoder (%m)", filename);
+               eDebug("[eDVBTSRecorder] FAILED to open demux %s: %m", filename);
                return -3;
        }
 
@@ -708,7 +716,7 @@ RESULT eDVBTSRecorder::start()
        int res = ::ioctl(m_source_fd, DMX_SET_PES_FILTER, &flt);
        if (res)
        {
-               eDebug("DMX_SET_PES_FILTER: %m");
+               eDebug("[eDVBTSRecorder] DMX_SET_PES_FILTER pid=%04x: %m", flt.pid);
                ::close(m_source_fd);
                m_source_fd = -1;
                return -3;
@@ -734,7 +742,7 @@ RESULT eDVBTSRecorder::setBufferSize(int size)
 {
        int res = ::ioctl(m_source_fd, DMX_SET_BUFFER_SIZE, size);
        if (res < 0)
-               eDebug("eDVBTSRecorder DMX_SET_BUFFER_SIZE failed(%m)");
+               eDebug("[eDVBTSRecorder] DMX_SET_BUFFER_SIZE %d failed: %m", size);
        return res;
 }
 
@@ -805,12 +813,12 @@ RESULT eDVBTSRecorder::stop()
        if (m_source_fd >= 0)
        {
                if (::ioctl(m_source_fd, DMX_STOP) < 0)
-                       perror("DMX_STOP");
+                       eWarning("[eDVBTSRecorder] DMX_STOP: %m");
                else
                        state &= ~1;
 
                if (::close(m_source_fd) < 0)
-                       perror("close");
+                       eWarning("[eDVBTSRecorder] close: %m");
                else
                        state &= ~2;
                m_source_fd = -1;
@@ -864,9 +872,9 @@ RESULT eDVBTSRecorder::startPID(int pid)
        while(true) {
                uint16_t p = pid;
                if (::ioctl(m_source_fd, DMX_ADD_PID, &p) < 0) {
-                       perror("DMX_ADD_PID");
+                       eWarning("[eDVBTSRecorder] DMX_ADD_PID pid=%04x: %m", pid);
                        if (errno == EAGAIN || errno == EINTR) {
-                               eDebug("retry!");
+                               eDebug("[eDVBTSRecorder] retry!");
                                continue;
                        }
                } else
@@ -883,9 +891,9 @@ void eDVBTSRecorder::stopPID(int pid)
                while(true) {
                        uint16_t p = pid;
                        if (::ioctl(m_source_fd, DMX_REMOVE_PID, &p) < 0) {
-                               perror("DMX_REMOVE_PID");
+                               eWarning("[eDVBTSRecorder] DMX_REMOVE_PID pid=%04x: %m", pid);
                                if (errno == EAGAIN || errno == EINTR) {
-                                       eDebug("retry!");
+                                       eDebug("[eDVBTSRecorder] retry!");
                                        continue;
                                }
                        }
index 08a2a4e..ceff939 100644 (file)
@@ -993,7 +993,7 @@ RESULT eDVBResourceManager::allocateDemux(eDVBRegisteredFrontend *fe, ePtr<eDVBA
        {
                unused->m_demux->getCAAdapterID(a);
                unused->m_demux->getCADemuxID(d);
-               eDebug("[eDVBResourceManager] allocating demux adapter=%d, demux=%d, source=%d", a, d, unused->m_demux->getSource());
+               eDebug("[eDVBResourceManager] allocating demux adapter=%d, demux=%d, source=%d fesource=%d", a, d, unused->m_demux->getSource(), fe ? fe->m_frontend->getDVBID() : -1);
                demux = new eDVBAllocatedDemux(unused);
                if (fe)
                        demux->get().setSourceFrontend(fe->m_frontend->getDVBID());
@@ -2063,7 +2063,7 @@ RESULT eDVBChannel::playFile(const char *file)
 
        if (f->open(file) < 0)
        {
-               eDebug("[eDVBChannel] can't open PVR file %s (%m)", file);
+               eDebug("[eDVBChannel] can't open PVR file %s: %m", file);
                return -ENOENT;
        }
 
@@ -2099,7 +2099,7 @@ RESULT eDVBChannel::playSource(ePtr<iTsSource> &source, const char *streaminfo_f
                m_pvr_fd_dst = open("/dev/misc/pvr", O_WRONLY);
                if (m_pvr_fd_dst < 0)
                {
-                       eDebug("[eDVBChannel] can't open /dev/misc/pvr - %m"); // or wait for the driver to be improved.
+                       eDebug("[eDVBChannel] can't open /dev/misc/pvr: %m"); // or wait for the driver to be improved.
                        return -ENODEV;
                }
 #else
@@ -2109,7 +2109,7 @@ RESULT eDVBChannel::playSource(ePtr<iTsSource> &source, const char *streaminfo_f
                        m_pvr_fd_dst = demux->get().openDVR(O_WRONLY);
                        if (m_pvr_fd_dst < 0)
                        {
-                               eDebug("[eDVBChannel] can't open /dev/dvb/adapterX/dvrX - you need to buy the new(!) $$$ box! (%m)"); // or wait for the driver to be improved.
+                               eDebug("[eDVBChannel] can't open /dev/dvb/adapterX/dvrX: %m"); // or wait for the driver to be improved.
                                return -ENODEV;
                        }
                }
index 5e0a264..0467898 100644 (file)
@@ -23,7 +23,7 @@ void setRTC(time_t time)
                if (fprintf(f, "%u", (unsigned int)time))
                        prev_time = time;
                else
-                       eDebug("write /proc/stb/fp/rtc failed (%m)");
+                       eDebug("[eDVBLocalTimeHandler] write /proc/stb/fp/rtc failed: %m");
                fclose(f);
        }
        else
@@ -32,7 +32,7 @@ void setRTC(time_t time)
                if ( fd >= 0 )
                {
                        if ( ::ioctl(fd, FP_IOCTL_SET_RTC, (void*)&time ) < 0 )
-                               eDebug("FP_IOCTL_SET_RTC failed(%m)");
+                               eDebug("[eDVBLocalTimeHandler] FP_IOCTL_SET_RTC failed: %m");
                        else
                                prev_time = time;
                        close(fd);
@@ -49,7 +49,7 @@ time_t getRTC()
                // sanity check to detect corrupt atmel firmware
                unsigned int tmp;
                if (fscanf(f, "%u", &tmp) != 1)
-                       eDebug("read /proc/stb/fp/rtc failed (%m)");
+                       eDebug("[eDVBLocalTimeHandler] read /proc/stb/fp/rtc failed: %m");
                else
                        rtc_time=tmp;
                fclose(f);
@@ -60,7 +60,7 @@ time_t getRTC()
                if ( fd >= 0 )
                {
                        if ( ::ioctl(fd, FP_IOCTL_GET_RTC, (void*)&rtc_time ) < 0 )
-                               eDebug("FP_IOCTL_GET_RTC failed(%m)");
+                               eDebug("[eDVBLocalTimeHandler] FP_IOCTL_GET_RTC failed: %m");
                        close(fd);
                }
        }
@@ -188,10 +188,10 @@ eDVBLocalTimeHandler::eDVBLocalTimeHandler()
                res_mgr->connectChannelAdded(slot(*this,&eDVBLocalTimeHandler::DVBChannelAdded), m_chanAddedConn);
                time_t now = time(0);
                if ( now < 1072224000 ) // 01.01.2004
-                       eDebug("RTC not ready... wait for transponder time");
+                       eDebug("[eDVBLocalTimeHandler] RTC not ready... wait for transponder time");
                else // inform all who's waiting for valid system time..
                {
-                       eDebug("Use valid Linux Time :) (RTC?)");
+                       eDebug("[eDVBLocalTimeHandler] Use valid Linux Time :) (RTC?)");
                        m_time_ready = true;
                        /*emit*/ m_timeUpdated();
                }
@@ -204,7 +204,7 @@ eDVBLocalTimeHandler::~eDVBLocalTimeHandler()
        instance=0;
        if (ready())
        {
-               eDebug("set RTC to previous valid time");
+               eDebug("[eDVBLocalTimeHandler] set RTC to previous valid time");
                setRTC(::time(0));
        }
 }
index f82c615..05dfd68 100644 (file)
@@ -357,7 +357,7 @@ void eventData::save(FILE *f)
 void eventData::cacheCorrupt(const char* context)
 {
 
-       eDebug("WARNING: EPG Cache is corrupt (%s), you should restart Enigma!", context);
+       eDebug("[eventData] EPG Cache is corrupt (%s), you should restart Enigma!", context);
        if (!isCacheCorrupt)
        {
                isCacheCorrupt = true;
@@ -378,7 +378,7 @@ DEFINE_REF(eEPGCache)
 eEPGCache::eEPGCache()
        :messages(this,1), cleanTimer(eTimer::create(this)), m_running(false)
 {
-       eDebug("[EPGC] Initialized EPGCache (wait for setCacheFile call now)");
+       eDebug("[eEPGCache] Initialized EPGCache (wait for setCacheFile call now)");
 
        enabledSources = 0;
        historySeconds = 0;
@@ -411,7 +411,7 @@ void eEPGCache::setCacheFile(const char *path)
        m_filename = path;
        if (!inited)
        {
-               eDebug("[EPGC] setCacheFile read/write epg data from/to '%s'", m_filename.c_str());
+               eDebug("[eEPGCache] setCacheFile read/write epg data from/to '%s'", m_filename.c_str());
                if (eDVBLocalTimeHandler::getInstance()->ready())
                        timeUpdated();
        }
@@ -423,7 +423,7 @@ void eEPGCache::timeUpdated()
        {
                if (!m_running)
                {
-                       eDebug("[EPGC] time updated.. start EPG Mainloop");
+                       eDebug("[eEPGCache] time updated.. start EPG Mainloop");
                        run();
                        m_running = true;
                        singleLock s(channel_map_lock);
@@ -439,7 +439,7 @@ void eEPGCache::timeUpdated()
                        messages.send(Message(Message::timeChanged));
        }
        else
-               eDebug("[EPGC] time updated.. but cache file not set yet.. dont start epg!!");
+               eDebug("[eEPGCache] time updated.. but cache file not set yet.. dont start epg!!");
 }
 
 void eEPGCache::DVBChannelAdded(eDVBChannel *chan)
@@ -656,7 +656,7 @@ bool eEPGCache::FixOverlapping(EventCacheItem &servicemap, time_t TM, int durati
                        Event evt((uint8_t*)tmp->second->get());
                        eServiceEvent event;
                        event.parseFrom(&evt, service.sid<<16|service.onid);
-                       eDebug("(1)erase no more used event %04x %d\n%s %s\n%s",
+                       eDebug("[eEPGCache] (1)erase no more used event %04x %d\n%s %s\n%s",
                                service.sid, event_id,
                                event.getBeginTimeString().c_str(),
                                event.getEventName().c_str(),
@@ -691,7 +691,7 @@ bool eEPGCache::FixOverlapping(EventCacheItem &servicemap, time_t TM, int durati
                        Event evt((uint8_t*)tmp->second->get());
                        eServiceEvent event;
                        event.parseFrom(&evt, service.sid<<16|service.onid);
-                       eDebug("(2)erase no more used event %04x %d\n%s %s\n%s",
+                       eDebug("[eEPGCache] (2)erase no more used event %04x %d\n%s %s\n%s",
                                service.sid, event_id,
                                event.getBeginTimeString().c_str(),
                                event.getEventName().c_str(),
@@ -805,7 +805,7 @@ void eEPGCache::sectionRead(const uint8_t *data, int source, channel_data *chann
                        eventMap::iterator ev_it =
                                servicemap.byEvent.find(event_id);
 
-//                     eDebug("event_id is %d sid is %04x", event_id, service.sid);
+//                     eDebug("[eEPGCache] event_id is %d sid is %04x", event_id, service.sid);
 
                        // entry with this event_id is already exist ?
                        if ( ev_it != servicemap.byEvent.end() )
@@ -906,18 +906,18 @@ void eEPGCache::sectionRead(const uint8_t *data, int source, channel_data *chann
                        if ( consistencyCheck )
                        {
                                if ( tm_it->second != evt || ev_it->second != evt )
-                                       eFatal("tm_it->second != ev_it->second");
+                                       eFatal("[eEPGCache] tm_it->second != ev_it->second");
                                else if ( tm_it->second->getStartTime() != tm_it->first )
-                                       eFatal("event start_time(%d) non equal timemap key(%d)",
+                                       eFatal("[eEPGCache] event start_time(%d) non equal timemap key(%d)",
                                                tm_it->second->getStartTime(), tm_it->first );
                                else if ( tm_it->first != TM )
-                                       eFatal("timemap key(%d) non equal TM(%d)",
+                                       eFatal("[eEPGCache] timemap key(%d) non equal TM(%d)",
                                                tm_it->first, TM);
                                else if ( ev_it->second->getEventID() != ev_it->first )
-                                       eFatal("event_id (%d) non equal event_map key(%d)",
+                                       eFatal("[eEPGCache] event_id (%d) non equal event_map key(%d)",
                                                ev_it->second->getEventID(), ev_it->first);
                                else if ( ev_it->first != event_id )
-                                       eFatal("eventmap key(%d) non equal event_id(%d)",
+                                       eFatal("[eEPGCache] eventmap key(%d) non equal event_id(%d)",
                                                ev_it->first, event_id );
                        }
 #endif
@@ -949,7 +949,7 @@ next:
                                                i++, (int)it->first, (int)it->second->getStartTime(), (int)it->second->getEventID(), it->second );
                                }
                        }
-                       eFatal("(1)map sizes not equal :( sid %04x tsid %04x onid %04x size %d size2 %d",
+                       eFatal("[eEPGCache] (1)map sizes not equal :( sid %04x tsid %04x onid %04x size %d size2 %d",
                                service.sid, service.tsid, service.onid,
                                servicemap.first.size(), servicemap.second.size() );
                }
@@ -961,7 +961,7 @@ next:
 
 void eEPGCache::flushEPG(const uniqueEPGKey & s)
 {
-       eDebug("[EPGC] flushEPG %d", (int)(bool)s);
+       eDebug("[eEPGCache] flushEPG %d", (int)(bool)s);
        singleLock l(cache_lock);
        if (s)  // clear only this service
        {
@@ -1029,15 +1029,15 @@ void eEPGCache::cleanLoop()
                                        if ( b != DBIt->second.byEvent.end() )
                                        {
                                                // release Heap Memory for this entry   (new ....)
-//                                             eDebug("[EPGC] delete old event (evmap)");
+//                                             eDebug("[eEPGCache] delete old event (evmap)");
                                                DBIt->second.byEvent.erase(b);
                                        }
 
                                        // remove entry from timeMap
-//                                     eDebug("[EPGC] release heap mem");
+//                                     eDebug("[eEPGCache] release heap mem");
                                        delete It->second;
                                        DBIt->second.byTime.erase(It++);
-//                                     eDebug("[EPGC] delete old event (timeMap)");
+//                                     eDebug("[eEPGCache] delete old event (timeMap)");
                                        updated = true;
                                }
                                else
@@ -1138,9 +1138,9 @@ void eEPGCache::gotMessage( const Message &msg )
                                                update = ZAP_DELAY;
                                        data->startPrivateTimer->start(update, 1);
                                        if (update >= 60000)
-                                               eDebug("[EPGC] next private update in %i min", update/60000);
+                                               eDebug("[eEPGCache] next private update in %i min", update/60000);
                                        else if (update >= 1000)
-                                               eDebug("[EPGC] next private update in %i sec", update/1000);
+                                               eDebug("[eEPGCache] next private update in %i sec", update/1000);
                                        break;
                                }
                        }
@@ -1160,7 +1160,7 @@ void eEPGCache::gotMessage( const Message &msg )
                                        chid.original_network_id.get() == msg.service.onid )
                                {
                                        data->m_mhw2_channel_pid = msg.pid;
-                                       eDebug("[EPGC] got mhw2 channel pid %04x", msg.pid);
+                                       eDebug("[eEPGCache] got mhw2 channel pid %04x", msg.pid);
                                        break;
                                }
                        }
@@ -1178,7 +1178,7 @@ void eEPGCache::gotMessage( const Message &msg )
                                        chid.original_network_id.get() == msg.service.onid )
                                {
                                        data->m_mhw2_title_pid = msg.pid;
-                                       eDebug("[EPGC] got mhw2 title pid %04x", msg.pid);
+                                       eDebug("[eEPGCache] got mhw2 title pid %04x", msg.pid);
                                        break;
                                }
                        }
@@ -1196,7 +1196,7 @@ void eEPGCache::gotMessage( const Message &msg )
                                        chid.original_network_id.get() == msg.service.onid )
                                {
                                        data->m_mhw2_summary_pid = msg.pid;
-                                       eDebug("[EPGC] got mhw2 summary pid %04x", msg.pid);
+                                       eDebug("[eEPGCache] got mhw2 summary pid %04x", msg.pid);
                                        break;
                                }
                        }
@@ -1207,7 +1207,7 @@ void eEPGCache::gotMessage( const Message &msg )
                        cleanLoop();
                        break;
                default:
-                       eDebug("unhandled EPGCache Message!!");
+                       eDebug("[eEPGCache] unhandled EPGCache Message!!");
                        break;
        }
 }
@@ -1236,7 +1236,7 @@ void eEPGCache::load()
        if (f == NULL)
        {
                /* No EPG on harddisk, so try internal flash */
-               eDebug("[EPGC] %s not found, try /epg.dat", EPGDAT);
+               eDebug("[eEPGCache] %s not found, try /epg.dat", EPGDAT);
                EPGDAT = EPGDAT_IN_FLASH;
                f = fopen(EPGDAT, "rb");
                if (f == NULL)
@@ -1247,7 +1247,7 @@ void eEPGCache::load()
        {
                unlink(EPGDATX);
                renameResult = rename(EPGDAT, EPGDATX);
-               if (renameResult) eDebug("[EPGC] failed to rename %s", EPGDAT);
+               if (renameResult) eDebug("[eEPGCache] failed to rename %s", EPGDAT);
        }
        {
                int size=0;
@@ -1257,7 +1257,7 @@ void eEPGCache::load()
                fread( &magic, sizeof(int), 1, f);
                if (magic != 0x98765432)
                {
-                       eDebug("[EPGC] epg file has incorrect byte order.. dont read it");
+                       eDebug("[eEPGCache] epg file has incorrect byte order.. dont read it");
                        fclose(f);
                        return;
                }
@@ -1297,7 +1297,7 @@ void eEPGCache::load()
                                }
                        }
                        eventData::load(f);
-                       eDebug("[EPGC] %d events read from %s", cnt, EPGDAT);
+                       eDebug("[eEPGCache] %d events read from %s", cnt, EPGDAT);
 #ifdef ENABLE_PRIVATE_EPG
                        char text2[11];
                        fread( text2, 11, 1, f);
@@ -1337,14 +1337,14 @@ void eEPGCache::load()
 #endif // ENABLE_PRIVATE_EPG
                }
                else
-                       eDebug("[EPGC] don't read old epg database");
+                       eDebug("[eEPGCache] don't read old epg database");
                posix_fadvise(fileno(f), 0, 0, POSIX_FADV_DONTNEED);
                fclose(f);
                // We got this far, so the EPG file is okay.
                if (renameResult == 0)
                {
                        renameResult = rename(EPGDATX, EPGDAT);
-                       if (renameResult) eDebug("[EPGC] failed to rename epg.dat back");
+                       if (renameResult) eDebug("[eEPGCache] failed to rename epg.dat back");
                }
        }
 }
@@ -1362,7 +1362,7 @@ void eEPGCache::save()
        FILE *f = fopen(EPGDAT, "wb");
        if (!f)
        {
-               eDebug("[EPGC] Failed to open '%s' (%m)", EPGDAT);
+               eDebug("[eEPGCache] Failed to open %s: %m", EPGDAT);
                EPGDAT = EPGDAT_IN_FLASH;
                f = fopen(EPGDAT, "wb");
                if (!f)
@@ -1372,17 +1372,17 @@ void eEPGCache::save()
        char* buf = realpath(EPGDAT, NULL);
        if (!buf)
        {
-               eDebug("[EPGC] realpath to '%s' failed in save (%m)", EPGDAT);
+               eDebug("[eEPGCache] realpath to %s failed in save: %m", EPGDAT);
                fclose(f);
                return;
        }
 
-       eDebug("[EPGC] store epg to realpath '%s'", buf);
+       eDebug("[eEPGCache] store epg to realpath '%s'", buf);
 
        struct statfs s;
        off64_t tmp;
        if (statfs(buf, &s) < 0) {
-               eDebug("[EPGC] statfs '%s' failed in save (%m)", buf);
+               eDebug("[eEPGCache] statfs %s failed in save: %m", buf);
                fclose(f);
                free(buf);
                return;
@@ -1395,7 +1395,7 @@ void eEPGCache::save()
        tmp*=s.f_bsize;
        if ( tmp < (eventData::CacheSize*12)/10 ) // 20% overhead
        {
-               eDebug("[EPGC] not enough free space at '%s' %lld bytes available but %u needed", buf, tmp, (eventData::CacheSize*12)/10);
+               eDebug("[eEPGCache] not enough free space at '%s' %lld bytes available but %u needed", buf, tmp, (eventData::CacheSize*12)/10);
                fclose(f);
                return;
        }
@@ -1423,7 +1423,7 @@ void eEPGCache::save()
                        ++cnt;
                }
        }
-       eDebug("[EPGC] %d events written to %s", cnt, EPGDAT);
+       eDebug("[eEPGCache] %d events written to %s", cnt, EPGDAT);
        eventData::save(f);
 #ifdef ENABLE_PRIVATE_EPG
        const char* text3 = "PRIVATE_EPG";
@@ -1485,9 +1485,9 @@ void eEPGCache::channel_data::finishEPG()
 {
        if (!isRunning)  // epg ready
        {
-               eDebug("[EPGC] stop caching events(%ld)", ::time(0));
+               eDebug("[eEPGCache] stop caching events(%ld)", ::time(0));
                zapTimer->start(UPDATE_INTERVAL, 1);
-               eDebug("[EPGC] next update in %i min", UPDATE_INTERVAL / 60000);
+               eDebug("[eEPGCache] next update in %i min", UPDATE_INTERVAL / 60000);
                for (unsigned int i=0; i < sizeof(seenSections)/sizeof(tidMap); ++i)
                {
                        seenSections[i].clear();
@@ -1506,7 +1506,7 @@ void eEPGCache::channel_data::finishEPG()
 
 void eEPGCache::channel_data::startEPG()
 {
-       eDebug("[EPGC] start caching events(%ld)", ::time(0));
+       eDebug("[eEPGCache] start caching events(%ld)", ::time(0));
        state=0;
        haveData=0;
        for (unsigned int i=0; i < sizeof(seenSections)/sizeof(tidMap); ++i)
@@ -1663,21 +1663,21 @@ void eEPGCache::channel_data::abortNonAvail()
        {
                if ( !(haveData&NOWNEXT) && (isRunning&NOWNEXT) )
                {
-                       eDebug("[EPGC] abort non avail nownext reading");
+                       eDebug("[eEPGCache] abort non avail nownext reading");
                        isRunning &= ~NOWNEXT;
                        m_NowNextReader->stop();
                        m_NowNextConn=0;
                }
                if ( !(haveData&SCHEDULE) && (isRunning&SCHEDULE) )
                {
-                       eDebug("[EPGC] abort non avail schedule reading");
+                       eDebug("[eEPGCache] abort non avail schedule reading");
                        isRunning &= ~SCHEDULE;
                        m_ScheduleReader->stop();
                        m_ScheduleConn=0;
                }
                if ( !(haveData&SCHEDULE_OTHER) && (isRunning&SCHEDULE_OTHER) )
                {
-                       eDebug("[EPGC] abort non avail schedule other reading");
+                       eDebug("[eEPGCache] abort non avail schedule other reading");
                        isRunning &= ~SCHEDULE_OTHER;
                        m_ScheduleOtherReader->stop();
                        m_ScheduleOtherConn=0;
@@ -1685,14 +1685,14 @@ void eEPGCache::channel_data::abortNonAvail()
 #ifdef ENABLE_VIRGIN
                if ( !(haveData&VIRGIN_NOWNEXT) && (isRunning&VIRGIN_NOWNEXT) )
                {
-                       eDebug("[EPGC] abort non avail virgin nownext reading");
+                       eDebug("[eEPGCache] abort non avail virgin nownext reading");
                        isRunning &= ~VIRGIN_NOWNEXT;
                        m_VirginNowNextReader->stop();
                        m_VirginNowNextConn=0;
                }
                if ( !(haveData&VIRGIN_SCHEDULE) && (isRunning&VIRGIN_SCHEDULE) )
                {
-                       eDebug("[EPGC] abort non avail virgin schedule reading");
+                       eDebug("[eEPGCache] abort non avail virgin schedule reading");
                        isRunning &= ~VIRGIN_SCHEDULE;
                        m_VirginScheduleReader->stop();
                        m_VirginScheduleConn=0;
@@ -1701,14 +1701,14 @@ void eEPGCache::channel_data::abortNonAvail()
 #ifdef ENABLE_NETMED
                if ( !(haveData&NETMED_SCHEDULE) && (isRunning&NETMED_SCHEDULE) )
                {
-                       eDebug("[EPGC] abort non avail netmed schedule reading");
+                       eDebug("[eEPGCache] abort non avail netmed schedule reading");
                        isRunning &= ~NETMED_SCHEDULE;
                        m_NetmedScheduleReader->stop();
                        m_NetmedScheduleConn=0;
                }
                if ( !(haveData&NETMED_SCHEDULE_OTHER) && (isRunning&NETMED_SCHEDULE_OTHER) )
                {
-                       eDebug("[EPGC] abort non avail netmed schedule other reading");
+                       eDebug("[eEPGCache] abort non avail netmed schedule other reading");
                        isRunning &= ~NETMED_SCHEDULE_OTHER;
                        m_NetmedScheduleOtherReader->stop();
                        m_NetmedScheduleOtherConn=0;
@@ -1717,7 +1717,7 @@ void eEPGCache::channel_data::abortNonAvail()
 #ifdef ENABLE_FREESAT
                if ( !(haveData&FREESAT_SCHEDULE_OTHER) && (isRunning&FREESAT_SCHEDULE_OTHER) )
                {
-                       eDebug("[EPGC] abort non avail FreeSat schedule_other reading");
+                       eDebug("[eEPGCache] abort non avail FreeSat schedule_other reading");
                        isRunning &= ~FREESAT_SCHEDULE_OTHER;
                        m_FreeSatScheduleOtherReader->stop();
                        m_FreeSatScheduleOtherReader2->stop();
@@ -1728,7 +1728,7 @@ void eEPGCache::channel_data::abortNonAvail()
 #endif
                if ( !(haveData&VIASAT) && (isRunning&VIASAT) )
                {
-                       eDebug("[EPGC] abort non avail viasat reading");
+                       eDebug("[eEPGCache] abort non avail viasat reading");
                        isRunning &= ~VIASAT;
                        m_ViasatReader->stop();
                        m_ViasatConn=0;
@@ -1736,7 +1736,7 @@ void eEPGCache::channel_data::abortNonAvail()
 #ifdef ENABLE_MHW_EPG
                if ( !(haveData&MHW) && (isRunning&MHW) )
                {
-                       eDebug("[EPGC] abort non avail mhw reading");
+                       eDebug("[eEPGCache] abort non avail mhw reading");
                        isRunning &= ~MHW;
                        m_MHWReader->stop();
                        m_MHWConn=0;
@@ -1779,9 +1779,9 @@ void eEPGCache::channel_data::startChannel()
 
        zapTimer->start(update, 1);
        if (update >= 60000)
-               eDebug("[EPGC] next update in %i min", update/60000);
+               eDebug("[eEPGCache] next update in %i min", update/60000);
        else if (update >= 1000)
-               eDebug("[EPGC] next update in %i sec", update/1000);
+               eDebug("[eEPGCache] next update in %i sec", update/1000);
 }
 
 void eEPGCache::channel_data::abortEPG()
@@ -1801,7 +1801,7 @@ void eEPGCache::channel_data::abortEPG()
        zapTimer->stop();
        if (isRunning)
        {
-               eDebug("[EPGC] abort caching events !!");
+               eDebug("[eEPGCache] abort caching events !!");
                if (isRunning & SCHEDULE)
                {
                        isRunning &= ~SCHEDULE;
@@ -1927,14 +1927,14 @@ void eEPGCache::channel_data::readData( const uint8_t *data, int source)
                        break;
 #endif
                default:
-                       eDebug("[EPGC] unknown source");
+                       eDebug("[eEPGCache] unknown source");
                        return;
        }
        tidMap &seenSections = this->seenSections[map];
        tidMap &calcedSections = this->calcedSections[map];
        if ( (state == 1 && calcedSections == seenSections) || state > 1 )
        {
-               eDebugNoNewLineStart("[EPGC] ");
+               eDebugNoNewLineStart("[eEPGCache] ");
                switch (source)
                {
                        case NOWNEXT:
@@ -2097,7 +2097,7 @@ void eEPGCache::channel_data::readFreeSatScheduleOtherData( const uint8_t *data)
        if ( itmap == freeSatSubTableStatus.end() )
        {
                // New sub table. Store version.
-               //eDebug("[EPGC] New subtable (%x) version (%d) now/next (%d) tsid (%x/%x) onid (%x/%x)", subtableNo, eit->version_number, eit->current_next_indicator, eit->transport_stream_id_hi, eit->transport_stream_id_lo, eit->original_network_id_hi, eit->original_network_id_lo);
+               //eDebug("[eEPGCache] New subtable (%x) version (%d) now/next (%d) tsid (%x/%x) onid (%x/%x)", subtableNo, eit->version_number, eit->current_next_indicator, eit->transport_stream_id_hi, eit->transport_stream_id_lo, eit->original_network_id_hi, eit->original_network_id_lo);
                fsstatus = new freesatEITSubtableStatus(eit->version_number, eit->last_section_number);
                m_FreesatTablesToComplete++;
                freeSatSubTableStatus.insert(std::pair<uint32_t,freesatEITSubtableStatus>(subtableNo, *fsstatus));
@@ -2108,7 +2108,7 @@ void eEPGCache::channel_data::readFreeSatScheduleOtherData( const uint8_t *data)
                // Existing subtable. Check version. Should check current / next as well? Seems to always be current for Freesat
                if ( fsstatus->isVersionChanged(eit->version_number) )
                {
-                       eDebug("[EPGC] FS subtable (%x) version changed (%d) now/next (%d)", subtableNo, eit->version_number, eit->current_next_indicator);
+                       eDebug("[eEPGCache] FS subtable (%x) version changed (%d) now/next (%d)", subtableNo, eit->version_number, eit->current_next_indicator);
                        m_FreesatTablesToComplete++;
                        fsstatus->updateVersion(eit->version_number, eit->last_section_number);
                }
@@ -2116,13 +2116,13 @@ void eEPGCache::channel_data::readFreeSatScheduleOtherData( const uint8_t *data)
                {
                        if ( fsstatus->isSectionPresent(eit->section_number) )
                        {
-//                             eDebug("[EPGC] DUP FS sub/sec/ver (%x/%d/%d)", subtableNo, eit->section_number, eit->version_number);
+//                             eDebug("[eEPGCache] DUP FS sub/sec/ver (%x/%d/%d)", subtableNo, eit->section_number, eit->version_number);
                                return;
                        }
                }
        }
 
-//     eDebug("[EPGC] New FS sub/sec/ls/lss/ver (%x/%d/%d/%d/%d)", subtableNo, eit->section_number, eit->last_section_number, eit->segment_last_section_number, eit->version_number);
+//     eDebug("[eEPGCache] New FS sub/sec/ls/lss/ver (%x/%d/%d/%d/%d)", subtableNo, eit->section_number, eit->last_section_number, eit->segment_last_section_number, eit->version_number);
        fsstatus->seen(eit->section_number, eit->segment_last_section_number);
        if (fsstatus->isCompleted())
        {
@@ -2215,7 +2215,7 @@ RESULT eEPGCache::lookupEventId(const eServiceReference &service, int event_id,
                else
                {
                        result = 0;
-                       eDebug("[EPGC] event %04x not found in epgcache", event_id);
+                       eDebug("[eEPGCache] event %04x not found in epgcache", event_id);
                }
        }
        return -1;
@@ -2228,7 +2228,7 @@ RESULT eEPGCache::saveEventToFile(const char* filename, const eServiceReference
        const eventData *data = NULL;
        if ( eit_event_id != -1 )
        {
-               eDebug("[EPGC] %s epg event id %x", __func__, eit_event_id);
+               eDebug("[eEPGCache] %s epg event id %x", __func__, eit_event_id);
                ret = lookupEventId(service, eit_event_id, data);
        }
        if ( (ret != 0) && (begTime != -1) )
@@ -2243,7 +2243,7 @@ RESULT eEPGCache::saveEventToFile(const char* filename, const eServiceReference
                int fd = open(filename, O_CREAT|O_WRONLY, 0666);
                if (fd < 0)
                {
-                       eDebug("[EPGC] Failed to create file: %s", filename);
+                       eDebug("[eEPGCache] Failed to create file: %s", filename);
                        return fd;
                }
                const eit_event_struct *event = data->get();
@@ -2253,7 +2253,7 @@ RESULT eEPGCache::saveEventToFile(const char* filename, const eServiceReference
                if ( wr != evLen )
                {
                        ::unlink(filename); /* Remove faulty file */
-                       eDebug("[EPGC] eit write error (%m) writing %s", filename);
+                       eDebug("[eEPGCache] eit write error on %s: %m", filename);
                        ret = (wr < 0) ? wr : -1;
                }
        }
@@ -2346,7 +2346,7 @@ RESULT eEPGCache::getNextTimeEntry(ePtr<eServiceEvent> &result)
 
 void fillTuple(ePyObject tuple, const char *argstring, int argcount, ePyObject service_reference, eServiceEvent *ptr, ePyObject service_name, ePyObject nowTime, eventData *evData )
 {
-       // eDebug("[EPGC] fillTuple arg=%s argcnt=%d, ptr=%d evData=%d", argstring, argcount, ptr ? 1 : 0, evData ? 1 : 0);
+       // eDebug("[eEPGCache] fillTuple arg=%s argcnt=%d, ptr=%d evData=%d", argstring, argcount, ptr ? 1 : 0, evData ? 1 : 0);
        ePyObject tmp;
        int spos=0, tpos=0;
        char c;
@@ -2400,7 +2400,7 @@ void fillTuple(ePyObject tuple, const char *argstring, int argcount, ePyObject s
                                continue;
                        default:  // ignore unknown
                                tmp = ePyObject();
-                               eDebug("fillTuple unknown '%c'... insert 'None' in result", c);
+                               eDebug("[eEPGCache] fillTuple unknown '%c'... insert 'None' in result", c);
                }
                if (!tmp)
                {
@@ -2429,7 +2429,7 @@ int handleEvent(eServiceEvent *ptr, ePyObject dest_list, const char* argstring,
                        Py_DECREF(dest_list);
                        PyErr_SetString(PyExc_StandardError,
                                "error in convertFunc execute");
-                       eDebug("error in convertFunc execute");
+                       eDebug("[eEPGCache] handleEvent: error in convertFunc execute");
                        return -1;
                }
                PyList_Append(dest_list, result);
@@ -2484,7 +2484,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
        {
                PyErr_SetString(PyExc_StandardError,
                        "type error");
-               eDebug("no list");
+               eDebug("[eEPGCache] no list");
                return NULL;
        }
        int listIt=0;
@@ -2492,8 +2492,8 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
        if (!listSize)
        {
                PyErr_SetString(PyExc_StandardError,
-                       "not params given");
-               eDebug("not params given");
+                       "no params given");
+               eDebug("[eEPGCache] no params given");
                return NULL;
        }
        else
@@ -2507,7 +2507,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
                else
                        argstring = "I"; // just event id as default
                argcount = strlen(argstring);
-//             eDebug("have %d args('%s')", argcount, argstring);
+//             eDebug("[eEPGCache] have %d args('%s')", argcount, argstring);
        }
 
        bool forceReturnOne = strchr(argstring, 'X') ? true : false;
@@ -2520,7 +2520,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
                {
                        PyErr_SetString(PyExc_StandardError,
                                "convertFunc must be callable");
-                       eDebug("convertFunc is not callable");
+                       eDebug("[eEPGCache] convertFunc is not callable");
                        return NULL;
                }
                convertFuncArgs = PyTuple_New(argcount);
@@ -2556,7 +2556,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
                                        {
                                                if (!PyString_Check(entry))
                                                {
-                                                       eDebug("tuple entry 0 is no a string");
+                                                       eDebug("[eEPGCache] tuple entry 0 is no a string");
                                                        goto skip_entry;
                                                }
                                                service = entry;
@@ -2566,7 +2566,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
                                                type=PyInt_AsLong(entry);
                                                if (type < -1 || type > 2)
                                                {
-                                                       eDebug("unknown type %d", type);
+                                                       eDebug("[eEPGCache] unknown type %d", type);
                                                        goto skip_entry;
                                                }
                                                break;
@@ -2577,7 +2577,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
                                                minutes=PyInt_AsLong(entry);
                                                break;
                                        default:
-                                               eDebug("unneeded extra argument");
+                                               eDebug("[eEPGCache] unneeded extra argument");
                                                break;
                                }
                        }
@@ -2588,7 +2588,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
                        eServiceReference ref(handleGroup(eServiceReference(PyString_AS_STRING(service))));
                        if (ref.type != eServiceReference::idDVB && ref.type != eServiceReference::idServiceMP3)
                        {
-                               eDebug("service reference for epg query is not valid");
+                               eDebug("[eEPGCache] service reference for epg query is not valid");
                                continue;
                        }
 
@@ -2921,7 +2921,7 @@ void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
                refstr = PyString_AS_STRING(serviceReferences);
                if (!refstr)
                {
-                       eDebug("[EPG:import] serviceReference string is 0, aborting");
+                       eDebug("[eEPGCache:import] serviceReference string is 0, aborting");
                        return;
                }
                refs.push_back(eServiceReferenceDVB(refstr));
@@ -2936,7 +2936,7 @@ void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
                        refstr = PyString_AS_STRING(item);
                        if (!refstr)
                        {
-                               eDebug("[EPG:import] a serviceref item is not a string");
+                               eDebug("[eEPGCache:import] a serviceref item is not a string");
                         }
                        else
                        {
@@ -2946,7 +2946,7 @@ void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
        }
        else
        {
-               eDebug("[EPG:import] serviceReference string is neither string nor list, aborting");
+               eDebug("[eEPGCache:import] serviceReference string is neither string nor list, aborting");
                return;
        }
 
@@ -2954,7 +2954,7 @@ void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
        if (!isTuple && !PyList_Check(list))
        {
 
-               eDebug("[EPG:import] argument 'list' is neither list nor tuple.");
+               eDebug("[eEPGCache:import] argument 'list' is neither list nor tuple.");
                return;
        }
 
@@ -2965,13 +2965,13 @@ void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
                ePyObject singleEvent = isTuple ? PyTuple_GET_ITEM(list, i) : PyList_GET_ITEM(list, i);
                if (!PyTuple_Check(singleEvent))
                {
-                       eDebug("[EPG:import] eventdata tuple does not pass PyTuple_Check, aborting");
+                       eDebug("[eEPGCache:import] eventdata tuple does not pass PyTuple_Check, aborting");
                        return;
                }
                int tupleSize = PyTuple_Size(singleEvent);
                if (tupleSize < 5)
                {
-                       eDebug("[EPG:import] eventdata tuple does not contain enough fields, aborting");
+                       eDebug("[eEPGCache:import] eventdata tuple does not contain enough fields, aborting");
                        return;
                }
 
@@ -3072,7 +3072,7 @@ PyObject *eEPGCache::search(ePyObject arg)
                        {
                                PyErr_SetString(PyExc_StandardError,
                                        "type error");
-                               eDebug("tuple arg 0 is not a string");
+                               eDebug("[eEPGCache] tuple arg 0 is not a string");
                                return NULL;
                        }
                }
@@ -3117,19 +3117,19 @@ PyObject *eEPGCache::search(ePyObject arg)
                                                        }
                                                }
                                                if (descr.empty())
-                                                       eDebug("event not found");
+                                                       eDebug("[eEPGCache] event not found");
                                        }
                                        else
                                        {
                                                PyErr_SetString(PyExc_StandardError, "type error");
-                                               eDebug("tuple arg 4 is not a valid service reference string");
+                                               eDebug("[eEPGCache] tuple arg 4 is not a valid service reference string");
                                                return NULL;
                                        }
                                }
                                else
                                {
                                        PyErr_SetString(PyExc_StandardError, "type error");
-                                       eDebug("tuple arg 4 is not a string");
+                                       eDebug("[eEPGCache] tuple arg 4 is not a string");
                                        return NULL;
                                }
                        }
@@ -3148,13 +3148,13 @@ PyObject *eEPGCache::search(ePyObject arg)
                                        switch (querytype)
                                        {
                                                case 1:
-                                                       eDebug("lookup events with '%s' as title (%s)", str, casetype?"ignore case":"case sensitive");
+                                                       eDebug("[eEPGCache] lookup events with '%s' as title (%s)", str, casetype?"ignore case":"case sensitive");
                                                        break;
                                                case 2:
-                                                       eDebug("lookup events with '%s' in title (%s)", str, casetype?"ignore case":"case sensitive");
+                                                       eDebug("[eEPGCache] lookup events with '%s' in title (%s)", str, casetype?"ignore case":"case sensitive");
                                                        break;
                                                case 3:
-                                                       eDebug("lookup events, title starting with '%s' (%s)", str, casetype?"ignore case":"case sensitive");
+                                                       eDebug("[eEPGCache] lookup events, title starting with '%s' (%s)", str, casetype?"ignore case":"case sensitive");
                                                        break;
                                        }
                                        singleLock s(cache_lock);
@@ -3221,7 +3221,7 @@ PyObject *eEPGCache::search(ePyObject arg)
                                {
                                        PyErr_SetString(PyExc_StandardError,
                                                "type error");
-                                       eDebug("tuple arg 4 is not a string");
+                                       eDebug("[eEPGCache] tuple arg 4 is not a string");
                                        return NULL;
                                }
                        }
@@ -3229,7 +3229,7 @@ PyObject *eEPGCache::search(ePyObject arg)
                        {
                                PyErr_SetString(PyExc_StandardError,
                                        "type error");
-                               eDebug("tuple arg 3(%d) is not a known querytype(0..3)", querytype);
+                               eDebug("[eEPGCache] tuple arg 3(%d) is not a known querytype(0..3)", querytype);
                                return NULL;
                        }
                }
@@ -3237,7 +3237,7 @@ PyObject *eEPGCache::search(ePyObject arg)
                {
                        PyErr_SetString(PyExc_StandardError,
                                "type error");
-                       eDebug("not enough args in tuple");
+                       eDebug("[eEPGCache] not enough args in tuple");
                        return NULL;
                }
        }
@@ -3245,7 +3245,7 @@ PyObject *eEPGCache::search(ePyObject arg)
        {
                PyErr_SetString(PyExc_StandardError,
                        "type error");
-               eDebug("arg 0 is not a tuple");
+               eDebug("[eEPGCache] arg 0 is not a tuple");
                return NULL;
        }
 
@@ -3315,7 +3315,7 @@ PyObject *eEPGCache::search(ePyObject arg)
                                                        if (needServiceEvent)
                                                        {
                                                                if (lookupEventId(ref, evit->second->getEventID(), ev_data))
-                                                                       eDebug("event not found !!!!!!!!!!!");
+                                                                       eDebug("[eEPGCache] event not found !!!!!!!!!!!");
                                                                else
                                                                {
                                                                        const eServiceReferenceDVB &dref = (const eServiceReferenceDVB&)ref;
@@ -3504,7 +3504,7 @@ void eEPGCache::PMTready(eDVBServicePMTHandler *pmthandler)
                }
        }
        else
-               eDebug("PMTready but no pmt!!");
+               eDebug("[eEPGCache] PMTready but no pmt!!");
 }
 
 struct date_time
@@ -3708,7 +3708,7 @@ void eEPGCache::channel_data::startPrivateReader()
        mask.flags = eDVBSectionFilterMask::rfCRC;
        mask.data[0] = 0xA0;
        mask.mask[0] = 0xFF;
-       eDebug("[EPGC] start privatefilter for pid %04x and version %d", m_PrivatePid, m_PrevVersion);
+       eDebug("[eEPGCache] start privatefilter for pid %04x and version %d", m_PrivatePid, m_PrevVersion);
        if (m_PrevVersion != -1)
        {
                mask.data[3] = m_PrevVersion << 1;
@@ -3730,7 +3730,7 @@ void eEPGCache::channel_data::readPrivateData( const uint8_t *data)
        }
        if ( seenPrivateSections.size() == (unsigned int)(data[7] + 1) )
        {
-               eDebug("[EPGC] private finished");
+               eDebug("[eEPGCache] private finished");
                eDVBChannelID chid = channel->getChannelID();
                int tmp = chid.original_network_id.get();
                tmp |= 0x80000000; // we use highest bit as private epg indicator
@@ -3996,7 +3996,7 @@ void eEPGCache::channel_data::startMHWReader(uint16_t pid, uint8_t tid)
        m_MHWFilterMask.pid = pid;
        m_MHWFilterMask.data[0] = tid;
        m_MHWReader->start(m_MHWFilterMask);
-//     eDebug("start 0x%02x 0x%02x", pid, tid);
+//     eDebug("[eEPGCache] start 0x%02x 0x%02x", pid, tid);
 }
 
 void eEPGCache::channel_data::startMHWReader2(uint16_t pid, uint8_t tid, int ext)
@@ -4007,13 +4007,13 @@ void eEPGCache::channel_data::startMHWReader2(uint16_t pid, uint8_t tid, int ext
        {
                m_MHWFilterMask2.data[1] = ext;
                m_MHWFilterMask2.mask[1] = 0xFF;
-//             eDebug("start 0x%03x 0x%02x 0x%02x", pid, tid, ext);
+//             eDebug("[eEPGCache] start 0x%03x 0x%02x 0x%02x", pid, tid, ext);
        }
        else
        {
                m_MHWFilterMask2.data[1] = 0;
                m_MHWFilterMask2.mask[1] = 0;
-//             eDebug("start 0x%02x 0x%02x", pid, tid);
+//             eDebug("[eEPGCache] start 0x%02x 0x%02x", pid, tid);
        }
        m_MHWReader2->start(m_MHWFilterMask2);
 }
@@ -4027,7 +4027,7 @@ void eEPGCache::channel_data::readMHWData(const uint8_t *data)
                // have si data.. so we dont read mhw data
                (haveData & (SCHEDULE|SCHEDULE_OTHER|VIASAT)) )
        {
-               eDebug("[EPGC] mhw aborted %d", state);
+               eDebug("[eEPGCache] mhw aborted %d", state);
        }
        else if (m_MHWFilterMask.pid == 0xD3 && m_MHWFilterMask.data[0] == 0x91)
        // Channels table
@@ -4044,7 +4044,7 @@ void eEPGCache::channel_data::readMHWData(const uint8_t *data)
                }
                haveData |= MHW;
 
-               eDebug("[EPGC] mhw %d channels found", m_channels.size());
+               eDebug("[eEPGCache] mhw %d channels found", m_channels.size());
 
                // Channels table has been read, start reading the themes table.
                startMHWReader(0xD3, 0x92);
@@ -4075,7 +4075,7 @@ void eEPGCache::channel_data::readMHWData(const uint8_t *data)
 
                        m_themes[idx+sub_idx] = *theme;
                }
-               eDebug("[EPGC] mhw %d themes found", m_themes.size());
+               eDebug("[eEPGCache] mhw %d themes found", m_themes.size());
                // Themes table has been read, start reading the titles table.
                startMHWReader(0xD2, 0x90);
                startMHWTimeout(4000);
@@ -4119,7 +4119,7 @@ void eEPGCache::channel_data::readMHWData(const uint8_t *data)
                        // Titles table has been read, there are summaries to read.
                        // Start reading summaries, store corresponding titles on the fly.
                        startMHWReader(0xD3, 0x90);
-                       eDebug("[EPGC] mhw %d titles(%d with summary) found",
+                       eDebug("[eEPGCache] mhw %d titles(%d with summary) found",
                                m_titles.size(),
                                m_program_ids.size());
                        startMHWTimeout(4000);
@@ -4169,7 +4169,7 @@ void eEPGCache::channel_data::readMHWData(const uint8_t *data)
                                return; // Continue reading of the current table.
                }
        }
-       eDebug("[EPGC] mhw finished(%ld) %d summaries not found",
+       eDebug("[eEPGCache] mhw finished(%ld) %d summaries not found",
                ::time(0),
                m_program_ids.size());
        // Summaries have been read, titles that have summaries have been stored.
@@ -4195,7 +4195,7 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                // have si data.. so we dont read mhw data
                (haveData & (SCHEDULE|SCHEDULE_OTHER|VIASAT)) )
        {
-               eDebug("[EPGC] mhw2 aborted %d", state);
+               eDebug("[eEPGCache] mhw2 aborted %d", state);
        }
        else if (m_MHWFilterMask2.pid == m_mhw2_channel_pid && m_MHWFilterMask2.data[0] == 0xC8 && m_MHWFilterMask2.data[1] == 0)
        // Channels table
@@ -4231,7 +4231,7 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                        channel.channel_id_hi = *(tmp++);
                        channel.channel_id_lo = *(tmp++);
                        m_channels[i]=channel;
-//                     eDebug("%d(%02x) %04x: %02x %02x", i, i, (channel.channel_id_hi << 8) | channel.channel_id_lo, *tmp, *(tmp+1));
+//                     eDebug("[eEPGCache] %d(%02x) %04x: %02x %02x", i, i, (channel.channel_id_hi << 8) | channel.channel_id_lo, *tmp, *(tmp+1));
                        tmp+=2;
                }
                for (int i=0; i < num_channels; ++i)
@@ -4242,15 +4242,15 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                        for (; x < channel_name_len; ++x)
                                channel.name[x]=*(tmp++);
                        channel.name[x+1]=0;
-//                     eDebug("%d(%02x) %s", i, i, channel.name);
+//                     eDebug("[eEPGCache] %d(%02x) %s", i, i, channel.name);
                }
                haveData |= MHW;
-               eDebug("[EPGC] mhw2 %d channels found", m_channels.size());
+               eDebug("[eEPGCache] mhw2 %d channels found", m_channels.size());
        }
        else if (m_MHWFilterMask2.pid == m_mhw2_channel_pid && m_MHWFilterMask2.data[0] == 0xC8 && m_MHWFilterMask2.data[1] == 1)
        {
                // Themes table
-               eDebug("[EPGC] mhw2 themes nyi");
+               eDebug("[eEPGCache] mhw2 themes nyi");
        }
        else if (m_MHWFilterMask2.pid == m_mhw2_title_pid && m_MHWFilterMask2.data[0] == 0xe6)
        // Titles table
@@ -4259,7 +4259,7 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                bool valid=false;
                bool finish=false;
 
-//             eDebug("%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
+//             eDebug("[eEPGCache] %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
 //                     data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10],
 //                     data[11], data[12], data[13], data[14], data[15], data[16], data[17] );
 
@@ -4274,7 +4274,7 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                if (!valid)
                {
                        if (dataLen > 18)
-                               eDebug("mhw2 title table invalid!!");
+                               eDebug("[eEPGCache] mhw2 title table invalid!!");
                        if (checkMHWTimeout())
                                goto abort;
                        if (!m_MHWTimeoutTimer->isActive())
@@ -4287,7 +4287,7 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                pos = 18;
                while (pos < dataLen)
                {
-//                     eDebugNoNewLineStart("    [%02x] %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x [%02x %02x %02x %02x %02x %02x %02x] LL - DESCR - ",
+//                     eDebugNoNewLineStart("[eEPGCache]     [%02x] %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x [%02x %02x %02x %02x %02x %02x %02x] LL - DESCR - ",
 //                             data[pos], data[pos+1], data[pos+2], data[pos+3], data[pos+4], data[pos+5], data[pos+6], data[pos+7],
 //                             data[pos+8], data[pos+9], data[pos+10], data[pos+11], data[pos+12], data[pos+13], data[pos+14], data[pos+15], data[pos+16], data[pos+17]);
                        title.channel_id = data[pos]+1;
@@ -4314,12 +4314,12 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                        uint32_t summary_id = (data[pos+1] << 8) | data[pos+2];
 
 //                     if (title.channel_id > m_channels.size())
-//                             eDebug("channel_id(%d %02x) to big!!", title.channel_id);
+//                             eDebug("[eEPGCache] channel_id(%d %02x) to big!!", title.channel_id);
 
-//                     eDebug("pos %d prog_id %02x %02x chid %02x summary_id %04x dest %p len %d\n",
+//                     eDebug("[eEPGCache] pos %d prog_id %02x %02x chid %02x summary_id %04x dest %p len %d\n",
 //                             pos, title.program_id_ml, title.program_id_lo, title.channel_id, summary_id, dest, slen);
 
-//                     eDebug("title_id %08x -> summary_id %04x\n", title_id, summary_id);
+//                     eDebug("[eEPGCache] title_id %08x -> summary_id %04x\n", title_id, summary_id);
 
                        pos += 3;
 
@@ -4354,7 +4354,7 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                }
                if (finish)
                {
-                       eDebug("[EPGC] mhw2 %d titles(%d with summary) found", m_titles.size(), m_program_ids.size());
+                       eDebug("[eEPGCache] mhw2 %d titles(%d with summary) found", m_titles.size(), m_program_ids.size());
                        if (!m_program_ids.empty())
                        {
                                // Titles table has been read, there are summaries to read.
@@ -4406,8 +4406,8 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                        {
                                // data seems consistent...
                                uint32_t summary_id = (data[3]<<8)|data[4];
-//                             eDebug ("summary id %04x\n", summary_id);
-//                             eDebug("[%02x %02x] %02x %02x %02x %02x %02x %02x %02x %02x XX\n", data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13] );
+//                             eDebug ("[eEPGCache] summary id %04x\n", summary_id);
+//                             eDebug("[eEPGCache] [%02x %02x] %02x %02x %02x %02x %02x %02x %02x %02x XX\n", data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13] );
 
                                // ugly workaround to convert const __u8* to char*
                                char *tmp=0;
@@ -4441,11 +4441,11 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                                        startMHWTimeout(15000);
                                        std::string the_text = (char *) (data + pos + 1);
 
-//                                     eDebug ("summary id %04x : %s\n", summary_id, data+pos+1);
+//                                     eDebug ("[eEPGCache] summary id %04x : %s\n", summary_id, data+pos+1);
 
                                        while( itProgId != m_program_ids.end() && itProgId->first == summary_id )
                                        {
-//                                             eDebug(".");
+//                                             eDebug("[eEPGCache] .");
                                                // Find corresponding title, store title and summary in epgcache.
                                                std::map<uint32_t, mhw_title_t>::iterator itTitle( m_titles.find( itProgId->second ) );
                                                if ( itTitle != m_titles.end() )
@@ -4483,7 +4483,7 @@ void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
                        // Now store titles that do not have summaries.
                        for (std::map<uint32_t, mhw_title_t>::iterator itTitle(m_titles.begin()); itTitle != m_titles.end(); itTitle++)
                                storeMHWTitle( itTitle, "", data );
-                       eDebug("[EPGC] mhw2 finished(%ld) %d summaries not found",
+                       eDebug("[eEPGCache] mhw2 finished(%ld) %d summaries not found",
                                ::time(0),
                                m_program_ids.size());
                }
index 09f237c..2131ac0 100644 (file)
@@ -37,7 +37,7 @@ void eGTable::sectionRead(const uint8_t *d)
 
 void eGTable::timeout()
 {
-       TABLE_eDebug("timeout %04x!", m_table.pid);
+       TABLE_eDebug("[eGTable] timeout %04x!", m_table.pid);
        if (m_reader)
        {
                m_reader->stop();
@@ -103,13 +103,13 @@ RESULT eGTable::start(iDVBSectionReader *reader, const eDVBTableSpec &table)
 
        if (!(m_table.flags & eDVBTableSpec::tfAnyVersion))
        {
-               TABLE_eDebug("doing version filtering");
+               TABLE_eDebug("[eGTable] doing version filtering");
                mask.data[3] |= (m_table.version << 1)|1;
                mask.mask[3] |= 0x3f;
                if (!(m_table.flags & eDVBTableSpec::tfThisVersion))
                        mask.mode[3] |= 0x3e; // negative filtering
        } else
-               TABLE_eDebug("no version filtering");
+               TABLE_eDebug("[eGTable] no version filtering");
 
        TABLE_eDebug("%04x:  %02x %02x %02x %02x %02x %02x",
                mask.pid,
@@ -124,7 +124,7 @@ RESULT eGTable::start(iDVBSectionReader *reader, const eDVBTableSpec &table)
 
        if ((res = m_reader->start(mask)))
        {
-               TABLE_eDebug("reader failed to start.");
+               TABLE_eDebug("[eGTable] reader failed to start.");
                return res;
        }
 
index 1743877..f68c645 100644 (file)
@@ -48,7 +48,7 @@ protected:
                unsigned int ssize = sections.size();
                if (max < ssize || nr >= max)
                {
-                       TABLE_eDebug("eTable: bounds error: max(%d) < ssize(%d) || nr(%d) >= max(%d)",
+                       TABLE_eDebug("[eTable] bounds error: max(%d) < ssize(%d) || nr(%d) >= max(%d)",
                                max, ssize, nr, max);
                        return 0;
                }
@@ -59,7 +59,7 @@ protected:
                sections[nr] = new Section(data);
                avail.insert(nr);
 
-               TABLE_eDebugNoNewLineStart("eTable: ");
+               TABLE_eDebugNoNewLineStart("[eTable] ");
                for (unsigned int i = 0; i < max; ++i)
                        if (avail.find(i) != avail.end())
                                TABLE_eDebugNoNewLine("+");
@@ -70,7 +70,7 @@ protected:
 
                if (avail.size() == max)
                {
-                       TABLE_eDebug("eTable: done!");
+                       TABLE_eDebug("[eTable] done!");
                        return 1;
                } else
                        return 0;
@@ -177,7 +177,7 @@ public:
 #if 0
        void abort()
        {
-               eDebug("eAUTable: aborted!");
+               eDebug("[eAUTable] aborted!");
                if (next)
                        next->abort();
                delete next;
@@ -227,7 +227,7 @@ public:
                                        m_table_cnt = -1;
                                else if (m_table_cnt > 1) // two pmt update within one second
                                {
-                                       eDebug("eAUTable: Seen two consecutive table version changes within 500ms. "
+                                       eDebug("[eAUTable] Seen two consecutive table version changes within 500ms. "
                                            "This seems broken, so auto update for pid %04x, table %02x is now disabled!!",
                                            spec.pid, spec.tid);
                                        m_table_cnt = 0;
index f46517a..0f21d7d 100644 (file)
@@ -356,7 +356,7 @@ void eFastScan::start(int frontendid)
 
        if (res->allocateRawChannel(m_channel, frontendid))
        {
-               eDebug("failed to allocate fastscan channel!");
+               eDebug("[eFastScan] failed to allocate fastscan channel!");
                scanCompleted(-1);
                return;
        }
@@ -396,7 +396,7 @@ void eFastScan::networkTableProgress(int size, int max)
 
 void eFastScan::servicesTableReady(int error)
 {
-       eDebug("eFastScan::servicesTableReady %d", error);
+       eDebug("[eFastScan] servicesTableReady %d", error);
        if (error)
        {
                m_channel = NULL;
@@ -413,7 +413,7 @@ void eFastScan::servicesTableReady(int error)
 
 void eFastScan::networkTableReady(int error)
 {
-       eDebug("eFastScan::networkTableReady %d", error);
+       eDebug("[eFastScan] networkTableReady %d", error);
 
        if (!error)
        {
@@ -656,7 +656,7 @@ void eFastScan::parseResult()
                }
                else
                {
-                       eDebug("failed to create bouquet!");
+                       eDebug("[eFastScan] failed to create bouquet!");
                }
        }
        else
@@ -707,7 +707,7 @@ void eFastScan::parseResult()
                        }
                        else
                        {
-                               eDebug("failed to create bouquet!");
+                               eDebug("[eFastScan] failed to create bouquet!");
                        }
                }
                else
index 619433f..d37817a 100644 (file)
@@ -49,12 +49,12 @@ void eDVBDiseqcCommand::setCommandString(const char *str)
        int slen = strlen(str);
        if (slen % 2)
        {
-               eDebug("invalid diseqc command string length (not 2 byte aligned)");
+               eDebug("[eDVBDiseqcCommand] invalid diseqc command string length (not 2 byte aligned)");
                return;
        }
        if (slen > MAX_DISEQC_LENGTH*2)
        {
-               eDebug("invalid diseqc command string length (string is to long)");
+               eDebug("[eDVBDiseqcCommand] invalid diseqc command string length (string is to long)");
                return;
        }
        unsigned char val=0;
@@ -67,7 +67,7 @@ void eDVBDiseqcCommand::setCommandString(const char *str)
                        case 'a' ... 'f': c-=87; break;
                        case 'A' ... 'F': c-=55; break;
                        default:
-                               eDebug("invalid character in hex string..ignore complete diseqc command !");
+                               eDebug("[eDVBDiseqcCommand] invalid character in hex string..ignore complete diseqc command !");
                                return;
                }
                if ( i % 2 )
@@ -101,13 +101,13 @@ void eDVBFrontendParametersSatellite::set(const SatelliteDeliverySystemDescripto
        modulation = descriptor.getModulation();
        if (system == System_DVB_S && modulation == Modulation_8PSK)
        {
-               eDebug("satellite_delivery_descriptor invalid modulation type.. force QPSK");
+               eDebug("[eDVBFrontendParametersSatellite] satellite_delivery_descriptor invalid modulation type.. force QPSK");
                modulation = Modulation_QPSK;
        }
        rolloff = descriptor.getRollOff();
        if (system == System_DVB_S2)
        {
-               eDebug("SAT DVB-S2 freq %d, %s, pos %d, sr %d, fec %d, modulation %d, rolloff %d",
+               eDebug("[eDVBFrontendParametersSatellite] SAT DVB-S2 freq %d, %s, pos %d, sr %d, fec %d, modulation %d, rolloff %d",
                        frequency,
                        polarisation ? "hor" : "vert",
                        orbital_position,
@@ -117,7 +117,7 @@ void eDVBFrontendParametersSatellite::set(const SatelliteDeliverySystemDescripto
        }
        else
        {
-               eDebug("SAT DVB-S freq %d, %s, pos %d, sr %d, fec %d",
+               eDebug("[eDVBFrontendParametersSatellite] SAT DVB-S freq %d, %s, pos %d, sr %d, fec %d",
                        frequency,
                        polarisation ? "hor" : "vert",
                        orbital_position,
@@ -148,7 +148,7 @@ void eDVBFrontendParametersCable::set(const CableDeliverySystemDescriptor &descr
                modulation = Modulation_Auto;
        inversion = Inversion_Unknown;
        system = System_DVB_C_ANNEX_A;
-       eDebug("Cable freq %d, mod %d, sr %d, fec %d",
+       eDebug("[eDVBFrontendParametersCable] Cable freq %d, mod %d, sr %d, fec %d",
                frequency,
                modulation, symbol_rate, fec_inner);
 }
@@ -189,7 +189,7 @@ void eDVBFrontendParametersTerrestrial::set(const TerrestrialDeliverySystemDescr
        inversion = Inversion_Unknown;
        system = System_DVB_T;
        plpid = 0;
-       eDebug("Terr freq %d, bw %d, cr_hp %d, cr_lp %d, tm_mode %d, guard %d, hierarchy %d, const %d",
+       eDebug("[eDVBFrontendParametersTerrestrial] Terr freq %d, bw %d, cr_hp %d, cr_lp %d, tm_mode %d, guard %d, hierarchy %d, const %d",
                frequency, bandwidth, code_rate_HP, code_rate_LP, transmission_mode,
                guard_interval, hierarchy, modulation);
 }
@@ -506,18 +506,18 @@ int eDVBFrontend::openFrontend()
 
        if (!m_simulate)
        {
-               eDebug("opening frontend %d", m_dvbid);
+               eDebug("[eDVBFrontend] opening frontend %d", m_dvbid);
                if (m_fd < 0)
                {
                        m_fd = ::open(m_filename.c_str(), O_RDWR | O_NONBLOCK | O_CLOEXEC);
                        if (m_fd < 0)
                        {
-                               eWarning("failed! (%s) %m", m_filename.c_str());
+                               eWarning("[eDVBFrontend] opening %s failed: %m", m_filename.c_str());
                                return -1;
                        }
                }
                else
-                       eWarning("frontend %d already opened", m_dvbid);
+                       eWarning("[eDVBFrontend] frontend %d already opened", m_dvbid);
                if (m_dvbversion == 0)
                {
                        m_dvbversion = DVB_VERSION(3, 0);
@@ -537,7 +537,7 @@ int eDVBFrontend::openFrontend()
                {
                        if (::ioctl(m_fd, FE_GET_INFO, &fe_info) < 0)
                        {
-                               eWarning("ioctl FE_GET_INFO failed");
+                               eWarning("[eDVBFrontend] ioctl FE_GET_INFO failed");
                                ::close(m_fd);
                                m_fd = -1;
                                return -1;
@@ -636,7 +636,7 @@ int eDVBFrontend::closeFrontend(bool force, bool no_delayed)
                        eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*)tmp;
                        if (linked_fe->m_inuse)
                        {
-                               eDebugNoSimulate("dont close frontend %d until the linked frontend %d in slot %d is still in use",
+                               eDebugNoSimulate("[eDVBFrontend] dont close frontend %d until the linked frontend %d in slot %d is still in use",
                                        m_dvbid, linked_fe->m_frontend->getDVBID(), linked_fe->m_frontend->getSlotID());
                                return -1;
                        }
@@ -646,7 +646,7 @@ int eDVBFrontend::closeFrontend(bool force, bool no_delayed)
 
        if (m_fd >= 0)
        {
-               eDebugNoSimulate("close frontend %d", m_dvbid);
+               eDebugNoSimulate("[eDVBFrontend] close frontend %d", m_dvbid);
                if (m_data[SATCR] != -1)
                {
                        if (!no_delayed)
@@ -656,7 +656,7 @@ int eDVBFrontend::closeFrontend(bool force, bool no_delayed)
                                if(!m_tuneTimer->isActive())
                                {
                                        int timeout=0;
-                                       eDebug("[turnOffSatCR] no mainloop");
+                                       eDebug("[eDVBFrontend] [turnOffSatCR] no mainloop");
                                        while(true)
                                        {
                                                timeout = tuneLoopInt();
@@ -666,7 +666,7 @@ int eDVBFrontend::closeFrontend(bool force, bool no_delayed)
                                        }
                                }
                                else
-                                       eDebug("[turnOffSatCR] running mainloop");
+                                       eDebug("[eDVBFrontend] [turnOffSatCR] running mainloop");
                                return 0;
                        }
                        else
@@ -682,7 +682,7 @@ int eDVBFrontend::closeFrontend(bool force, bool no_delayed)
                if (!::close(m_fd))
                        m_fd=-1;
                else
-                       eWarning("couldnt close frontend %d", m_dvbid);
+                       eWarning("[eDVBFrontend] couldnt close frontend %d", m_dvbid);
        }
        else if (m_simulate)
        {
@@ -725,7 +725,7 @@ void eDVBFrontend::feEvent(int w)
                if (w < 0)
                        continue;
 
-               eDebug("(%d)fe event: status %x, inversion %s, m_tuning %d", m_dvbid, event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off", m_tuning);
+               eDebug("[eDVBFrontend] (%d)fe event: status %x, inversion %s, m_tuning %d", m_dvbid, event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off", m_tuning);
                if (event.status & FE_HAS_LOCK)
                {
                        state = stateLock;
@@ -735,7 +735,7 @@ void eDVBFrontend::feEvent(int w)
                        if (m_tuning) {
                                state = stateTuning;
                                if (event.status & FE_TIMEDOUT) {
-                                       eDebug("FE_TIMEDOUT! ..abort");
+                                       eDebug("[eDVBFrontend] FE_TIMEDOUT! ..abort");
                                        m_tuneTimer->stop();
                                        timeout();
                                        return;
@@ -744,7 +744,7 @@ void eDVBFrontend::feEvent(int w)
                        }
                        else
                        {
-                               eDebug("stateLostLock");
+                               eDebug("[eDVBFrontend] stateLostLock");
                                state = stateLostLock;
                                if (!m_rotor_mode)
                                        sec_fe->m_data[CSW] = sec_fe->m_data[UCSW] = sec_fe->m_data[TONEBURST] = -1; // reset diseqc
@@ -1018,7 +1018,7 @@ int eDVBFrontend::readFrontendData(int type)
                                if (!m_simulate)
                                {
                                        if (ioctl(m_fd, FE_READ_BER, &ber) < 0 && errno != ERANGE)
-                                               eDebug("FE_READ_BER failed (%m)");
+                                               eDebug("[eDVBFrontend] FE_READ_BER failed: %m");
                                }
                                return ber;
                        }
@@ -1030,7 +1030,7 @@ int eDVBFrontend::readFrontendData(int type)
                                if (!m_simulate)
                                {
                                        if (ioctl(m_fd, FE_READ_SNR, &snr) < 0 && errno != ERANGE)
-                                               eDebug("FE_READ_SNR failed (%m)");
+                                               eDebug("[eDVBFrontend] FE_READ_SNR failed: %m");
                                }
                                return snr;
                        }
@@ -1060,7 +1060,7 @@ int eDVBFrontend::readFrontendData(int type)
                                if (!m_simulate)
                                {
                                        if (ioctl(m_fd, FE_READ_SIGNAL_STRENGTH, &strength) < 0 && errno != ERANGE)
-                                               eDebug("FE_READ_SIGNAL_STRENGTH failed (%m)");
+                                               eDebug("[eDVBFrontend] FE_READ_SIGNAL_STRENGTH failed: %m");
                                }
                                return strength;
                        }
@@ -1077,7 +1077,7 @@ int eDVBFrontend::readFrontendData(int type)
                        if (!m_simulate)
                        {
                                if ( ioctl(m_fd, FE_READ_STATUS, &status) < 0 && errno != ERANGE )
-                                       eDebug("FE_READ_STATUS failed (%m)");
+                                       eDebug("[eDVBFrontend] FE_READ_STATUS failed: %m");
                                return (int)status;
                        }
                        return (FE_HAS_SYNC | FE_HAS_LOCK);
@@ -1150,7 +1150,7 @@ void eDVBFrontend::getTransponderData(ePtr<iDVBTransponderData> &dest, bool orig
                }
                if (ioctl(m_fd, FE_GET_PROPERTY, &cmdseq) < 0)
                {
-                       eDebug("FE_GET_PROPERTY failed (%m)");
+                       eDebug("[eDVBFrontend] FE_GET_PROPERTY failed: %m");
                        original = true;
                }
        }
@@ -1215,13 +1215,13 @@ int eDVBFrontend::readInputpower()
        int fp=::open("/dev/dbox/fp0", O_RDWR);
        if (fp < 0)
        {
-               eDebug("Failed to open /dev/dbox/fp0");
+               eDebug("[eDVBFrontend] Failed to open /dev/dbox/fp0");
                return -1;
        }
        static bool old_fp = (::ioctl(fp, FP_IOCTL_GET_ID) < 0);
        if ( ioctl( fp, old_fp ? 9 : 0x100, &power ) < 0 )
        {
-               eDebug("FP_IOCTL_GET_LNB_CURRENT failed (%m)");
+               eDebug("[eDVBFrontend] FP_IOCTL_GET_LNB_CURRENT failed: %m");
                power = -1;
        }
        ::close(fp);
@@ -1231,7 +1231,7 @@ int eDVBFrontend::readInputpower()
 
 bool eDVBFrontend::setSecSequencePos(int steps)
 {
-       eDebugNoSimulate("set sequence pos %d", steps);
+       eDebugNoSimulate("[eDVBFrontend] set sequence pos %d", steps);
        if (!steps)
                return false;
        while( steps > 0 )
@@ -1285,13 +1285,13 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
        if ( m_sec_sequence && m_sec_sequence.current() != m_sec_sequence.end() )
        {
                long *sec_fe_data = sec_fe->m_data;
-//             eDebugNoSimulate("tuneLoop %d\n", m_sec_sequence.current()->cmd);
+//             eDebugNoSimulate("[eDVBFrontend] tuneLoop %d\n", m_sec_sequence.current()->cmd);
                delay = 0;
                switch (m_sec_sequence.current()->cmd)
                {
                        case eSecCommand::SLEEP:
                                delay = m_sec_sequence.current()++->msec;
-                               eDebugNoSimulate("[SEC] sleep %dms", delay);
+                               eDebugNoSimulate("[eDVBFrontend] sleep %dms", delay);
                                break;
                        case eSecCommand::GOTO:
                                if ( !setSecSequencePos(m_sec_sequence.current()->steps) )
@@ -1300,7 +1300,7 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                        case eSecCommand::SET_VOLTAGE:
                        {
                                int voltage = m_sec_sequence.current()++->voltage;
-                               eDebugNoSimulate("[SEC] setVoltage %d", voltage);
+                               eDebugNoSimulate("[eDVBFrontend] setVoltage %d", voltage);
                                sec_fe->setVoltage(voltage);
                                break;
                        }
@@ -1337,12 +1337,12 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                break;
                        }
                        case eSecCommand::SET_TONE:
-                               eDebugNoSimulate("[SEC] setTone %d", m_sec_sequence.current()->tone);
+                               eDebugNoSimulate("[eDVBFrontend] setTone %d", m_sec_sequence.current()->tone);
                                sec_fe->setTone(m_sec_sequence.current()++->tone);
                                break;
                        case eSecCommand::SEND_DISEQC:
                                sec_fe->sendDiseqc(m_sec_sequence.current()->diseqc);
-                               eDebugNoSimulateNoNewLineStart("[SEC] sendDiseqc: ");
+                               eDebugNoSimulateNoNewLineStart("[eDVBFrontend] sendDiseqc: ");
                                for (int i=0; i < m_sec_sequence.current()->diseqc.len; ++i)
                                    eDebugNoNewLine("%02x", m_sec_sequence.current()->diseqc.data[i]);
  
@@ -1355,20 +1355,20 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                ++m_sec_sequence.current();
                                break;
                        case eSecCommand::SEND_TONEBURST:
-                               eDebugNoSimulate("[SEC] sendToneburst: %d", m_sec_sequence.current()->toneburst);
+                               eDebugNoSimulate("[eDVBFrontend] sendToneburst: %d", m_sec_sequence.current()->toneburst);
                                sec_fe->sendToneburst(m_sec_sequence.current()++->toneburst);
                                break;
                        case eSecCommand::SET_FRONTEND:
                        {
                                int enableEvents = (m_sec_sequence.current()++)->val;
-                               eDebugNoSimulate("[SEC] setFrontend %d", enableEvents);
+                               eDebugNoSimulate("[eDVBFrontend] setFrontend %d", enableEvents);
                                setFrontend(enableEvents);
                                break;
                        }
                        case eSecCommand::START_TUNE_TIMEOUT:
                        {
                                int tuneTimeout = m_sec_sequence.current()->timeout;
-                               eDebugNoSimulate("[SEC] startTuneTimeout %d", tuneTimeout);
+                               eDebugNoSimulate("[eDVBFrontend] startTuneTimeout %d", tuneTimeout);
                                if (!m_simulate)
                                        m_timeout->start(tuneTimeout, 1);
                                ++m_sec_sequence.current();
@@ -1376,12 +1376,12 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                        }
                        case eSecCommand::SET_TIMEOUT:
                                m_timeoutCount = m_sec_sequence.current()++->val;
-                               eDebugNoSimulate("[SEC] set timeout %d", m_timeoutCount);
+                               eDebugNoSimulate("[eDVBFrontend] set timeout %d", m_timeoutCount);
                                break;
                        case eSecCommand::IF_TIMEOUT_GOTO:
                                if (!m_timeoutCount)
                                {
-                                       eDebugNoSimulate("[SEC] rotor timout");
+                                       eDebugNoSimulate("[eDVBFrontend] rotor timout");
                                        setSecSequencePos(m_sec_sequence.current()->steps);
                                }
                                else
@@ -1393,10 +1393,10 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                if ( idx == 0 || idx == 1 )
                                {
                                        m_idleInputpower[idx] = sec_fe->readInputpower();
-                                       eDebugNoSimulate("[SEC] idleInputpower[%d] is %d", idx, m_idleInputpower[idx]);
+                                       eDebugNoSimulate("[eDVBFrontend] idleInputpower[%d] is %d", idx, m_idleInputpower[idx]);
                                }
                                else
-                                       eDebugNoSimulate("[SEC] idleInputpower measure index(%d) out of bound !!!", idx);
+                                       eDebugNoSimulate("[eDVBFrontend] idleInputpower measure index(%d) out of bound !!!", idx);
                                break;
                        }
                        case eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO:
@@ -1409,7 +1409,7 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                        int diff = abs(idle-m_idleInputpower[idx]);
                                        if ( diff > 0)
                                        {
-                                               eDebugNoSimulate("  measure idle(%d) was not okay.. (%d - %d = %d) retry", idx, m_idleInputpower[idx], idle, diff);
+                                               eDebugNoSimulate("[eDVBFrontend]   measure idle(%d) was not okay.. (%d - %d = %d) retry", idx, m_idleInputpower[idx], idle, diff);
                                                setSecSequencePos(compare.steps);
                                                break;
                                        }
@@ -1434,17 +1434,17 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                if (isLocked && ((abs((signal = readFrontendData(iFrontendInformation_ENUMS::signalQualitydB)) - cmd.lastSignal) < 40) || !cmd.lastSignal))
                                {
                                        if (cmd.lastSignal)
-                                               eDebugNoSimulate("[SEC] locked step %d ok (%d %d)", cmd.okcount, signal, cmd.lastSignal);
+                                               eDebugNoSimulate("[eDVBFrontend] locked step %d ok (%d %d)", cmd.okcount, signal, cmd.lastSignal);
                                        else
                                        {
-                                               eDebugNoSimulate("[SEC] locked step %d ok", cmd.okcount);
+                                               eDebugNoSimulate("[eDVBFrontend] locked step %d ok", cmd.okcount);
                                                if (!cmd.okcount)
                                                        cmd.lastSignal = signal;
                                        }
                                        ++cmd.okcount;
                                        if (cmd.okcount > 4)
                                        {
-                                               eDebugNoSimulate("ok > 4 .. goto %d\n", cmd.steps);
+                                               eDebugNoSimulate("[eDVBFrontend] ok > 4 .. goto %d\n", cmd.steps);
                                                setSecSequencePos(cmd.steps);
                                                m_state = stateLock;
                                                m_stateChanged(this);
@@ -1456,9 +1456,9 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                else
                                {
                                        if (isLocked)
-                                               eDebugNoSimulate("[SEC] rotor locked step %d failed (oldSignal %d, curSignal %d)", cmd.okcount, signal, cmd.lastSignal);
+                                               eDebugNoSimulate("[eDVBFrontend] rotor locked step %d failed (oldSignal %d, curSignal %d)", cmd.okcount, signal, cmd.lastSignal);
                                        else
-                                               eDebugNoSimulate("[SEC] rotor locked step %d failed (not locked)", cmd.okcount);
+                                               eDebugNoSimulate("[eDVBFrontend] rotor locked step %d failed (not locked)", cmd.okcount);
                                        cmd.okcount=0;
                                        cmd.lastSignal=0;
                                }
@@ -1467,7 +1467,7 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                        }
                        case eSecCommand::MEASURE_RUNNING_INPUTPOWER:
                                m_runningInputpower = sec_fe->readInputpower();
-                               eDebugNoSimulate("[SEC] runningInputpower is %d", m_runningInputpower);
+                               eDebugNoSimulate("[eDVBFrontend] runningInputpower is %d", m_runningInputpower);
                                ++m_sec_sequence.current();
                                break;
                        case eSecCommand::SET_ROTOR_MOVING:
@@ -1493,7 +1493,7 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                --m_timeoutCount;
                                if (!m_timeoutCount && m_retryCount > 0)
                                        --m_retryCount;
-                               eDebugNoSimulate("[SEC] waiting for rotor %s %d, idle %d, delta %d",
+                               eDebugNoSimulate("[eDVBFrontend] waiting for rotor %s %d, idle %d, delta %d",
                                        txt,
                                        m_runningInputpower,
                                        idleInputpower,
@@ -1502,17 +1502,17 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                        || (!cmd.direction && abs(m_runningInputpower - idleInputpower) <= cmd.deltaA) )
                                {
                                        ++cmd.okcount;
-                                       eDebugNoSimulate("[SEC] rotor %s step %d ok", txt, cmd.okcount);
+                                       eDebugNoSimulate("[eDVBFrontend] rotor %s step %d ok", txt, cmd.okcount);
                                        if ( cmd.okcount > 6 )
                                        {
-                                               eDebugNoSimulate("[SEC] rotor is %s", txt);
+                                               eDebugNoSimulate("[eDVBFrontend] rotor is %s", txt);
                                                if (setSecSequencePos(cmd.steps))
                                                        break;
                                        }
                                }
                                else
                                {
-                                       eDebugNoSimulate("[SEC] rotor not %s... reset counter.. increase timeout", txt);
+                                       eDebugNoSimulate("[eDVBFrontend] rotor not %s... reset counter.. increase timeout", txt);
                                        cmd.okcount=0;
                                }
                                ++m_sec_sequence.current();
@@ -1525,7 +1525,7 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                        ++m_sec_sequence.current();
                                break;
                        case eSecCommand::INVALIDATE_CURRENT_SWITCHPARMS:
-                               eDebugNoSimulate("[SEC] invalidate current switch params");
+                               eDebugNoSimulate("[eDVBFrontend] invalidate current switch params");
                                sec_fe_data[CSW] = -1;
                                sec_fe_data[UCSW] = -1;
                                sec_fe_data[TONEBURST] = -1;
@@ -1535,11 +1535,11 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                sec_fe_data[CSW] = sec_fe_data[NEW_CSW];
                                sec_fe_data[UCSW] = sec_fe_data[NEW_UCSW];
                                sec_fe_data[TONEBURST] = sec_fe_data[NEW_TONEBURST];
-                               eDebugNoSimulate("[SEC] update current switch params");
+                               eDebugNoSimulate("[eDVBFrontend] update current switch params");
                                ++m_sec_sequence.current();
                                break;
                        case eSecCommand::INVALIDATE_CURRENT_ROTORPARMS:
-                               eDebugNoSimulate("[SEC] invalidate current rotorparams");
+                               eDebugNoSimulate("[eDVBFrontend] invalidate current rotorparams");
                                sec_fe_data[ROTOR_CMD] = -1;
                                sec_fe_data[ROTOR_POS] = -1;
                                ++m_sec_sequence.current();
@@ -1547,17 +1547,17 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                        case eSecCommand::UPDATE_CURRENT_ROTORPARAMS:
                                sec_fe_data[ROTOR_CMD] = sec_fe_data[NEW_ROTOR_CMD];
                                sec_fe_data[ROTOR_POS] = sec_fe_data[NEW_ROTOR_POS];
-                               eDebugNoSimulate("[SEC] update current rotorparams %d %04lx %ld", m_timeoutCount, sec_fe_data[ROTOR_CMD], sec_fe_data[ROTOR_POS]);
+                               eDebugNoSimulate("[eDVBFrontend] update current rotorparams %d %04lx %ld", m_timeoutCount, sec_fe_data[ROTOR_CMD], sec_fe_data[ROTOR_POS]);
                                ++m_sec_sequence.current();
                                break;
                        case eSecCommand::SET_ROTOR_DISEQC_RETRYS:
                                m_retryCount = m_sec_sequence.current()++->val;
-                               eDebugNoSimulate("[SEC] set rotor retries %d", m_retryCount);
+                               eDebugNoSimulate("[eDVBFrontend] set rotor retries %d", m_retryCount);
                                break;
                        case eSecCommand::IF_NO_MORE_ROTOR_DISEQC_RETRYS_GOTO:
                                if (!m_retryCount)
                                {
-                                       eDebugNoSimulate("[SEC] no more rotor retrys");
+                                       eDebugNoSimulate("[eDVBFrontend] no more rotor retrys");
                                        setSecSequencePos(m_sec_sequence.current()->steps);
                                }
                                else
@@ -1574,9 +1574,9 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                        {
                                                bool slimiting = m_sec_sequence.current()->mode == eSecCommand::modeStatic;
                                                if (fprintf(f, "%s", slimiting ? "on" : "off") <= 0)
-                                                       eDebugNoSimulate("write %s failed!! (%m)", proc_name);
+                                                       eDebugNoSimulate("[eDVBFrontend] write %s failed: %m", proc_name);
                                                else
-                                                       eDebugNoSimulate("[SEC] set %s current limiting", slimiting ? "static" : "dynamic");
+                                                       eDebugNoSimulate("[eDVBFrontend] set %s current limiting", slimiting ? "static" : "dynamic");
                                        }
                                        else if (sec_fe->m_need_rotor_workaround)
                                        {
@@ -1595,19 +1595,19 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                                                        unsigned char data[2];
                                                        ::ioctl(fd, I2C_SLAVE_FORCE, 0x10 >> 1);
                                                        if(::read(fd, data, 1) != 1)
-                                                               eDebugNoSimulate("[SEC] error read lnbp (%m)");
+                                                               eDebugNoSimulate("[eDVBFrontend] error read lnbp: %m");
                                                        if ( m_sec_sequence.current()->mode == eSecCommand::modeStatic )
                                                        {
                                                                data[0] |= 0x80;  // enable static current limiting
-                                                               eDebugNoSimulate("[SEC] set static current limiting");
+                                                               eDebugNoSimulate("[eDVBFrontend] set static current limiting");
                                                        }
                                                        else
                                                        {
                                                                data[0] &= ~0x80;  // enable dynamic current limiting
-                                                               eDebugNoSimulate("[SEC] set dynamic current limiting");
+                                                               eDebugNoSimulate("[eDVBFrontend] set dynamic current limiting");
                                                        }
                                                        if(::write(fd, data, 1) != 1)
-                                                               eDebugNoSimulate("[SEC] error write lnbp (%m)");
+                                                               eDebugNoSimulate("[eDVBFrontend] error write lnbp: %m");
                                                        ::close(fd);
                                                }
                                        }
@@ -1617,13 +1617,13 @@ int eDVBFrontend::tuneLoopInt()  // called by m_tuneTimer
                        }
                        case eSecCommand::DELAYED_CLOSE_FRONTEND:
                        {
-                               eDebugNoSimulate("[SEC] delayed close frontend");
+                               eDebugNoSimulate("[eDVBFrontend] delayed close frontend");
                                closeFrontend(false, true);
                                ++m_sec_sequence.current();
                                break;
                        }
                        default:
-                               eDebugNoSimulate("[SEC] unhandled sec command %d",
+                               eDebugNoSimulate("[eDVBFrontend] unhandled sec command %d",
                                        ++m_sec_sequence.current()->cmd);
                                ++m_sec_sequence.current();
                }
@@ -1643,7 +1643,7 @@ void eDVBFrontend::setFrontend(bool recvEvents)
        {
                int type = -1;
                oparm.getSystem(type);
-               eDebug("setting frontend %d", m_dvbid);
+               eDebug("[eDVBFrontend] setting frontend %d", m_dvbid);
                if (recvEvents)
                        m_sn->start();
                feEvent(-1); // flush events
@@ -1975,13 +1975,13 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm,
        satfrequency = feparm.frequency;
        if (!m_sec)
        {
-               eWarning("no SEC module active!");
+               eWarning("[eDVBFrontend] no SEC module active!");
                return -ENOENT;
        }
        res = m_sec->prepare(*this, feparm, satfrequency, 1 << m_slotid, tunetimeout);
        if (!res)
        {
-               eDebugNoSimulate("prepare_sat System %d Freq %d Pol %d SR %d INV %d FEC %d orbpos %d system %d modulation %d pilot %d, rolloff %d",
+               eDebugNoSimulate("[eDVBFrontend] prepare_sat System %d Freq %d Pol %d SR %d INV %d FEC %d orbpos %d system %d modulation %d pilot %d, rolloff %d",
                        feparm.system,
                        feparm.frequency,
                        feparm.polarisation,
@@ -1995,10 +1995,10 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm,
                        feparm.rolloff);
                if ((unsigned int)satfrequency < fe_info.frequency_min || (unsigned int)satfrequency > fe_info.frequency_max)
                {
-                       eDebugNoSimulate("%d mhz out of tuner range.. dont tune", satfrequency / 1000);
+                       eDebugNoSimulate("[eDVBFrontend] %d mhz out of tuner range.. dont tune", satfrequency / 1000);
                        return -EINVAL;
                }
-               eDebugNoSimulate("tuning to %d mhz", satfrequency / 1000);
+               eDebugNoSimulate("[eDVBFrontend] tuning to %d mhz", satfrequency / 1000);
        }
        oparm.setDVBS(feparm, feparm.no_rotor_command_on_tune);
        return res;
@@ -2006,7 +2006,7 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm,
 
 RESULT eDVBFrontend::prepare_cable(const eDVBFrontendParametersCable &feparm)
 {
-       eDebugNoSimulate("tuning to %d khz, sr %d, fec %d, modulation %d, inversion %d",
+       eDebugNoSimulate("[eDVBFrontend] tuning to %d khz, sr %d, fec %d, modulation %d, inversion %d",
                feparm.frequency,
                feparm.symbol_rate,
                feparm.fec_inner,
@@ -2032,7 +2032,7 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
 {
        unsigned int timeout = 5000;
        int type;
-       eDebugNoSimulate("(%d)tune", m_dvbid);
+       eDebugNoSimulate("[eDVBFrontend] (%d)tune", m_dvbid);
 
        m_timeout->stop();
 
@@ -2046,7 +2046,7 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
 
        if (!m_sn && !m_simulate)
        {
-               eDebug("no frontend device opened... do not try to tune !!!");
+               eDebug("[eDVBFrontend] no frontend device opened... do not try to tune !!!");
                res = -ENODEV;
                goto tune_error;
        }
@@ -2065,7 +2065,7 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
                eDVBFrontendParametersSatellite feparm;
                if (where.getDVBS(feparm))
                {
-                       eDebug("no dvbs data!");
+                       eDebug("[eDVBFrontend] no dvbs data!");
                        res = -EINVAL;
                        goto tune_error;
                }
@@ -2079,7 +2079,7 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
                                sec_fe = linked_fe->m_frontend;
                                sec_fe->getData(LINKED_NEXT_PTR, tmp);
                        }
-                       eDebug("(fe%d) reset diseqc after leave rotor mode!", m_dvbid);
+                       eDebug("[eDVBFrontend] (fe%d) reset diseqc after leave rotor mode!", m_dvbid);
                        sec_fe->m_data[CSW] = sec_fe->m_data[UCSW] = sec_fe->m_data[TONEBURST] = sec_fe->m_data[ROTOR_CMD] = sec_fe->m_data[ROTOR_POS] = -1; // reset diseqc
                }
                m_rotor_mode = feparm.no_rotor_command_on_tune;
@@ -2112,7 +2112,7 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
                eDVBFrontendParametersTerrestrial feparm;
                if (where.getDVBT(feparm))
                {
-                       eDebug("no -T data");
+                       eDebug("[eDVBFrontend] no -T data");
                        res = -EINVAL;
                        goto tune_error;
                }
@@ -2468,7 +2468,7 @@ bool eDVBFrontend::setSlotInfo(int id, const char *descr, bool enabled, bool isD
                /* HACK for legacy dvb api without DELSYS support */
                m_delsys[SYS_DVBS2] = true;
        }
-       eDebugNoSimulate("setSlotInfo for dvb frontend %d to slotid %d, descr %s, need rotorworkaround %s, enabled %s, DVB-S2 %s",
+       eDebugNoSimulate("[eDVBFrontend] setSlotInfo for dvb frontend %d to slotid %d, descr %s, need rotorworkaround %s, enabled %s, DVB-S2 %s",
                m_dvbid, m_slotid, m_description, m_need_rotor_workaround ? "Yes" : "No", m_enabled ? "Yes" : "No", isDVBS2 ? "Yes" : "No" );
        return true;
 }
index 92eda4e..dd30377 100644 (file)
@@ -218,7 +218,7 @@ int eDVBSatelliteTransponderData::getInversion() const
        {
        case INVERSION_OFF: return eDVBFrontendParametersSatellite::Inversion_Off;
        case INVERSION_ON: return eDVBFrontendParametersSatellite::Inversion_On;
-       default: eDebug("got unsupported inversion from frontend! report as INVERSION_AUTO!\n");
+       default: eDebug("[eDVBSatelliteTransponderData] got unsupported inversion from frontend! report as INVERSION_AUTO!\n");
        case INVERSION_AUTO: return eDVBFrontendParametersSatellite::Inversion_Unknown;
        }
 }
@@ -259,7 +259,7 @@ int eDVBSatelliteTransponderData::getFecInner() const
        case FEC_8_9: return eDVBFrontendParametersSatellite::FEC_8_9;
        case FEC_9_10: return eDVBFrontendParametersSatellite::FEC_9_10;
        case FEC_NONE: return eDVBFrontendParametersSatellite::FEC_None;
-       default: eDebug("got unsupported FEC from frontend! report as FEC_AUTO!\n");
+       default: eDebug("[eDVBSatelliteTransponderData] got unsupported FEC from frontend! report as FEC_AUTO!\n");
        case FEC_AUTO: return eDVBFrontendParametersSatellite::FEC_Auto;
        }
 }
@@ -270,7 +270,7 @@ int eDVBSatelliteTransponderData::getModulation() const
 
        switch (getProperty(DTV_MODULATION))
        {
-       default: eDebug("got unsupported modulation from frontend! report as QPSK!");
+       default: eDebug("[eDVBSatelliteTransponderData] got unsupported modulation from frontend! report as QPSK!");
        case QPSK: return eDVBFrontendParametersSatellite::Modulation_QPSK;
        case PSK_8: return eDVBFrontendParametersSatellite::Modulation_8PSK;
        }
@@ -314,7 +314,7 @@ int eDVBSatelliteTransponderData::getSystem() const
 
        switch (getProperty(DTV_DELIVERY_SYSTEM))
        {
-       default: eDebug("got unsupported system from frontend! report as DVBS!");
+       default: eDebug("[eDVBSatelliteTransponderData] got unsupported system from frontend! report as DVBS!");
        case SYS_DVBS: return eDVBFrontendParametersSatellite::System_DVB_S;
        case SYS_DVBS2: return eDVBFrontendParametersSatellite::System_DVB_S2;
        }
index 7720f9c..5d3e357 100644 (file)
@@ -152,14 +152,14 @@ int eDVBMetaParser::parseRecordings(const std::string &filename)
        CFile f(recordings.c_str(), "r");
        if (!f)
        {
-//             eDebug("no recordings.epl found: %s: %m", recordings.c_str());
+//             eDebug("[eDVBMetaParser] no recordings.epl found: %s: %m", recordings.c_str());
                return -1;
        }
 
        std::string description;
        eServiceReferenceDVB ref;
 
-//     eDebug("parsing recordings.epl..");
+//     eDebug("[eDVBMetaParser] parsing recordings.epl..");
 
        while (1)
        {
@@ -183,7 +183,7 @@ int eDVBMetaParser::parseRecordings(const std::string &filename)
                        description = line + 14;
                else if ((line[0] == '/') && (ref.path.substr(ref.path.find_last_of('/')) == filename.substr(filename.find_last_of('/'))))
                {
-//                     eDebug("hit! ref %s descr %s", m_ref.toString().c_str(), m_name.c_str());
+//                     eDebug("[eDVBMetaParser] hit! ref %s descr %s", m_ref.toString().c_str(), m_name.c_str());
                        m_ref = ref;
                        m_name = description;
                        m_description = "";
index 20c812b..05781d1 100644 (file)
@@ -48,7 +48,7 @@ void ePESParser::processData(const uint8_t *p, int len)
                                        ch &= m_stream_id_mask;
                                if (ch != m_header[m_pes_position])
                                {
-//                                     eDebug("sync lost at %d (%02x)", m_pes_position, *p);
+//                                     eDebug("[ePESParser] sync lost at %d (%02x)", m_pes_position, *p);
                                        m_pes_position = 0;
                                        while (m_header[m_pes_position] == ch) /* guaranteed to stop at the old m_pes_position */
                                                m_pes_position++;
index f5028aa..ceddf0a 100644 (file)
@@ -59,12 +59,12 @@ void eDVBServicePMTHandler::channelStateChanged(iDVBChannel *channel)
                                m_pvr_demux_tmp = NULL;
                        }
                        else if (m_channel->getDemux(m_demux, (!m_use_decode_demux) ? 0 : iDVBChannel::capDecode))
-                               eDebug("Allocating %s-decoding a demux for now tuned-in channel failed.", m_use_decode_demux ? "" : "non-");
+                               eDebug("[eDVBServicePMTHandler] Allocating %s-decoding a demux for now tuned-in channel failed.", m_use_decode_demux ? "" : "non-");
                }
 
                if (m_demux)
                {
-                       eDebug("ok ... now we start!!");
+                       eDebug("[eDVBServicePMTHandler] ok ... now we start!!");
                        m_have_cached_program = false;
 
                        if (m_service && !m_service->cacheEmpty())
@@ -92,7 +92,7 @@ void eDVBServicePMTHandler::channelStateChanged(iDVBChannel *channel)
        } else if ((m_last_channel_state != iDVBChannel::state_failed) &&
                        (state == iDVBChannel::state_failed))
        {
-               eDebug("tune failed.");
+               eDebug("[eDVBServicePMTHandler] tune failed.");
                serviceEvent(eventTuneFailed);
        }
 }
@@ -172,7 +172,7 @@ void eDVBServicePMTHandler::PMTready(int error)
                        if (!m_PMT.getCurrent(ptr))
                                eDVBCAHandler::getInstance()->handlePMT(m_reference, ptr);
                        else
-                               eDebug("eDVBServicePMTHandler cannot call buildCAPMT");
+                               eDebug("[eDVBServicePMTHandler] cannot call buildCAPMT");
                }
        }
 }
@@ -184,7 +184,7 @@ void eDVBServicePMTHandler::sendEventNoPatEntry()
 
 void eDVBServicePMTHandler::PATready(int)
 {
-       eDebug("PATready");
+       eDebug("[eDVBServicePMTHandler] PATready");
        ePtr<eTable<ProgramAssociationSection> > ptr;
        if (!m_PAT.getCurrent(ptr))
        {
@@ -212,16 +212,16 @@ void eDVBServicePMTHandler::PATready(int)
                }
                if (pmtpid_single != -1) // only one PAT entry .. and not valid pmtpid found
                {
-                       eDebug("use single pat entry!");
+                       eDebug("[eDVBServicePMTHandler] use single pat entry!");
                        m_reference.setServiceID(eServiceID(service_id_single));
                        pmtpid = pmtpid_single;
                }
                if (pmtpid == -1) {
-                       eDebug("no PAT entry found.. start delay");
+                       eDebug("[eDVBServicePMTHandler] no PAT entry found.. start delay");
                        m_no_pat_entry_delay->start(1000, true);
                }
                else {
-                       eDebug("use pmtpid %04x for service_id %04x", pmtpid, m_reference.getServiceID().get());
+                       eDebug("[eDVBServicePMTHandler] use pmtpid %04x for service_id %04x", pmtpid, m_reference.getServiceID().get());
                        m_no_pat_entry_delay->stop();
                        m_PMT.begin(eApp, eDVBPMTSpec(pmtpid, m_reference.getServiceID().get()), m_demux);
                }
@@ -231,7 +231,7 @@ void eDVBServicePMTHandler::PATready(int)
 
 void eDVBServicePMTHandler::AITready(int error)
 {
-       eDebug("AITready");
+       eDebug("[eDVBServicePMTHandler] AITready");
        ePtr<eTable<ApplicationInformationSection> > ptr;
        m_aitInfoList.clear();
        if (!m_AIT.getCurrent(ptr))
@@ -255,6 +255,7 @@ void eDVBServicePMTHandler::AITready(int error)
                                                for (ApplicationNameConstIterator appnamesit = appname->getApplicationNames()->begin(); appnamesit != appname->getApplicationNames()->end(); ++appnamesit)
                                                {
                                                        aitinfo.name = (*appnamesit)->getApplicationName();
+                                                       eDebug("[eDVBServicePMTHandler] AIT: %s", aitinfo.name.c_str());
                                                }
                                                break;
                                        }
@@ -317,7 +318,7 @@ void eDVBServicePMTHandler::AITready(int error)
 
 void eDVBServicePMTHandler::OCready(int error)
 {
-       eDebug("OCready");
+       eDebug("[eDVBServicePMTHandler] OCready");
        ePtr<eTable<OCSection> > ptr;
        if (!m_OC.getCurrent(ptr))
        {
@@ -723,7 +724,7 @@ void eDVBServicePMTHandler::SDTScanEvent(int event)
                {
                        ePtr<iDVBChannelList> db;
                        if (m_resourceManager->getChannelList(db) != 0)
-                               eDebug("no channel list");
+                               eDebug("[eDVBServicePMTHandler] no channel list");
                        else
                        {
                                eDVBChannelID chid;
@@ -731,10 +732,10 @@ void eDVBServicePMTHandler::SDTScanEvent(int event)
                                if (chid == m_dvb_scan->getCurrentChannelID())
                                {
                                        m_dvb_scan->insertInto(db, true);
-                                       eDebug("sdt update done!");
+                                       eDebug("[eDVBServicePMTHandler] sdt update done!");
                                }
                                else
-                                       eDebug("ignore sdt update data.... incorrect transponder tuned!!!");
+                                       eDebug("[eDVBServicePMTHandler] ignore sdt update data.... incorrect transponder tuned!!!");
                        }
                        break;
                }
@@ -770,7 +771,7 @@ int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_dem
                ref.getChannelID(chid);
                res = m_resourceManager->allocateChannel(chid, m_channel, simulate);
                if (!simulate)
-                       eDebug("allocate Channel: res %d", res);
+                       eDebug("[eDVBServicePMTHandler] allocate Channel: res %d", res);
 
                ePtr<iDVBChannelList> db;
                if (!m_resourceManager->getChannelList(db))
@@ -784,7 +785,7 @@ int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_dem
                {
                        eDVBTSTools tstools;
                        bool b = source || !tstools.openFile(ref.path.c_str(), 1);
-                       eWarning("no .meta file found, trying to find PMT pid");
+                       eWarning("[eDVBServicePMTHandler] no .meta file found, trying to find PMT pid");
                        if (source)
                                tstools.setSource(source, NULL);
                        if (b)
@@ -793,20 +794,20 @@ int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_dem
                                if (!tstools.findPMT(program))
                                {
                                        m_pmt_pid = program.pmtPid;
-                                       eDebug("PMT pid found on pid %04x, service id %d", m_pmt_pid, program.serviceId);
+                                       eDebug("[eDVBServicePMTHandler] PMT pid %04x, service id %d", m_pmt_pid, program.serviceId);
                                        m_reference.setServiceID(program.serviceId);
                                }
                        }
                        else
-                               eWarning("no valid source to find PMT pid!");
+                               eWarning("[eDVBServicePMTHandler] no valid source to find PMT pid!");
                }
-               eDebug("alloc PVR");
+               eDebug("[eDVBServicePMTHandler] alloc PVR");
                        /* allocate PVR */
                eDVBChannelID chid;
                if (m_service_type == streamclient) ref.getChannelID(chid);
                res = m_resourceManager->allocatePVRChannel(chid, m_pvr_channel);
                if (res)
-                       eDebug("allocatePVRChannel failed!\n");
+                       eDebug("[eDVBServicePMTHandler] allocatePVRChannel failed!\n");
                m_channel = m_pvr_channel;
        }
 
@@ -851,7 +852,7 @@ int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_dem
                        m_pvr_channel->setCueSheet(cue);
 
                        if (m_pvr_channel->getDemux(m_pvr_demux_tmp, (!m_use_decode_demux) ? 0 : iDVBChannel::capDecode))
-                               eDebug("Allocating %s-decoding a demux for PVR channel failed.", m_use_decode_demux ? "" : "non-");
+                               eDebug("[eDVBServicePMTHandler] Allocating %s-decoding a demux for PVR channel failed.", m_use_decode_demux ? "" : "non-");
                        else if (source)
                                m_pvr_channel->playSource(source, streaminfo_file);
                        else
index 258209a..91d89fd 100644 (file)
@@ -202,7 +202,7 @@ int eDVBPMTParser::getProgramInfo(program &program)
                                                                        case 0x20 ... 0x23: // dvb subtitles hearing impaired
                                                                                break;
                                                                        default:
-                                                                               eDebug("dvb subtitle %s PID %04x with wrong subtitling type (%02x)... force 0x10!!",
+                                                                               eDebug("[eDVBPMTParser] dvb subtitle %s PID %04x with wrong subtitling type (%02x)... force 0x10!!",
                                                                                s.language_code.c_str(), s.pid, s.subtitling_type);
                                                                                s.subtitling_type = 0x10;
                                                                                break;
@@ -211,7 +211,7 @@ int eDVBPMTParser::getProgramInfo(program &program)
                                                                        s.ancillary_page_id = (*it)->getAncillaryPageId();
                                                                        std::string language = (*it)->getIso639LanguageCode();
                                                                        s.language_code = language;
-//                                                             eDebug("add dvb subtitle %s PID %04x, type %d, composition page %d, ancillary_page %d", s.language_code.c_str(), s.pid, s.subtitling_type, s.composition_page_id, s.ancillary_page_id);
+//                                                             eDebug("[eDVBPMTParser] add dvb subtitle %s PID %04x, type %d, composition page %d, ancillary_page %d", s.language_code.c_str(), s.pid, s.subtitling_type, s.composition_page_id, s.ancillary_page_id);
                                                                        issubtitle = 1;
                                                                        program.subtitleStreams.push_back(s);
                                                                }
@@ -237,7 +237,7 @@ int eDVBPMTParser::getProgramInfo(program &program)
                                                                                        s.language_code = language;
                                                                                        s.teletext_page_number = (*it)->getTeletextPageNumber();
                                                                                        s.teletext_magazine_number = (*it)->getTeletextMagazineNumber();
-//                                                                             eDebug("add teletext subtitle %s PID %04x, page number %d, magazine number %d", s.language_code.c_str(), s.pid, s.teletext_page_number, s.teletext_magazine_number);
+//                                                                             eDebug("[eDVBPMTParser] add teletext subtitle %s PID %04x, page number %d, magazine number %d", s.language_code.c_str(), s.pid, s.teletext_page_number, s.teletext_magazine_number);
                                                                                        program.subtitleStreams.push_back(s);
                                                                                        issubtitle=1;
                                                                                default:
@@ -353,7 +353,7 @@ int eDVBPMTParser::getProgramInfo(program &program)
                                        if (!num_descriptors && streamtype == 0x06 && prev_audio)
                                        {
                                                prev_audio->rdsPid = (*es)->getPid();
-                                               eDebug("Rds PID %04x detected ? ! ?", prev_audio->rdsPid);
+                                               eDebug("[eDVBPMTParser] Rds PID %04x detected ? ! ?", prev_audio->rdsPid);
                                        }
                                        prev_audio = 0;
                                        break;
@@ -393,13 +393,13 @@ int eDVBPMTParser::getProgramInfo(program &program)
                                }
                                if (isteletext && (isaudio || isvideo))
                                {
-                                       eDebug("ambiguous streamtype for PID %04x detected.. forced as teletext!", (*es)->getPid());
+                                       eDebug("[eDVBPMTParser] ambiguous streamtype for PID %04x detected.. forced as teletext!", (*es)->getPid());
                                        continue; // continue with next PID
                                }
                                else if (issubtitle && (isaudio || isvideo))
-                                       eDebug("ambiguous streamtype for PID %04x detected.. forced as subtitle!", (*es)->getPid());
+                                       eDebug("[eDVBPMTParser] ambiguous streamtype for PID %04x detected.. forced as subtitle!", (*es)->getPid());
                                else if (isaudio && isvideo)
-