Merge branch 'dvbsi++' of coolstreamtech.de:cst-private-neutrino into neutrino-apollo

Origin commit data
------------------
Branch: ni/coolstream
Commit: 688f464bb6
Author: [CST] Bas <bas@coolstreamtech.com>
Date: 2012-09-10 (Mon, 10 Sep 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Bas
2012-09-10 07:39:30 +08:00
364 changed files with 4885 additions and 3020 deletions

View File

@@ -150,12 +150,12 @@ inline void readLockServices(void)
{
pthread_rwlock_rdlock(&servicesLock);
}
#ifdef ENABLE_SDT
inline void writeLockServices(void)
{
pthread_rwlock_wrlock(&servicesLock);
}
#endif
inline void unlockServices(void)
{
pthread_rwlock_unlock(&servicesLock);
@@ -1164,7 +1164,7 @@ static void commandReadSIfromXML(int connfd, char *data, const unsigned dataLeng
static void commandWriteSI2XML(int connfd, char *data, const unsigned dataLength)
{
sendEmptyResponse(connfd, NULL, 0);
if ((!reader_ready) || (dataLength > 100)){
if (mySIeventsOrderUniqueKey.empty() || (!reader_ready) || (dataLength > 100)){
eventServer->sendEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, CEventServer::INITID_SECTIONSD);
return;
}
@@ -1672,8 +1672,6 @@ void CCNThread::beforeWait()
if (updating || eit_version == 0xff)
return;
updating = true;
unsigned char filter[DMX_FILTER_SIZE];
unsigned char mask[DMX_FILTER_SIZE];
unsigned char mode[DMX_FILTER_SIZE];
@@ -1693,17 +1691,22 @@ void CCNThread::beforeWait()
mask[3] = (0x1F << 1) | 0x01;
mode[3] = 0x1F << 1;
update_mutex.lock();
eitDmx->Open(DMX_PSI_CHANNEL);
eitDmx->sectionFilter(0x12, filter, mask, 4, 0 /*timeout*/, mode);
updating = true;
update_mutex.unlock();
}
void CCNThread::afterWait()
{
xprintf("%s: stop eit update filter (%s)\n", name.c_str(), updating ? "active" : "not active");
update_mutex.lock();
if (updating) {
updating = false;
eitDmx->Close();
}
update_mutex.unlock();
}
void CCNThread::beforeSleep()
@@ -1743,11 +1746,16 @@ void CCNThread::processSection()
/* CN specific functions */
bool CCNThread::checkUpdate()
{
if (!updating)
return false;
unsigned char buf[MAX_SECTION_LENGTH];
update_mutex.lock();
if (!updating) {
update_mutex.unlock();
return false;
}
int ret = eitDmx->Read(buf, MAX_SECTION_LENGTH, 10);
update_mutex.unlock();
if (ret > 0) {
LongSection section(buf);