Merge branch 'master' of /home/tmbinc/enigma2-git
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 6 Apr 2009 12:09:07 +0000 (14:09 +0200)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 6 Apr 2009 12:09:07 +0000 (14:09 +0200)
18 files changed:
lib/base/thread.cpp
lib/dvb/db.cpp
lib/dvb/dvb.cpp
lib/dvb/scan.cpp
lib/gdi/grc.cpp
lib/gdi/region.cpp
lib/gui/einputnumber.cpp
lib/gui/einputstring.cpp
lib/gui/elistbox.cpp
lib/gui/ewidget.cpp
lib/gui/ewidgetdesktop.cpp
lib/nav/core.cpp
lib/nav/pcore.cpp
lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
lib/service/listboxservice.cpp
lib/service/servicedvb.cpp
lib/service/servicemp3.cpp
lib/service/servicexine.cpp

index 9878856eaa483007ccaa7d92f42043645c49a835..db6deb3585023c8a5fd0b6900af1177d19d326ad 100644 (file)
@@ -2,7 +2,6 @@
 
 #include <stdio.h>
 #include <unistd.h>
-#include <assert.h>
 #include <lib/base/eerror.h>
 
 void eThread::thread_completed(void *ptr)
@@ -14,7 +13,7 @@ void eThread::thread_completed(void *ptr)
        if (!p->m_state.value())
        {
                p->m_state.up();
-               assert(p->m_state.value() == 1);
+               ASSERT(p->m_state.value() == 1);
        }
 
        p->thread_finished();
@@ -43,8 +42,8 @@ int eThread::runAsync(int prio, int policy)
                return -1;
        
        eDebug("after: %d", m_state.value());
-       assert(m_state.value() == 1); /* sync postconditions */
-       assert(!m_alive);
+       ASSERT(m_state.value() == 1); /* sync postconditions */
+       ASSERT(!m_alive);
        m_state.down();
        
        m_alive = 1;
@@ -91,7 +90,7 @@ int eThread::sync(void)
        int res;
        m_state.down(); /* this might block */
        res = m_alive;
-       assert(m_state.value() == 0);
+       ASSERT(m_state.value() == 0);
        m_state.up();
        return res; /* 0: thread is guaranteed not to run. 1: state unknown. */
 }
@@ -121,6 +120,6 @@ void eThread::kill(bool sendcancel)
 
 void eThread::hasStarted()
 {
-       assert(!m_state.value());
+       ASSERT(!m_state.value());
        m_state.up();
 }
index e4d9ad228e6d8139ca3911e4fa9bf075a4329459..647afad42a7936a649a2a17a6161bb3e86e1cf31 100644 (file)
@@ -1374,7 +1374,7 @@ RESULT eDVBDB::addChannelToList(const eDVBChannelID &id, iDVBFrontendParameters
 {
        channel ch;
        std::map<eDVBChannelID, channel>::iterator it = m_channels.find(id);
-       assert(feparm);
+       ASSERT(feparm);
        ch.m_frontendParameters = feparm;
        if (it != m_channels.end())
                it->second = ch;
index f0186de70b24a84c529b8aaa6e86ad63f5f3d99a..208f51d4dacbad36d384438e93fa5fb92a3b9706 100644 (file)
@@ -1828,7 +1828,7 @@ void eCueSheet::clear()
 
 void eCueSheet::addSourceSpan(const pts_t &begin, const pts_t &end)
 {
-       assert(begin < end);
+       ASSERT(begin < end);
        m_lock.WrLock();
        m_spans.push_back(std::pair<pts_t, pts_t>(begin, end));
        m_lock.Unlock();
index 379ab8e9a01b56924486e70cc370d4c9b1f2c57a..04c78c611b44332188323c13f1e868a54093629b 100644 (file)
@@ -137,7 +137,7 @@ RESULT eDVBScan::nextChannel()
 RESULT eDVBScan::startFilter()
 {
        bool startSDT=true;
-       assert(m_demux);
+       ASSERT(m_demux);
 
                        /* only start required filters filter */
 
@@ -163,7 +163,7 @@ RESULT eDVBScan::startFilter()
                {
                        std::vector<ProgramAssociationSection*>::const_iterator i =
                                m_PAT->getSections().begin();
-                       assert(i != m_PAT->getSections().end());
+                       ASSERT(i != m_PAT->getSections().end());
                        tsid = (*i)->getTableIdExtension(); // in PAT this is the transport stream id
                        m_pat_tsid = eTransportStreamID(tsid);
                        for (; i != m_PAT->getSections().end(); ++i)
index c8af2457e1d67a7911ff1cb6430de257e4b0dbae..86d53fd3cc1021d3d8fd31c108c295c90f04e499 100644 (file)
@@ -609,7 +609,7 @@ void gDC::exec(gOpcode *o)
        {
                ePtr<eTextPara> para = new eTextPara(o->parm.renderText->area);
                int flags = o->parm.renderText->flags;
-               assert(m_current_font);
+               ASSERT(m_current_font);
                para->setFont(m_current_font);
                para->renderString(o->parm.renderText->text, (flags & gPainter::RT_WRAP) ? RS_WRAP : 0);
                if (o->parm.renderText->text)
index d75221fe882f6e2794be6555e6c94a29c2eaad8f..bbad3aa080ad570248f12633e62ad3535ace73b4 100644 (file)
@@ -42,7 +42,7 @@ int gRegion::do_coalesce(int prevStart, unsigned int curStart)
 {
                // Figure out how many rectangles are in the band.
        unsigned int numRects = curStart - prevStart;
-       assert(numRects == rects.size() - curStart);
+       ASSERT(numRects == rects.size() - curStart);
        if (!numRects)
                return curStart;
        std::vector<eRect>::iterator prevBox = rects.begin() + prevStart;
@@ -84,11 +84,11 @@ void gRegion::appendNonO(std::vector<eRect>::const_iterator r,
                        std::vector<eRect>::const_iterator rEnd, int y1, int y2)
 {
        int newRects = rEnd - r;
-       assert(y1 < y2);
-       assert(newRects != 0);
+       ASSERT(y1 < y2);
+       ASSERT(newRects != 0);
        rects.reserve(rects.size() + newRects);
        do {
-               assert(r->x1 < r->x2);
+               ASSERT(r->x1 < r->x2);
                rects.push_back(eRect(r->x1, y1, r->x2 - r->x1, y2 - y1));
                r++;
        } while (r != rEnd);
@@ -104,8 +104,8 @@ void gRegion::intersectO(
 {
        int x1, x2;
 
-       assert(y1 < y2);
-       assert(r1 != r1End && r2 != r2End);
+       ASSERT(y1 < y2);
+       ASSERT(r1 != r1End && r2 != r2End);
 
        do {
                x1 = max(r1->x1, r2->x1);
@@ -131,8 +131,8 @@ void gRegion::subtractO(
        int x1;
        x1 = r1->x1;
                
-       assert(y1<y2);
-       assert(r1 != r1End && r2 != r2End);
+       ASSERT(y1<y2);
+       ASSERT(r1 != r1End && r2 != r2End);
        
        do {
                if (r2->x2 <= x1)
@@ -146,7 +146,7 @@ void gRegion::subtractO(
                        } else
                                ++r2;
                } else if (r2->x1 < r1->x2) {
-                       assert(x1<r2->x1);
+                       ASSERT(x1<r2->x1);
                        rects.push_back(eRect(x1, y1, r2->x1 - x1, y2 - y1));
                        x1 = r2->x2;
                        if (x1 >= r1->x2) {
@@ -166,7 +166,7 @@ void gRegion::subtractO(
        } while ((r1 != r1End) && (r2 != r2End));
        while (r1 != r1End)
        {
-               assert(x1<r1->x2);
+               ASSERT(x1<r1->x2);
                rects.push_back(eRect(x1, y1, r1->x2 - x1, y2 - y1));
                ++r1;
                if (r1 != r1End)
@@ -199,8 +199,8 @@ void gRegion::mergeO(
 {
        int x1, x2;
        
-       assert(y1 < y2);
-       assert(r1 != r1End && r2 != r2End);
+       ASSERT(y1 < y2);
+       ASSERT(r1 != r1End && r2 != r2End);
        
        if (r1->x1 < r2->x1)
        {
@@ -244,8 +244,8 @@ void gRegion::regionOp(const gRegion &reg1, const gRegion &reg2, int opcode, int
        
        int newSize  = reg1.rects.size();
        int numRects = reg2.rects.size();
-       assert(r1 != r1End);
-       assert(r2 != r2End);
+       ASSERT(r1 != r1End);
+       ASSERT(r2 != r2End);
        
        if (numRects > newSize)
                newSize = numRects;
@@ -256,8 +256,8 @@ void gRegion::regionOp(const gRegion &reg1, const gRegion &reg2, int opcode, int
        int ybot = min(r1->y1, r2->y1);
        prevBand = 0;
        do {
-               assert(r1 != r1End);
-               assert(r2 != r2End);
+               ASSERT(r1 != r1End);
+               ASSERT(r2 != r2End);
                FindBand(r1, r1BandEnd, r1End, r1y1);
                FindBand(r2, r2BandEnd, r2End, r2y1);
                if (r1y1 < r2y1) {
@@ -299,7 +299,7 @@ void gRegion::regionOp(const gRegion &reg1, const gRegion &reg2, int opcode, int
                                mergeO(r1, r1BandEnd, r2, r2BandEnd, ytop, ybot, overlap);
                                break;
                        default:
-                               assert(0);
+                               ASSERT(0);
                                break;
                        }
                        coalesce(prevBand, curBand);
index 29c7880163715548e1d5c3b20c209c9351ac0d07..a71e161f1e431d268085e6cfb93af4e263b6885e 100644 (file)
@@ -105,7 +105,7 @@ int eInputContentNumber::haveKey(int code, int overwrite)
                
                m_cursor++;
                
-               assert(m_cursor <= m_len);
+               ASSERT(m_cursor <= m_len);
  
                if (m_input)
                        m_input->invalidate();
index 9ead4fa9b5b91d15c4ebea1f906991901e5eee28..4562e6332a56dcd56577607487d6d2c92b3fc7e6 100644 (file)
@@ -65,7 +65,7 @@ int eInputContentString::haveKey(int code, int overwrite)
                
                m_cursor++;
                
-               assert(m_cursor <= m_len);
+               ASSERT(m_cursor <= m_len);
  
                if (m_input)
                        m_input->invalidate();
index e8a0dada13a17cddf4d3585ce464cd83dd604db6..c13114e83ebbf8bc93df4571ef0e6029a7b621d2 100644 (file)
@@ -302,7 +302,7 @@ int eListbox::event(int event, void *data, void *data2)
                
                if (!m_content)
                        return eWidget::event(event, data, data2);
-               assert(m_content);
+               ASSERT(m_content);
                
                getStyle(style);
                
index a302cbc65dc8b30e8779bb3485a6db242e5fd62e..2320cd467827fbb282b248ead11733bc5c4a27c9 100644 (file)
@@ -88,7 +88,7 @@ void eWidget::invalidate(const gRegion &region)
        while (root && !root->m_desktop)
        {
                root = root->m_parent;
-               assert(root);
+               ASSERT(root);
                if (root->m_layer != -1)
                        target_layer = root->m_layer;
                abspos += root->position();
@@ -122,7 +122,7 @@ void eWidget::show()
                                        probably somebody already erased the root, but tries some
                                        operations on a child window. 
                                                                        ignore them for now. */
-                       /* assert(root); */
+                       /* ASSERT(root); */
                        return;
                }
                if (root->m_layer != -1)
@@ -162,7 +162,7 @@ void eWidget::hide()
                        return;
                abspos += root->position();
        }
-       assert(root->m_desktop);
+       ASSERT(root->m_desktop);
 
        gRegion abs = m_visible_with_childs;
        abs.moveBy(abspos);
@@ -218,7 +218,7 @@ ePoint eWidget::getAbsolutePosition()
        while (root && !root->m_desktop)
        {
                root = root->m_parent;
-               assert(root);
+               ASSERT(root);
                abspos += root->position();
        }
 
@@ -303,7 +303,7 @@ void eWidget::recalcClipRegionsWhenVisible()
                        break;
                }
                t = t->m_parent;
-               assert(t);
+               ASSERT(t);
        } while(1);
 }
 
index 63aeaaceb999c0f6b731a86ff12a47862ad83231..05b4ec4db07979d612875f10e306b0038dad335c 100644 (file)
@@ -7,7 +7,7 @@ extern void dumpRegion(const gRegion &region);
 
 void eWidgetDesktop::addRootWidget(eWidget *root)
 {
-       assert(!root->m_desktop);
+       ASSERT(!root->m_desktop);
        
        int invert_sense = 0;
                /* buffered mode paints back-to-front, while immediate mode is front-to-back. */
@@ -374,7 +374,7 @@ void eWidgetDesktop::makeCompatiblePixmap(gPixmap &pm)
        ePtr<gPixmap> target_pixmap;
        m_screen.m_dc->getPixmap(target_pixmap);
        
-       assert(target_pixmap);
+       ASSERT(target_pixmap);
        
        if (target_pixmap->surface && target_pixmap->surface->bpp > 8)
                return;
@@ -462,7 +462,7 @@ void eWidgetDesktop::redrawComposition(int notified)
        if (m_comp_mode != cmBuffered)
                return;
        
-       assert(m_screen.m_dc);
+       ASSERT(m_screen.m_dc);
        
        gPainter p(m_screen.m_dc);
        p.resetClip(eRect(ePoint(0, 0), m_screen.m_screen_size));
index 90650f68262d012cf1fc8e23bebe7a1784c10572..ad777660f5d3dc04d969a5468ecdf1e5da56e479 100644 (file)
@@ -26,7 +26,7 @@ RESULT eNavigation::playService(const eServiceReference &service)
 {
        stopService();
        
-       assert(m_servicehandler);
+       ASSERT(m_servicehandler);
        RESULT res = m_servicehandler->play(service, m_runningService);
        if (m_runningService)
        {
@@ -74,7 +74,7 @@ RESULT eNavigation::stopService(void)
 
 RESULT eNavigation::recordService(const eServiceReference &ref, ePtr<iRecordableService> &service, bool simulate)
 {
-       assert(m_servicehandler);
+       ASSERT(m_servicehandler);
        RESULT res = m_servicehandler->record(ref, service);
        eDebug("record: %d", res);
        if (res)
@@ -148,7 +148,7 @@ RESULT eNavigation::pause(int dop)
 
 eNavigation::eNavigation(iServiceHandler *serviceHandler)
 {
-       assert(serviceHandler);
+       ASSERT(serviceHandler);
        m_servicehandler = serviceHandler;
 }
 
index b38e559716fb8fcf4842355db2f190f19b1f9d2e..264817ce0a06d9ae45acae070fa3a417ec194bcf 100644 (file)
@@ -10,7 +10,7 @@ pNavigation::pNavigation()
        ePtr<iServiceHandler> service_center;
        eServiceCenter::getInstance(service_center);
 
-       assert(service_center);
+       ASSERT(service_center);
        m_core = new eNavigation(service_center);
        
        m_core->connectEvent(slot(*this, &pNavigation::navEvent), m_nav_event_connection);
index e35f2807bdd6369e8d595b547d78b9e6c45beabb..2b3eab0b7ca32ee733f8f9612a7aa1a2eccd0968 100644 (file)
@@ -302,7 +302,7 @@ RESULT eServiceDVD::connectEvent(const Slot2<void,iPlayableService*,int> &event,
 
 RESULT eServiceDVD::start()
 {
-       assert(m_state == stIdle);
+       ASSERT(m_state == stIdle);
        m_state = stRunning;
        eDebug("eServiceDVD starting");
 //     m_event(this, evStart);
@@ -311,7 +311,7 @@ RESULT eServiceDVD::start()
 
 RESULT eServiceDVD::stop()
 {
-       assert(m_state != stIdle);
+       ASSERT(m_state != stIdle);
        if (m_state == stStopped)
                return -1;
        eDebug("DVD: stop %s", m_filename.c_str());
index 6cd7c625208c8aff4923ab7b4651377bfee6921d..a2c6b8fedd3e6a7f100cb5bf61c8611902608edc 100644 (file)
@@ -67,7 +67,7 @@ void eListboxServiceContent::setRoot(const eServiceReference &root, bool justSet
                m_lst=0;
                return;
        }
-       assert(m_service_center);
+       ASSERT(m_service_center);
        
        if (m_service_center->list(m_root, m_lst))
                eDebug("no list available!");
index b92965da5a78c6d5d61199b8e5cdd1d25b6abccb..4b762b9933b014f93455e5c1c1cae96cc98d4b63 100644 (file)
@@ -1133,7 +1133,7 @@ RESULT eDVBServicePlay::pause(ePtr<iPauseableService> &ptr)
 
 RESULT eDVBServicePlay::setSlowMotion(int ratio)
 {
-       assert(ratio); /* The API changed: instead of calling setSlowMotion(0), call play! */
+       ASSERT(ratio); /* The API changed: instead of calling setSlowMotion(0), call play! */
        eDebug("eDVBServicePlay::setSlowMotion(%d)", ratio);
        setFastForward_internal(0);
        if (m_decoder)
@@ -1145,7 +1145,7 @@ RESULT eDVBServicePlay::setSlowMotion(int ratio)
 RESULT eDVBServicePlay::setFastForward(int ratio)
 {
        eDebug("eDVBServicePlay::setFastForward(%d)", ratio);
-       assert(ratio);
+       ASSERT(ratio);
        return setFastForward_internal(ratio);
 }
 
index b1764eb462fc87c3b102fcc2456959b01357f9c7..006c6e941933881d653afbb75828028f63078fef 100644 (file)
@@ -621,7 +621,7 @@ RESULT eServiceMP3::connectEvent(const Slot2<void,iPlayableService*,int> &event,
 
 RESULT eServiceMP3::start()
 {
-       assert(m_state == stIdle);
+       ASSERT(m_state == stIdle);
        
        m_state = stRunning;
        if (m_gst_pipeline)
@@ -635,7 +635,7 @@ RESULT eServiceMP3::start()
 
 RESULT eServiceMP3::stop()
 {
-       assert(m_state != stIdle);
+       ASSERT(m_state != stIdle);
        if (m_state == stStopped)
                return -1;
        eDebug("MP3: %s stop\n", m_filename.c_str());
index 47be4d422e8cab79804e28bbbe33adcaf6e166e1..44e6a6e0ec6d96364435eb2844532955768351b6 100644 (file)
@@ -175,8 +175,8 @@ RESULT eServiceXine::start()
        if (m_state == stError)
                return -1;
 
-       assert(m_state == stIdle);
-       assert(stream);
+       ASSERT(m_state == stIdle);
+       ASSERT(stream);
        
        if (!xine_open(stream, m_filename.c_str()))
        {
@@ -201,8 +201,8 @@ RESULT eServiceXine::stop()
        if (m_state == stError)
                return -1;
 
-       assert(m_state != stIdle);
-       assert(stream);
+       ASSERT(m_state != stIdle);
+       ASSERT(stream);
        if (m_state == stStopped)
                return -1;
        printf("Xine: %s stop\n", m_filename.c_str());
@@ -259,7 +259,7 @@ RESULT eServiceXine::getLength(pts_t &pts)
        pts = -1;
        if (m_state == stError)
                return 1;
-       assert(stream);
+       ASSERT(stream);
        
        int pos_stream, pos_time, length_time;
        
@@ -293,7 +293,7 @@ RESULT eServiceXine::getPlayPosition(pts_t &pts)
        pts = -1;
        if (m_state == stError)
                return 1;
-       assert(stream);
+       ASSERT(stream);
        
        int pos_stream, pos_time, length_time;