mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Some minor tweaks.
This commit is contained in:
parent
ac4ab867d9
commit
a9109d750c
2
rtsp.c
2
rtsp.c
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
cSatipRtsp::cSatipRtsp(cSatipTunerIf &tunerP)
|
cSatipRtsp::cSatipRtsp(cSatipTunerIf &tunerP)
|
||||||
: tunerM(&tunerP),
|
: tunerM(&tunerP),
|
||||||
tunerIdM(tunerM ? tunerM->GetId() : -1),
|
tunerIdM(tunerP.GetId()),
|
||||||
handleM(curl_easy_init()),
|
handleM(curl_easy_init()),
|
||||||
headerListM(NULL)
|
headerListM(NULL)
|
||||||
{
|
{
|
||||||
|
@ -231,7 +231,7 @@ bool cSatipSectionFilter::Send(void)
|
|||||||
|
|
||||||
|
|
||||||
cSatipSectionFilterHandler::cSatipSectionFilterHandler(int deviceIndexP, unsigned int bufferLenP)
|
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))),
|
ringBufferM(new cRingBufferLinear(bufferLenP, TS_SIZE, false, *cString::sprintf("SAT>IP SECTION HANDLER %d", deviceIndexP))),
|
||||||
mutexM(),
|
mutexM(),
|
||||||
deviceIndexM(deviceIndexP)
|
deviceIndexM(deviceIndexP)
|
||||||
|
11
tuner.c
11
tuner.c
@ -13,10 +13,10 @@
|
|||||||
#include "tuner.h"
|
#include "tuner.h"
|
||||||
|
|
||||||
cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
|
cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
|
||||||
: cThread("SAT>IP tuner"),
|
: cThread(cString::sprintf("SAT>IP %d tuner", deviceP.GetId())),
|
||||||
sleepM(),
|
sleepM(),
|
||||||
deviceM(&deviceP),
|
deviceM(&deviceP),
|
||||||
deviceIdM(deviceM ? deviceM->GetId() : -1),
|
deviceIdM(deviceP.GetId()),
|
||||||
packetBufferLenM(packetLenP),
|
packetBufferLenM(packetLenP),
|
||||||
rtspM(new cSatipRtsp(*this)),
|
rtspM(new cSatipRtsp(*this)),
|
||||||
rtpSocketM(new cSatipSocket()),
|
rtpSocketM(new cSatipSocket()),
|
||||||
@ -114,6 +114,7 @@ cSatipTuner::~cSatipTuner()
|
|||||||
free(packetBufferM);
|
free(packetBufferM);
|
||||||
DELETENULL(rtcpSocketM);
|
DELETENULL(rtcpSocketM);
|
||||||
DELETENULL(rtpSocketM);
|
DELETENULL(rtpSocketM);
|
||||||
|
DELETENULL(rtspM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSatipTuner::Action(void)
|
void cSatipTuner::Action(void)
|
||||||
@ -235,9 +236,8 @@ bool cSatipTuner::Disconnect(void)
|
|||||||
{
|
{
|
||||||
cMutexLock MutexLock(&mutexM);
|
cMutexLock MutexLock(&mutexM);
|
||||||
debug("cSatipTuner::%s() [device %d]", __FUNCTION__, deviceIdM);
|
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);
|
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
|
||||||
rtspM->Teardown(*uri);
|
rtspM->Teardown(*uri);
|
||||||
}
|
}
|
||||||
@ -249,6 +249,7 @@ bool cSatipTuner::Disconnect(void)
|
|||||||
|
|
||||||
if (currentServerM)
|
if (currentServerM)
|
||||||
cSatipDiscover::GetInstance()->UseServer(currentServerM, false);
|
cSatipDiscover::GetInstance()->UseServer(currentServerM, false);
|
||||||
|
openedM = false;
|
||||||
tunedM = false;
|
tunedM = false;
|
||||||
statusUpdateM.Set(0);
|
statusUpdateM.Set(0);
|
||||||
timeoutM = eMinKeepAliveIntervalMs;
|
timeoutM = eMinKeepAliveIntervalMs;
|
||||||
@ -288,7 +289,7 @@ void cSatipTuner::ParseReceptionParameters(const char *paramP)
|
|||||||
// "0" the frontend is not locked
|
// "0" the frontend is not locked
|
||||||
// "1" the frontend is locked
|
// "1" the frontend is locked
|
||||||
c = strstr(c, ",");
|
c = strstr(c, ",");
|
||||||
hasLockM = atoi(++c);
|
hasLockM = !!atoi(++c);
|
||||||
|
|
||||||
// quality:
|
// quality:
|
||||||
// Numerical value between 0 and 15
|
// Numerical value between 0 and 15
|
||||||
|
Loading…
Reference in New Issue
Block a user