Some minor tweaks.

This commit is contained in:
Rolf Ahrenberg 2014-11-10 23:31:30 +02:00
parent ac4ab867d9
commit a9109d750c
3 changed files with 8 additions and 7 deletions

2
rtsp.c
View File

@ -10,7 +10,7 @@
cSatipRtsp::cSatipRtsp(cSatipTunerIf &tunerP)
: tunerM(&tunerP),
tunerIdM(tunerM ? tunerM->GetId() : -1),
tunerIdM(tunerP.GetId()),
handleM(curl_easy_init()),
headerListM(NULL)
{

View File

@ -231,7 +231,7 @@ bool cSatipSectionFilter::Send(void)
cSatipSectionFilterHandler::cSatipSectionFilterHandler(int deviceIndexP, unsigned int bufferLenP)
: cThread("SAT>IP section handler"),
: cThread(cString::sprintf("SAT>IP %d section handler", deviceIndexP)),
ringBufferM(new cRingBufferLinear(bufferLenP, TS_SIZE, false, *cString::sprintf("SAT>IP SECTION HANDLER %d", deviceIndexP))),
mutexM(),
deviceIndexM(deviceIndexP)

11
tuner.c
View File

@ -13,10 +13,10 @@
#include "tuner.h"
cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
: cThread("SAT>IP tuner"),
: cThread(cString::sprintf("SAT>IP %d tuner", deviceP.GetId())),
sleepM(),
deviceM(&deviceP),
deviceIdM(deviceM ? deviceM->GetId() : -1),
deviceIdM(deviceP.GetId()),
packetBufferLenM(packetLenP),
rtspM(new cSatipRtsp(*this)),
rtpSocketM(new cSatipSocket()),
@ -114,6 +114,7 @@ cSatipTuner::~cSatipTuner()
free(packetBufferM);
DELETENULL(rtcpSocketM);
DELETENULL(rtpSocketM);
DELETENULL(rtspM);
}
void cSatipTuner::Action(void)
@ -235,9 +236,8 @@ bool cSatipTuner::Disconnect(void)
{
cMutexLock MutexLock(&mutexM);
debug("cSatipTuner::%s() [device %d]", __FUNCTION__, deviceIdM);
openedM = false;
if (!isempty(*streamAddrM)) {
if (openedM && !isempty(*streamAddrM)) {
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
rtspM->Teardown(*uri);
}
@ -249,6 +249,7 @@ bool cSatipTuner::Disconnect(void)
if (currentServerM)
cSatipDiscover::GetInstance()->UseServer(currentServerM, false);
openedM = false;
tunedM = false;
statusUpdateM.Set(0);
timeoutM = eMinKeepAliveIntervalMs;
@ -288,7 +289,7 @@ void cSatipTuner::ParseReceptionParameters(const char *paramP)
// "0" the frontend is not locked
// "1" the frontend is locked
c = strstr(c, ",");
hasLockM = atoi(++c);
hasLockM = !!atoi(++c);
// quality:
// Numerical value between 0 and 15