mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Fixed 'length' typos.
This commit is contained in:
parent
bcb11b6257
commit
aed5a7820a
2
rtcp.c
2
rtcp.c
@ -50,7 +50,7 @@ int cSatipRtcp::GetApplicationOffset(int *lengthP)
|
|||||||
//unsigned int st = bufferM[offset] & 0x1F;
|
//unsigned int st = bufferM[offset] & 0x1F;
|
||||||
// Payload type
|
// Payload type
|
||||||
unsigned int pt = bufferM[offset + 1] & 0xFF;
|
unsigned int pt = bufferM[offset + 1] & 0xFF;
|
||||||
// Lenght
|
// Length
|
||||||
unsigned int length = ((bufferM[offset + 2] & 0xFF) << 8) | (bufferM[offset + 3] & 0xFF);
|
unsigned int length = ((bufferM[offset + 2] & 0xFF) << 8) | (bufferM[offset + 3] & 0xFF);
|
||||||
// Convert it to bytes
|
// Convert it to bytes
|
||||||
length = (length + 1) * 4;
|
length = (length + 1) * 4;
|
||||||
|
2
rtcp.h
2
rtcp.h
@ -20,7 +20,7 @@ private:
|
|||||||
cSatipTunerIf &tunerM;
|
cSatipTunerIf &tunerM;
|
||||||
unsigned int bufferLenM;
|
unsigned int bufferLenM;
|
||||||
unsigned char *bufferM;
|
unsigned char *bufferM;
|
||||||
int GetApplicationOffset(int *lenghtP);
|
int GetApplicationOffset(int *lengthP);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cSatipRtcp(cSatipTunerIf &tunerP);
|
cSatipRtcp(cSatipTunerIf &tunerP);
|
||||||
|
6
rtp.c
6
rtp.c
@ -51,7 +51,7 @@ void cSatipRtp::Close(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cSatipRtp::GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP)
|
int cSatipRtp::GetHeaderLength(unsigned char *bufferP, unsigned int lengthP)
|
||||||
{
|
{
|
||||||
debug16("%s (, %d) [device %d]", __PRETTY_FUNCTION__, lengthP, tunerM.GetId());
|
debug16("%s (, %d) [device %d]", __PRETTY_FUNCTION__, lengthP, tunerM.GetId());
|
||||||
unsigned int headerlen = 0;
|
unsigned int headerlen = 0;
|
||||||
@ -88,7 +88,7 @@ int cSatipRtp::GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
sequenceNumberM = seq;
|
sequenceNumberM = seq;
|
||||||
// Header lenght
|
// Header length
|
||||||
headerlen = (3 + cc) * (unsigned int)sizeof(uint32_t);
|
headerlen = (3 + cc) * (unsigned int)sizeof(uint32_t);
|
||||||
// Check if extension
|
// Check if extension
|
||||||
if (x) {
|
if (x) {
|
||||||
@ -130,7 +130,7 @@ void cSatipRtp::Process(void)
|
|||||||
count = ReadMulti(bufferM, lenMsg, eRtpPacketReadCount, eMaxUdpPacketSizeB);
|
count = ReadMulti(bufferM, lenMsg, eRtpPacketReadCount, eMaxUdpPacketSizeB);
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
unsigned char *p = &bufferM[i * eMaxUdpPacketSizeB];
|
unsigned char *p = &bufferM[i * eMaxUdpPacketSizeB];
|
||||||
int headerlen = GetHeaderLenght(p, lenMsg[i]);
|
int headerlen = GetHeaderLength(p, lenMsg[i]);
|
||||||
if ((headerlen >= 0) && (headerlen < (int)lenMsg[i]))
|
if ((headerlen >= 0) && (headerlen < (int)lenMsg[i]))
|
||||||
tunerM.ProcessVideoData(p + headerlen, lenMsg[i] - headerlen);
|
tunerM.ProcessVideoData(p + headerlen, lenMsg[i] - headerlen);
|
||||||
}
|
}
|
||||||
|
2
rtp.h
2
rtp.h
@ -25,7 +25,7 @@ private:
|
|||||||
time_t lastErrorReportM;
|
time_t lastErrorReportM;
|
||||||
int packetErrorsM;
|
int packetErrorsM;
|
||||||
int sequenceNumberM;
|
int sequenceNumberM;
|
||||||
int GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP);
|
int GetHeaderLength(unsigned char *bufferP, unsigned int lengthP);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cSatipRtp(cSatipTunerIf &tunerP);
|
cSatipRtp(cSatipTunerIf &tunerP);
|
||||||
|
@ -12,8 +12,8 @@ class cSatipTunerIf {
|
|||||||
public:
|
public:
|
||||||
cSatipTunerIf() {}
|
cSatipTunerIf() {}
|
||||||
virtual ~cSatipTunerIf() {}
|
virtual ~cSatipTunerIf() {}
|
||||||
virtual void ProcessVideoData(u_char *bufferP, int lenghtP) = 0;
|
virtual void ProcessVideoData(u_char *bufferP, int lengthP) = 0;
|
||||||
virtual void ProcessApplicationData(u_char *bufferP, int lenghtP) = 0;
|
virtual void ProcessApplicationData(u_char *bufferP, int lengthP) = 0;
|
||||||
virtual void SetStreamId(int streamIdP) = 0;
|
virtual void SetStreamId(int streamIdP) = 0;
|
||||||
virtual void SetSessionTimeout(const char *sessionP, int timeoutP) = 0;
|
virtual void SetSessionTimeout(const char *sessionP, int timeoutP) = 0;
|
||||||
virtual int GetId(void) = 0;
|
virtual int GetId(void) = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user