mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
eitd/eitd.h: move name to DMX class;
add debug to thread Stop
This commit is contained in:
@@ -90,7 +90,8 @@ class CSectionThread : public OpenThreads::Thread, public DMX
|
|||||||
int timeoutsDMX;
|
int timeoutsDMX;
|
||||||
unsigned timeoutInMSeconds;
|
unsigned timeoutInMSeconds;
|
||||||
bool running;
|
bool running;
|
||||||
std::string name;
|
//std::string name;
|
||||||
|
int event_count; // debug
|
||||||
|
|
||||||
virtual void run() {};
|
virtual void run() {};
|
||||||
int Sleep(unsigned int timeout)
|
int Sleep(unsigned int timeout)
|
||||||
@@ -106,6 +107,7 @@ class CSectionThread : public OpenThreads::Thread, public DMX
|
|||||||
pthread_mutex_unlock( &start_stop_mutex );
|
pthread_mutex_unlock( &start_stop_mutex );
|
||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
bool addEvents();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -114,6 +116,7 @@ class CSectionThread : public OpenThreads::Thread, public DMX
|
|||||||
static_buf = new uint8_t[MAX_SECTION_LENGTH];
|
static_buf = new uint8_t[MAX_SECTION_LENGTH];
|
||||||
timeoutsDMX = 0;
|
timeoutsDMX = 0;
|
||||||
running = false;
|
running = false;
|
||||||
|
event_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
~CSectionThread()
|
~CSectionThread()
|
||||||
@@ -131,8 +134,14 @@ class CSectionThread : public OpenThreads::Thread, public DMX
|
|||||||
{
|
{
|
||||||
if(!running)
|
if(!running)
|
||||||
return false;
|
return false;
|
||||||
|
printf("%s::Stop: to lock\n", name.c_str());
|
||||||
|
lock();
|
||||||
running = false;
|
running = false;
|
||||||
|
printf("%s::Stop: to broadcast\n", name.c_str());
|
||||||
pthread_cond_broadcast(&change_cond);
|
pthread_cond_broadcast(&change_cond);
|
||||||
|
printf("%s::Stop: to unlock\n", name.c_str());
|
||||||
|
unlock();
|
||||||
|
printf("%s::Stop: to close\n", name.c_str());
|
||||||
DMX::closefd();
|
DMX::closefd();
|
||||||
int ret = (OpenThreads::Thread::join() == 0);
|
int ret = (OpenThreads::Thread::join() == 0);
|
||||||
DMX::close();
|
DMX::close();
|
||||||
@@ -152,6 +161,12 @@ class CCNThread : public CSectionThread
|
|||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CSdtThread : public CSectionThread
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
void run();
|
||||||
|
};
|
||||||
|
|
||||||
class CTimeThread : public CSectionThread
|
class CTimeThread : public CSectionThread
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user