vdr
2.2.0
|
#include <sections.h>
Public Member Functions | |
cSectionHandler (cDevice *Device) | |
virtual | ~cSectionHandler () |
int | Source (void) |
int | Transponder (void) |
const cChannel * | Channel (void) |
void | Attach (cFilter *Filter) |
void | Detach (cFilter *Filter) |
void | SetChannel (const cChannel *Channel) |
void | SetStatus (bool On) |
![]() | |
cThread (const char *Description=NULL, bool LowPriority=false) | |
virtual | ~cThread () |
void | SetDescription (const char *Description,...) __attribute__((format(printf |
void bool | Start (void) |
bool | Active (void) |
Private Member Functions | |
void | Add (const cFilterData *FilterData) |
void | Del (const cFilterData *FilterData) |
virtual void | Action (void) |
Private Attributes | |
cSectionHandlerPrivate * | shp |
cDevice * | device |
int | statusCount |
bool | on |
bool | waitForLock |
time_t | lastIncompleteSection |
cList< cFilter > | filters |
cList< cFilterHandle > | filterHandles |
Friends | |
class | cFilter |
Additional Inherited Members | |
![]() | |
static tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
![]() | |
void | SetPriority (int Priority) |
void | SetIOPriority (int Priority) |
void | Lock (void) |
void | Unlock (void) |
bool | Running (void) |
void | Cancel (int WaitSeconds=0) |
Definition at line 23 of file sections.h.
cSectionHandler::cSectionHandler | ( | cDevice * | Device | ) |
Definition at line 42 of file sections.c.
References cDevice::CardIndex(), device, lastIncompleteSection, on, cThread::SetDescription(), shp, cThread::Start(), statusCount, and waitForLock.
|
virtual |
Definition at line 55 of file sections.c.
References cThread::Cancel(), Detach(), filters, cList< T >::First(), and shp.
|
privatevirtual |
A derived cThread class must implement the code it wants to execute as a separate thread in this function.
If this is a loop, it must check Running() repeatedly to see whether it's time to stop.
Implements cThread.
Definition at line 166 of file sections.c.
References cListBase::Count(), device, dsyslog, cFilterHandle::filterData, filterHandles, filters, cList< T >::First(), cFilterHandle::handle, cDevice::HasLock(), lastIncompleteSection, cThread::Lock(), LOCK_THREAD, cList< T >::Next(), cFilterData::pid, cDevice::ReadFilter(), cThread::Running(), SetStatus(), cCondWait::SleepMs(), statusCount, cThread::Unlock(), and waitForLock.
|
private |
Definition at line 79 of file sections.c.
References cListBase::Add(), device, cFilterHandle::filterData, filterHandles, cList< T >::First(), cFilterHandle::handle, cFilterData::Is(), cThread::Lock(), cFilterData::mask, cList< T >::Next(), cDevice::OpenFilter(), cFilterData::pid, statusCount, cFilterData::tid, cThread::Unlock(), and cFilterHandle::used.
void cSectionHandler::Attach | ( | cFilter * | Filter | ) |
Definition at line 118 of file sections.c.
References cListBase::Add(), filters, cThread::Lock(), on, cFilter::sectionHandler, cFilter::SetStatus(), statusCount, and cThread::Unlock().
Referenced by cDevice::AttachFilter().
const cChannel * cSectionHandler::Channel | ( | void | ) |
Definition at line 74 of file sections.c.
References cSectionHandlerPrivate::channel, and shp.
|
private |
Definition at line 101 of file sections.c.
References cDevice::CloseFilter(), cListBase::Del(), device, cFilterHandle::filterData, filterHandles, cList< T >::First(), cFilterHandle::handle, cFilterData::Is(), cThread::Lock(), cFilterData::mask, cList< T >::Next(), cFilterData::pid, statusCount, cFilterData::tid, cThread::Unlock(), and cFilterHandle::used.
void cSectionHandler::Detach | ( | cFilter * | Filter | ) |
Definition at line 129 of file sections.c.
References cListBase::Del(), filters, cThread::Lock(), cFilter::sectionHandler, cFilter::SetStatus(), statusCount, and cThread::Unlock().
Referenced by cDevice::Detach(), and ~cSectionHandler().
void cSectionHandler::SetChannel | ( | const cChannel * | Channel | ) |
Definition at line 139 of file sections.c.
References cSectionHandlerPrivate::channel, cThread::Lock(), shp, and cThread::Unlock().
Referenced by cDevice::SetChannel().
void cSectionHandler::SetStatus | ( | bool | On | ) |
Definition at line 146 of file sections.c.
References device, filters, cList< T >::First(), cDevice::HasLock(), cThread::Lock(), cList< T >::Next(), on, statusCount, cThread::Unlock(), and waitForLock.
Referenced by Action(), and cDevice::SetChannel().
int cSectionHandler::Source | ( | void | ) |
Definition at line 64 of file sections.c.
References cSectionHandlerPrivate::channel, shp, and cChannel::Source().
int cSectionHandler::Transponder | ( | void | ) |
Definition at line 69 of file sections.c.
References cSectionHandlerPrivate::channel, shp, and cChannel::Transponder().
|
friend |
Definition at line 24 of file sections.h.
|
private |
Definition at line 27 of file sections.h.
Referenced by Action(), Add(), cSectionHandler(), Del(), and SetStatus().
|
private |
Definition at line 32 of file sections.h.
Definition at line 31 of file sections.h.
Referenced by Action(), Attach(), Detach(), SetStatus(), and ~cSectionHandler().
|
private |
Definition at line 30 of file sections.h.
Referenced by Action(), and cSectionHandler().
|
private |
Definition at line 29 of file sections.h.
Referenced by Attach(), cSectionHandler(), and SetStatus().
|
private |
Definition at line 26 of file sections.h.
Referenced by Channel(), cSectionHandler(), SetChannel(), Source(), Transponder(), and ~cSectionHandler().
|
private |
Definition at line 28 of file sections.h.
Referenced by Action(), Add(), Attach(), cSectionHandler(), Del(), Detach(), and SetStatus().
|
private |
Definition at line 29 of file sections.h.
Referenced by Action(), cSectionHandler(), and SetStatus().