mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Reformatted debug messages.
This commit is contained in:
parent
097a607389
commit
7f9060a4cb
2
config.c
2
config.c
@ -68,6 +68,6 @@ void cSatipConfig::SetDisabledFilters(unsigned int indexP, int numberP)
|
||||
|
||||
void cSatipConfig::SetConfigDirectory(const char *directoryP)
|
||||
{
|
||||
debug1("%s(%s)", __PRETTY_FUNCTION__, directoryP);
|
||||
debug1("%s (%s)", __PRETTY_FUNCTION__, directoryP);
|
||||
ERROR_IF(!realpath(directoryP, configDirectoryM), "Cannot canonicalize configuration directory");
|
||||
}
|
||||
|
20
device.c
20
device.c
@ -51,7 +51,7 @@ cSatipDevice::~cSatipDevice()
|
||||
|
||||
bool cSatipDevice::Initialize(unsigned int deviceCountP)
|
||||
{
|
||||
debug1("%s(%u)", __PRETTY_FUNCTION__, deviceCountP);
|
||||
debug1("%s (%u)", __PRETTY_FUNCTION__, deviceCountP);
|
||||
if (deviceCountP > SATIP_MAX_DEVICES)
|
||||
deviceCountP = SATIP_MAX_DEVICES;
|
||||
for (unsigned int i = 0; i < deviceCountP; ++i)
|
||||
@ -83,10 +83,10 @@ unsigned int cSatipDevice::Count(void)
|
||||
|
||||
cSatipDevice *cSatipDevice::GetSatipDevice(int cardIndexP)
|
||||
{
|
||||
debug8("%s(%d)", __PRETTY_FUNCTION__, cardIndexP);
|
||||
debug8("%s (%d)", __PRETTY_FUNCTION__, cardIndexP);
|
||||
for (unsigned int i = 0; i < SATIP_MAX_DEVICES; ++i) {
|
||||
if (SatipDevicesS[i] && (SatipDevicesS[i]->CardIndex() == cardIndexP)) {
|
||||
debug3("%s(%d): Found!", __PRETTY_FUNCTION__, cardIndexP);
|
||||
debug3("%s (%d): Found!", __PRETTY_FUNCTION__, cardIndexP);
|
||||
return SatipDevicesS[i];
|
||||
}
|
||||
}
|
||||
@ -217,7 +217,7 @@ int cSatipDevice::SignalQuality(void) const
|
||||
|
||||
bool cSatipDevice::ProvidesSource(int sourceP) const
|
||||
{
|
||||
debug8("%s(%c) [device %u]", __PRETTY_FUNCTION__, cSource::ToChar(sourceP), deviceIndexM);
|
||||
debug8("%s (%c) [device %u]", __PRETTY_FUNCTION__, cSource::ToChar(sourceP), deviceIndexM);
|
||||
if (!SatipConfig.IsOperatingModeOff() && !!cSatipDiscover::GetInstance()->GetServer(sourceP)) {
|
||||
int numDisabledSourcesM = SatipConfig.GetDisabledSourcesCount();
|
||||
for (int i = 0; i < numDisabledSourcesM; ++i) {
|
||||
@ -231,7 +231,7 @@ bool cSatipDevice::ProvidesSource(int sourceP) const
|
||||
|
||||
bool cSatipDevice::ProvidesTransponder(const cChannel *channelP) const
|
||||
{
|
||||
debug1("%s(%d) transponder=%d source=%c [device %u]", __PRETTY_FUNCTION__, channelP ? channelP->Number() : -1, channelP ? channelP->Transponder() : -1, channelP ? cSource::ToChar(channelP->Source()) : '?', deviceIndexM);
|
||||
debug1("%s (%d) transponder=%d source=%c [device %u]", __PRETTY_FUNCTION__, channelP ? channelP->Number() : -1, channelP ? channelP->Transponder() : -1, channelP ? cSource::ToChar(channelP->Source()) : '?', deviceIndexM);
|
||||
return (ProvidesSource(channelP->Source()));
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ bool cSatipDevice::ProvidesChannel(const cChannel *channelP, int priorityP, bool
|
||||
bool hasPriority = (priorityP == IDLEPRIORITY) || (priorityP > this->Priority());
|
||||
bool needsDetachReceivers = false;
|
||||
|
||||
debug1("%s(%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, channelP ? channelP->Number() : -1, priorityP, !!needsDetachReceiversP, deviceIndexM);
|
||||
debug1("%s (%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, channelP ? channelP->Number() : -1, priorityP, !!needsDetachReceiversP, deviceIndexM);
|
||||
|
||||
if (channelP && ProvidesTransponder(channelP)) {
|
||||
result = hasPriority;
|
||||
@ -342,7 +342,7 @@ bool cSatipDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP)
|
||||
|
||||
bool cSatipDevice::SetPid(cPidHandle *handleP, int typeP, bool onP)
|
||||
{
|
||||
debug8("%s(%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, handleP->pid, typeP, onP, deviceIndexM);
|
||||
debug8("%s (%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, handleP->pid, typeP, onP, deviceIndexM);
|
||||
if (pTunerM && handleP && handleP->pid >= 0) {
|
||||
if (onP)
|
||||
return pTunerM->SetPid(handleP->pid, typeP, true);
|
||||
@ -354,7 +354,7 @@ bool cSatipDevice::SetPid(cPidHandle *handleP, int typeP, bool onP)
|
||||
|
||||
int cSatipDevice::OpenFilter(u_short pidP, u_char tidP, u_char maskP)
|
||||
{
|
||||
debug8("%s(%d, %02X, %02X) [device %d]", __PRETTY_FUNCTION__, pidP, tidP, maskP, deviceIndexM);
|
||||
debug8("%s (%d, %02X, %02X) [device %d]", __PRETTY_FUNCTION__, pidP, tidP, maskP, deviceIndexM);
|
||||
if (pSectionFilterHandlerM) {
|
||||
int handle = pSectionFilterHandlerM->Open(pidP, tidP, maskP);
|
||||
if (pTunerM && (handle >= 0))
|
||||
@ -366,7 +366,7 @@ int cSatipDevice::OpenFilter(u_short pidP, u_char tidP, u_char maskP)
|
||||
|
||||
void cSatipDevice::CloseFilter(int handleP)
|
||||
{
|
||||
debug8("%s(%d) [device %u]", __PRETTY_FUNCTION__, handleP, deviceIndexM);
|
||||
debug8("%s (%d) [device %u]", __PRETTY_FUNCTION__, handleP, deviceIndexM);
|
||||
if (pSectionFilterHandlerM) {
|
||||
if (pTunerM)
|
||||
pTunerM->SetPid(pSectionFilterHandlerM->GetPid(handleP), ptOther, false);
|
||||
@ -395,7 +395,7 @@ void cSatipDevice::CloseDvr(void)
|
||||
|
||||
bool cSatipDevice::HasLock(int timeoutMsP) const
|
||||
{
|
||||
debug8("%s(%d) [device %d]", __PRETTY_FUNCTION__, timeoutMsP, deviceIndexM);
|
||||
debug8("%s (%d) [device %d]", __PRETTY_FUNCTION__, timeoutMsP, deviceIndexM);
|
||||
return (pTunerM && pTunerM->HasLock());
|
||||
}
|
||||
|
||||
|
12
discover.c
12
discover.c
@ -193,7 +193,7 @@ void cSatipDiscover::Action(void)
|
||||
|
||||
void cSatipDiscover::Fetch(const char *urlP)
|
||||
{
|
||||
debug1("%s(%s)", __PRETTY_FUNCTION__, urlP);
|
||||
debug1("%s (%s)", __PRETTY_FUNCTION__, urlP);
|
||||
if (handleM && !isempty(urlP)) {
|
||||
long rc = 0;
|
||||
CURLcode res = CURLE_OK;
|
||||
@ -233,7 +233,7 @@ void cSatipDiscover::Fetch(const char *urlP)
|
||||
|
||||
void cSatipDiscover::AddServer(const char *addrP, const char *modelP, const char * descP)
|
||||
{
|
||||
debug1("%s(%s, %s, %s)", __PRETTY_FUNCTION__, addrP, modelP, descP);
|
||||
debug1("%s (%s, %s, %s)", __PRETTY_FUNCTION__, addrP, modelP, descP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
cSatipServer *tmp = new cSatipServer(addrP, modelP, descP);
|
||||
// Validate against existing servers
|
||||
@ -254,7 +254,7 @@ int cSatipDiscover::GetServerCount(void)
|
||||
|
||||
cSatipServer *cSatipDiscover::GetServer(int sourceP, int transponderP, int systemP)
|
||||
{
|
||||
debug8("%s(%d, %d, %d)", __PRETTY_FUNCTION__, sourceP, transponderP, systemP);
|
||||
debug8("%s (%d, %d, %d)", __PRETTY_FUNCTION__, sourceP, transponderP, systemP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
return serversM.Find(sourceP, transponderP, systemP);
|
||||
}
|
||||
@ -289,14 +289,14 @@ cString cSatipDiscover::GetServerList(void)
|
||||
|
||||
void cSatipDiscover::SetTransponder(cSatipServer *serverP, int transponderP)
|
||||
{
|
||||
debug8("%s(, %d)", __PRETTY_FUNCTION__, transponderP);
|
||||
debug8("%s (, %d)", __PRETTY_FUNCTION__, transponderP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
serversM.SetTransponder(serverP, transponderP);
|
||||
}
|
||||
|
||||
void cSatipDiscover::UseServer(cSatipServer *serverP, bool onOffP)
|
||||
{
|
||||
debug8("%s(, %d)", __PRETTY_FUNCTION__, onOffP);
|
||||
debug8("%s (, %d)", __PRETTY_FUNCTION__, onOffP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
serversM.Use(serverP, onOffP);
|
||||
}
|
||||
@ -310,7 +310,7 @@ int cSatipDiscover::NumProvidedSystems(void)
|
||||
|
||||
void cSatipDiscover::SetUrl(const char *urlP)
|
||||
{
|
||||
debug8("%s(%s)", __PRETTY_FUNCTION__, urlP);
|
||||
debug8("%s (%s)", __PRETTY_FUNCTION__, urlP);
|
||||
mutexM.Lock();
|
||||
probeUrlListM.Insert(strdup(urlP));
|
||||
mutexM.Unlock();
|
||||
|
4
rtcp.c
4
rtcp.c
@ -15,7 +15,7 @@ cSatipRtcp::cSatipRtcp(cSatipTunerIf &tunerP, unsigned int bufferLenP)
|
||||
bufferLenM(bufferLenP),
|
||||
bufferM(MALLOC(unsigned char, bufferLenM))
|
||||
{
|
||||
debug1("%s(, %u) [device %d]", __PRETTY_FUNCTION__, bufferLenP, tunerM.GetId());
|
||||
debug1("%s (, %u) [device %d]", __PRETTY_FUNCTION__, bufferLenP, tunerM.GetId());
|
||||
if (bufferM)
|
||||
memset(bufferM, 0, bufferLenM);
|
||||
else
|
||||
@ -36,7 +36,7 @@ int cSatipRtcp::GetFd(void)
|
||||
|
||||
int cSatipRtcp::GetApplicationOffset(int *lengthP)
|
||||
{
|
||||
debug8("%s(%d) [device %d]", __PRETTY_FUNCTION__, *lengthP, tunerM.GetId());
|
||||
debug8("%s (%d) [device %d]", __PRETTY_FUNCTION__, *lengthP, tunerM.GetId());
|
||||
if (!lengthP)
|
||||
return -1;
|
||||
int offset = 0;
|
||||
|
8
rtp.c
8
rtp.c
@ -18,7 +18,7 @@ cSatipRtp::cSatipRtp(cSatipTunerIf &tunerP, unsigned int bufferLenP)
|
||||
packetErrorsM(0),
|
||||
sequenceNumberM(-1)
|
||||
{
|
||||
debug1("%s(, %u) [device %d]", __PRETTY_FUNCTION__, bufferLenP, tunerM.GetId());
|
||||
debug1("%s (, %u) [device %d]", __PRETTY_FUNCTION__, bufferLenP, tunerM.GetId());
|
||||
if (bufferM)
|
||||
memset(bufferM, 0, bufferLenM);
|
||||
else
|
||||
@ -52,7 +52,7 @@ void cSatipRtp::Close(void)
|
||||
|
||||
int cSatipRtp::GetHeaderLenght(unsigned int lengthP)
|
||||
{
|
||||
debug8("%s(%d) [device %d]", __PRETTY_FUNCTION__, lengthP, tunerM.GetId());
|
||||
debug8("%s (%d) [device %d]", __PRETTY_FUNCTION__, lengthP, tunerM.GetId());
|
||||
unsigned int headerlen = 0;
|
||||
|
||||
if (lengthP > 0) {
|
||||
@ -95,12 +95,12 @@ int cSatipRtp::GetHeaderLenght(unsigned int lengthP)
|
||||
}
|
||||
// Check for empty payload
|
||||
if (lengthP == headerlen) {
|
||||
debug1("%s(%d) Received empty RTP packet #%d [device %d]", __PRETTY_FUNCTION__, lengthP, seq, tunerM.GetId());
|
||||
debug1("%s (%d) Received empty RTP packet #%d [device %d]", __PRETTY_FUNCTION__, lengthP, seq, tunerM.GetId());
|
||||
headerlen = -1;
|
||||
}
|
||||
// Check that rtp is version 2 and payload contains multiple of TS packet data
|
||||
else if ((v != 2) || (((lengthP - headerlen) % TS_SIZE) != 0) || (bufferM[headerlen] != TS_SYNC_BYTE)) {
|
||||
debug1("%s(%d) Received incorrect RTP packet #%d v=%d len=%d sync=0x%02X [device %d]", __PRETTY_FUNCTION__, lengthP, seq, v, headerlen, bufferM[headerlen], tunerM.GetId());
|
||||
debug1("%s (%d) Received incorrect RTP packet #%d v=%d len=%d sync=0x%02X [device %d]", __PRETTY_FUNCTION__, lengthP, seq, v, headerlen, bufferM[headerlen], tunerM.GetId());
|
||||
headerlen = -1;
|
||||
}
|
||||
}
|
||||
|
16
rtsp.c
16
rtsp.c
@ -65,7 +65,7 @@ size_t cSatipRtsp::HeaderCallback(void *ptrP, size_t sizeP, size_t nmembP, void
|
||||
char *r = strtok_r(p, "\r\n", &s);
|
||||
|
||||
while (obj && r) {
|
||||
debug8("%s(%zu): %s", __PRETTY_FUNCTION__, len, r);
|
||||
debug8("%s (%zu): %s", __PRETTY_FUNCTION__, len, r);
|
||||
r = skipspace(r);
|
||||
if (strstr(r, "com.ses.streamID")) {
|
||||
int streamid = -1;
|
||||
@ -130,7 +130,7 @@ int cSatipRtsp::DebugCallback(CURL *handleP, curl_infotype typeP, char *dataP, s
|
||||
|
||||
cString cSatipRtsp::RtspUnescapeString(const char *strP)
|
||||
{
|
||||
debug1("%s(%s) [device %d]", __PRETTY_FUNCTION__, strP, tunerM.GetId());
|
||||
debug1("%s (%s) [device %d]", __PRETTY_FUNCTION__, strP, tunerM.GetId());
|
||||
if (handleM) {
|
||||
char *p = curl_easy_unescape(handleM, strP, 0, NULL);
|
||||
cString s = p;
|
||||
@ -144,7 +144,7 @@ cString cSatipRtsp::RtspUnescapeString(const char *strP)
|
||||
|
||||
bool cSatipRtsp::Options(const char *uriP)
|
||||
{
|
||||
debug1("%s(%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
debug1("%s (%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
if (handleM && !isempty(uriP)) {
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -162,7 +162,7 @@ bool cSatipRtsp::Options(const char *uriP)
|
||||
|
||||
bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP)
|
||||
{
|
||||
debug1("%s(%s, %d, %d) [device %d]", __PRETTY_FUNCTION__, uriP, rtpPortP, rtcpPortP, tunerM.GetId());
|
||||
debug1("%s (%s, %d, %d) [device %d]", __PRETTY_FUNCTION__, uriP, rtpPortP, rtcpPortP, tunerM.GetId());
|
||||
if (handleM && !isempty(uriP)) {
|
||||
CURLcode res = CURLE_OK;
|
||||
cString transport = cString::sprintf("RTP/AVP;unicast;client_port=%d-%d", rtpPortP, rtcpPortP);
|
||||
@ -187,7 +187,7 @@ bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP)
|
||||
|
||||
bool cSatipRtsp::SetSession(const char *sessionP)
|
||||
{
|
||||
debug1("%s(%s) [device %d]", __PRETTY_FUNCTION__, sessionP, tunerM.GetId());
|
||||
debug1("%s (%s) [device %d]", __PRETTY_FUNCTION__, sessionP, tunerM.GetId());
|
||||
if (handleM) {
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -200,7 +200,7 @@ bool cSatipRtsp::SetSession(const char *sessionP)
|
||||
|
||||
bool cSatipRtsp::Describe(const char *uriP)
|
||||
{
|
||||
debug1("%s(%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
debug1("%s (%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
if (handleM && !isempty(uriP)) {
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -220,7 +220,7 @@ bool cSatipRtsp::Describe(const char *uriP)
|
||||
|
||||
bool cSatipRtsp::Play(const char *uriP)
|
||||
{
|
||||
debug1("%s(%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
debug1("%s (%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
if (handleM && !isempty(uriP)) {
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -236,7 +236,7 @@ bool cSatipRtsp::Play(const char *uriP)
|
||||
|
||||
bool cSatipRtsp::Teardown(const char *uriP)
|
||||
{
|
||||
debug1("%s(%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
debug1("%s (%s) [device %d]", __PRETTY_FUNCTION__, uriP, tunerM.GetId());
|
||||
if (handleM && !isempty(uriP)) {
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
|
8
satip.c
8
satip.c
@ -195,7 +195,7 @@ cMenuSetupPage *cPluginSatip::SetupMenu(void)
|
||||
|
||||
void cPluginSatip::ParseServer(const char *paramP)
|
||||
{
|
||||
debug1("%s(%s)", __PRETTY_FUNCTION__, paramP);
|
||||
debug1("%s (%s)", __PRETTY_FUNCTION__, paramP);
|
||||
int n = 0;
|
||||
char *s, *p = (char *)paramP;
|
||||
char *r = strtok_r(p, ";", &s);
|
||||
@ -236,7 +236,7 @@ void cPluginSatip::ParseServer(const char *paramP)
|
||||
|
||||
int cPluginSatip::ParseSources(const char *valueP, int *sourcesP)
|
||||
{
|
||||
debug1("%s(%s,)", __PRETTY_FUNCTION__, valueP);
|
||||
debug1("%s (%s,)", __PRETTY_FUNCTION__, valueP);
|
||||
int n = 0;
|
||||
char *s, *p = (char *)valueP;
|
||||
char *r = strtok_r(p, " ", &s);
|
||||
@ -253,7 +253,7 @@ int cPluginSatip::ParseSources(const char *valueP, int *sourcesP)
|
||||
|
||||
int cPluginSatip::ParseFilters(const char *valueP, int *filtersP)
|
||||
{
|
||||
debug1("%s(%s,)", __PRETTY_FUNCTION__, valueP);
|
||||
debug1("%s (%s,)", __PRETTY_FUNCTION__, valueP);
|
||||
char buffer[256];
|
||||
int n = 0;
|
||||
while (valueP && *valueP && (n < SECTION_FILTER_TABLE_SIZE)) {
|
||||
@ -330,7 +330,7 @@ const char **cPluginSatip::SVDRPHelpPages(void)
|
||||
|
||||
cString cPluginSatip::SVDRPCommand(const char *commandP, const char *optionP, int &replyCodeP)
|
||||
{
|
||||
debug1("%s(%s, %s,)", __PRETTY_FUNCTION__, commandP, optionP);
|
||||
debug1("%s (%s, %s,)", __PRETTY_FUNCTION__, commandP, optionP);
|
||||
if (strcasecmp(commandP, "INFO") == 0) {
|
||||
int index = cDevice::ActualDevice()->CardIndex();
|
||||
int page = SATIP_DEVICE_INFO_ALL;
|
||||
|
@ -21,7 +21,7 @@ cSatipSectionFilter::cSatipSectionFilter(int deviceIndexP, uint16_t pidP, uint8_
|
||||
ringBufferM(new cRingBufferFrame(eDmxMaxSectionCount * eDmxMaxSectionSize)),
|
||||
deviceIndexM(deviceIndexP)
|
||||
{
|
||||
debug8("%s(%d, %d, %d, %d) [device %d]", __PRETTY_FUNCTION__, deviceIndexM, pidM, tidP, maskP, deviceIndexM);
|
||||
debug8("%s (%d, %d, %d, %d) [device %d]", __PRETTY_FUNCTION__, deviceIndexM, pidM, tidP, maskP, deviceIndexM);
|
||||
int i;
|
||||
|
||||
memset(secBufBaseM, 0, sizeof(secBufBaseM));
|
||||
@ -237,7 +237,7 @@ cSatipSectionFilterHandler::cSatipSectionFilterHandler(int deviceIndexP, unsigne
|
||||
mutexM(),
|
||||
deviceIndexM(deviceIndexP)
|
||||
{
|
||||
debug1("%s(%d, %d) [device %d]", __PRETTY_FUNCTION__, deviceIndexM, bufferLenP, deviceIndexM);
|
||||
debug1("%s (%d, %d) [device %d]", __PRETTY_FUNCTION__, deviceIndexM, bufferLenP, deviceIndexM);
|
||||
|
||||
// Initialize filter pointers
|
||||
memset(filtersM, 0, sizeof(filtersM));
|
||||
@ -340,9 +340,9 @@ cString cSatipSectionFilterHandler::GetInformation(void)
|
||||
|
||||
bool cSatipSectionFilterHandler::Delete(unsigned int indexP)
|
||||
{
|
||||
debug8("%s(%d) [device %d]", __PRETTY_FUNCTION__, indexP, deviceIndexM);
|
||||
debug8("%s (%d) [device %d]", __PRETTY_FUNCTION__, indexP, deviceIndexM);
|
||||
if ((indexP < eMaxSecFilterCount) && filtersM[indexP]) {
|
||||
debug3("%s(%d) Found [device %d]", __PRETTY_FUNCTION__, indexP, deviceIndexM);
|
||||
debug3("%s (%d) Found [device %d]", __PRETTY_FUNCTION__, indexP, deviceIndexM);
|
||||
cSatipSectionFilter *tmp = filtersM[indexP];
|
||||
filtersM[indexP] = NULL;
|
||||
delete tmp;
|
||||
@ -353,7 +353,7 @@ bool cSatipSectionFilterHandler::Delete(unsigned int indexP)
|
||||
|
||||
bool cSatipSectionFilterHandler::IsBlackListed(u_short pidP, u_char tidP, u_char maskP) const
|
||||
{
|
||||
debug8("%s(%d, %02X, %02X) [device %d]", __PRETTY_FUNCTION__, pidP, tidP, maskP, deviceIndexM);
|
||||
debug8("%s (%d, %02X, %02X) [device %d]", __PRETTY_FUNCTION__, pidP, tidP, maskP, deviceIndexM);
|
||||
// loop through section filter table
|
||||
for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i) {
|
||||
int index = SatipConfig.GetDisabledFilters(i);
|
||||
@ -379,7 +379,7 @@ int cSatipSectionFilterHandler::Open(u_short pidP, u_char tidP, u_char maskP)
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
if (!filtersM[i]) {
|
||||
filtersM[i] = new cSatipSectionFilter(deviceIndexM, pidP, tidP, maskP);
|
||||
debug8("%s(%d, %02X, %02X) handle=%d index=%u [device %d]", __PRETTY_FUNCTION__, pidP, tidP, maskP, filtersM[i]->GetFd(), i, deviceIndexM);
|
||||
debug8("%s (%d, %02X, %02X) handle=%d index=%u [device %d]", __PRETTY_FUNCTION__, pidP, tidP, maskP, filtersM[i]->GetFd(), i, deviceIndexM);
|
||||
return filtersM[i]->GetFd();
|
||||
}
|
||||
}
|
||||
@ -394,7 +394,7 @@ void cSatipSectionFilterHandler::Close(int handleP)
|
||||
// Search the filter for deletion
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
if (filtersM[i] && (handleP == filtersM[i]->GetFd())) {
|
||||
debug3("%s(%d) pid=%d index=%u [device %d]", __PRETTY_FUNCTION__, handleP, filtersM[i]->GetPid(), i, deviceIndexM);
|
||||
debug3("%s (%d) pid=%d index=%u [device %d]", __PRETTY_FUNCTION__, handleP, filtersM[i]->GetPid(), i, deviceIndexM);
|
||||
Delete(i);
|
||||
break;
|
||||
}
|
||||
@ -408,7 +408,7 @@ int cSatipSectionFilterHandler::GetPid(int handleP)
|
||||
// Search the filter for data
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
if (filtersM[i] && (handleP == filtersM[i]->GetFd())) {
|
||||
debug3("%s(%d) pid=%d index=%u [device %d]", __PRETTY_FUNCTION__, handleP, filtersM[i]->GetPid(), i, deviceIndexM);
|
||||
debug3("%s (%d) pid=%d index=%u [device %d]", __PRETTY_FUNCTION__, handleP, filtersM[i]->GetPid(), i, deviceIndexM);
|
||||
return filtersM[i]->GetPid();
|
||||
}
|
||||
}
|
||||
@ -417,7 +417,7 @@ int cSatipSectionFilterHandler::GetPid(int handleP)
|
||||
|
||||
void cSatipSectionFilterHandler::Write(uchar *bufferP, int lengthP)
|
||||
{
|
||||
debug8("%s(, %d) [device %d]", __PRETTY_FUNCTION__, lengthP, deviceIndexM);
|
||||
debug8("%s (, %d) [device %d]", __PRETTY_FUNCTION__, lengthP, deviceIndexM);
|
||||
// Fill up the buffer
|
||||
if (ringBufferM) {
|
||||
int len = ringBufferM->Put(bufferP, lengthP);
|
||||
|
4
setup.c
4
setup.c
@ -486,7 +486,7 @@ void cSatipPluginSetup::StoreSources(const char *nameP, int *sourcesP)
|
||||
else
|
||||
buffer = cString::sprintf("%s", *cSource::ToString(sourcesP[i]));
|
||||
}
|
||||
debug1("%s(%s, %s)", __PRETTY_FUNCTION__, nameP, *buffer);
|
||||
debug1("%s (%s, %s)", __PRETTY_FUNCTION__, nameP, *buffer);
|
||||
SetupStore(nameP, *buffer);
|
||||
}
|
||||
|
||||
@ -502,7 +502,7 @@ void cSatipPluginSetup::StoreFilters(const char *nameP, int *valuesP)
|
||||
else
|
||||
buffer = cString::sprintf("%d", valuesP[i]);
|
||||
}
|
||||
debug1("%s(%s, %s)", __PRETTY_FUNCTION__, nameP, *buffer);
|
||||
debug1("%s (%s, %s)", __PRETTY_FUNCTION__, nameP, *buffer);
|
||||
SetupStore(nameP, *buffer);
|
||||
}
|
||||
|
||||
|
6
socket.c
6
socket.c
@ -61,7 +61,7 @@ bool cSatipSocket::Open(const int portP)
|
||||
"getsockname()", Close(), return false);
|
||||
socketPortM = ntohs(sockAddrM.sin_port);
|
||||
}
|
||||
debug1("%s(%d) socketPort=%d", __PRETTY_FUNCTION__, portP, socketPortM);
|
||||
debug1("%s (%d) socketPort=%d", __PRETTY_FUNCTION__, portP, socketPortM);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ bool cSatipSocket::Flush(void)
|
||||
|
||||
int cSatipSocket::Read(unsigned char *bufferAddrP, unsigned int bufferLenP)
|
||||
{
|
||||
debug8("%s(, %d)", __PRETTY_FUNCTION__, bufferLenP);
|
||||
debug8("%s (, %d)", __PRETTY_FUNCTION__, bufferLenP);
|
||||
// Error out if socket not initialized
|
||||
if (socketDescM <= 0) {
|
||||
error("Invalid socket in %s()", __PRETTY_FUNCTION__);
|
||||
@ -136,7 +136,7 @@ int cSatipSocket::Read(unsigned char *bufferAddrP, unsigned int bufferLenP)
|
||||
|
||||
bool cSatipSocket::Write(const char *addrP, const unsigned char *bufferAddrP, unsigned int bufferLenP)
|
||||
{
|
||||
debug1("%s(%s, , %d)", __PRETTY_FUNCTION__, addrP, bufferLenP);
|
||||
debug1("%s (%s, , %d)", __PRETTY_FUNCTION__, addrP, bufferLenP);
|
||||
// Error out if socket not initialized
|
||||
if (socketDescM <= 0) {
|
||||
error("%s Invalid socket", __PRETTY_FUNCTION__);
|
||||
|
@ -45,7 +45,7 @@ cString cSatipSectionStatistics::GetSectionStatistic()
|
||||
|
||||
void cSatipSectionStatistics::AddSectionStatistic(long bytesP, long callsP)
|
||||
{
|
||||
debug8("%s(%ld, %ld)", __PRETTY_FUNCTION__, bytesP, callsP);
|
||||
debug8("%s (%ld, %ld)", __PRETTY_FUNCTION__, bytesP, callsP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
filteredDataM += bytesP;
|
||||
numberOfCallsM += callsP;
|
||||
@ -110,7 +110,7 @@ int cSatipPidStatistics::SortPids(const void* data1P, const void* data2P)
|
||||
|
||||
void cSatipPidStatistics::AddPidStatistic(int pidP, long payloadP)
|
||||
{
|
||||
debug8("%s(%d, %ld)", __PRETTY_FUNCTION__, pidP, payloadP);
|
||||
debug8("%s (%d, %ld)", __PRETTY_FUNCTION__, pidP, payloadP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
const int numberOfElements = sizeof(mostActivePidsM) / sizeof(pidStruct);
|
||||
// If our statistic already is in the array, update it and quit
|
||||
@ -166,7 +166,7 @@ cString cSatipTunerStatistics::GetTunerStatistic()
|
||||
|
||||
void cSatipTunerStatistics::AddTunerStatistic(long bytesP)
|
||||
{
|
||||
debug8("%s(%ld)", __PRETTY_FUNCTION__, bytesP);
|
||||
debug8("%s (%ld)", __PRETTY_FUNCTION__, bytesP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
dataBytesM += bytesP;
|
||||
}
|
||||
@ -214,7 +214,7 @@ cString cSatipBufferStatistics::GetBufferStatistic()
|
||||
|
||||
void cSatipBufferStatistics::AddBufferStatistic(long bytesP, long usedP)
|
||||
{
|
||||
debug8("%s(%ld, %ld)", __PRETTY_FUNCTION__, bytesP, usedP);
|
||||
debug8("%s (%ld, %ld)", __PRETTY_FUNCTION__, bytesP, usedP);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
dataBytesM += bytesP;
|
||||
if (usedP > usedSpaceM)
|
||||
|
26
tuner.c
26
tuner.c
@ -42,7 +42,7 @@ cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
|
||||
delPidsM(),
|
||||
pidsM()
|
||||
{
|
||||
debug1("%s(, %d) [device %d]", __PRETTY_FUNCTION__, packetLenP, deviceIdM);
|
||||
debug1("%s (, %d) [device %d]", __PRETTY_FUNCTION__, packetLenP, deviceIdM);
|
||||
|
||||
// Open sockets
|
||||
int i = 100;
|
||||
@ -245,7 +245,7 @@ bool cSatipTuner::Disconnect(void)
|
||||
|
||||
void cSatipTuner::ProcessVideoData(u_char *bufferP, int lengthP)
|
||||
{
|
||||
debug8("%s(, %d) [device %d]", __PRETTY_FUNCTION__, lengthP, deviceIdM);
|
||||
debug8("%s (, %d) [device %d]", __PRETTY_FUNCTION__, lengthP, deviceIdM);
|
||||
if (lengthP > 0) {
|
||||
AddTunerStatistic(lengthP);
|
||||
deviceM->WriteData(bufferP, lengthP);
|
||||
@ -255,7 +255,7 @@ void cSatipTuner::ProcessVideoData(u_char *bufferP, int lengthP)
|
||||
|
||||
void cSatipTuner::ProcessApplicationData(u_char *bufferP, int lengthP)
|
||||
{
|
||||
debug8("%s(%d) [device %d]", __PRETTY_FUNCTION__, lengthP, deviceIdM);
|
||||
debug8("%s (%d) [device %d]", __PRETTY_FUNCTION__, lengthP, deviceIdM);
|
||||
// DVB-S2:
|
||||
// ver=<major>.<minor>;src=<srcID>;tuner=<feID>,<level>,<lock>,<quality>,<frequency>,<polarisation>,<system>,<type>,<pilots>,<roll_off>,<symbol_rate>,<fec_inner>;pids=<pid0>,...,<pidn>
|
||||
// DVB-T2:
|
||||
@ -265,7 +265,7 @@ void cSatipTuner::ProcessApplicationData(u_char *bufferP, int lengthP)
|
||||
if (lengthP > 0) {
|
||||
char s[lengthP];
|
||||
memcpy(s, (char *)bufferP, lengthP);
|
||||
debug8("%s(%s) [device %d]", __PRETTY_FUNCTION__, s, deviceIdM);
|
||||
debug8("%s (%s) [device %d]", __PRETTY_FUNCTION__, s, deviceIdM);
|
||||
char *c = strstr(s, ";tuner=");
|
||||
if (c) {
|
||||
int value;
|
||||
@ -306,14 +306,14 @@ void cSatipTuner::ProcessApplicationData(u_char *bufferP, int lengthP)
|
||||
void cSatipTuner::SetStreamId(int streamIdP)
|
||||
{
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
debug1("%s(%d) [device %d]", __PRETTY_FUNCTION__, streamIdP, deviceIdM);
|
||||
debug1("%s (%d) [device %d]", __PRETTY_FUNCTION__, streamIdP, deviceIdM);
|
||||
streamIdM = streamIdP;
|
||||
}
|
||||
|
||||
void cSatipTuner::SetSessionTimeout(const char *sessionP, int timeoutP)
|
||||
{
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
debug1("%s(%s, %d) [device %d]", __PRETTY_FUNCTION__, sessionP, timeoutP, deviceIdM);
|
||||
debug1("%s (%s, %d) [device %d]", __PRETTY_FUNCTION__, sessionP, timeoutP, deviceIdM);
|
||||
sessionM = sessionP;
|
||||
timeoutM = (timeoutP > eMinKeepAliveIntervalMs) ? timeoutP : eMinKeepAliveIntervalMs;
|
||||
}
|
||||
@ -326,7 +326,7 @@ int cSatipTuner::GetId(void)
|
||||
|
||||
bool cSatipTuner::SetSource(cSatipServer *serverP, const char *parameterP, const int indexP)
|
||||
{
|
||||
debug1("%s(%s, %d) [device %d]", __PRETTY_FUNCTION__, parameterP, indexP, deviceIdM);
|
||||
debug1("%s (%s, %d) [device %d]", __PRETTY_FUNCTION__, parameterP, indexP, deviceIdM);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
if (serverP) {
|
||||
nextServerM = cSatipDiscover::GetInstance()->GetServer(serverP);
|
||||
@ -348,7 +348,7 @@ bool cSatipTuner::SetSource(cSatipServer *serverP, const char *parameterP, const
|
||||
|
||||
bool cSatipTuner::SetPid(int pidP, int typeP, bool onP)
|
||||
{
|
||||
debug8("%s(%d, %d, %d) [device %d]", __PRETTY_FUNCTION__, pidP, typeP, onP, deviceIdM);
|
||||
debug8("%s (%d, %d, %d) [device %d]", __PRETTY_FUNCTION__, pidP, typeP, onP, deviceIdM);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
if (onP) {
|
||||
pidsM.AddPid(pidP);
|
||||
@ -368,7 +368,7 @@ bool cSatipTuner::SetPid(int pidP, int typeP, bool onP)
|
||||
|
||||
bool cSatipTuner::UpdatePids(bool forceP)
|
||||
{
|
||||
debug8("%s(%d) tunerState=%s [device %d]", __PRETTY_FUNCTION__, forceP, TunerStateString(currentStateM), deviceIdM);
|
||||
debug8("%s (%d) tunerState=%s [device %d]", __PRETTY_FUNCTION__, forceP, TunerStateString(currentStateM), deviceIdM);
|
||||
if (((forceP && pidsM.Size()) || (pidUpdateCacheM.TimedOut() && (addPidsM.Size() || delPidsM.Size()))) &&
|
||||
!isempty(*streamAddrM) && (streamIdM > 0)) {
|
||||
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
|
||||
@ -405,7 +405,7 @@ bool cSatipTuner::UpdatePids(bool forceP)
|
||||
|
||||
bool cSatipTuner::KeepAlive(bool forceP)
|
||||
{
|
||||
debug8("%s(%d) tunerState=%s [device %d]", __PRETTY_FUNCTION__, forceP, TunerStateString(currentStateM), deviceIdM);
|
||||
debug8("%s (%d) tunerState=%s [device %d]", __PRETTY_FUNCTION__, forceP, TunerStateString(currentStateM), deviceIdM);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
if (keepAliveM.TimedOut()) {
|
||||
keepAliveM.Set(timeoutM);
|
||||
@ -422,7 +422,7 @@ bool cSatipTuner::KeepAlive(bool forceP)
|
||||
|
||||
bool cSatipTuner::ReadReceptionStatus(bool forceP)
|
||||
{
|
||||
debug8("%s(%d) tunerState=%s [device %d]", __PRETTY_FUNCTION__, forceP, TunerStateString(currentStateM), deviceIdM);
|
||||
debug8("%s (%d) tunerState=%s [device %d]", __PRETTY_FUNCTION__, forceP, TunerStateString(currentStateM), deviceIdM);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
if (statusUpdateM.TimedOut()) {
|
||||
statusUpdateM.Set(eStatusUpdateTimeoutMs);
|
||||
@ -453,7 +453,7 @@ void cSatipTuner::UpdateCurrentState(void)
|
||||
}
|
||||
|
||||
if (currentStateM != state) {
|
||||
debug1("%s: switching from %s to %s [device %d]", __PRETTY_FUNCTION__, TunerStateString(currentStateM), TunerStateString(state), deviceIdM);
|
||||
debug1("%s: Switching from %s to %s [device %d]", __PRETTY_FUNCTION__, TunerStateString(currentStateM), TunerStateString(state), deviceIdM);
|
||||
currentStateM = state;
|
||||
}
|
||||
}
|
||||
@ -469,7 +469,7 @@ bool cSatipTuner::StateRequested(void)
|
||||
bool cSatipTuner::RequestState(eTunerState stateP, eStateMode modeP)
|
||||
{
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
debug1("%s(%s, %s) current=%s internal=%d external=%d [device %d]", __PRETTY_FUNCTION__, TunerStateString(stateP), StateModeString(modeP), TunerStateString(currentStateM), internalStateM.Size(), externalStateM.Size(), deviceIdM);
|
||||
debug1("%s (%s, %s) current=%s internal=%d external=%d [device %d]", __PRETTY_FUNCTION__, TunerStateString(stateP), StateModeString(modeP), TunerStateString(currentStateM), internalStateM.Size(), externalStateM.Size(), deviceIdM);
|
||||
|
||||
if (modeP == smExternal)
|
||||
externalStateM.Append(stateP);
|
||||
|
Loading…
Reference in New Issue
Block a user