Fixed 'length' typos.

This commit is contained in:
Rolf Ahrenberg 2015-01-14 17:58:13 +02:00
parent bcb11b6257
commit aed5a7820a
5 changed files with 8 additions and 8 deletions

2
rtcp.c
View File

@ -50,7 +50,7 @@ int cSatipRtcp::GetApplicationOffset(int *lengthP)
//unsigned int st = bufferM[offset] & 0x1F;
// Payload type
unsigned int pt = bufferM[offset + 1] & 0xFF;
// Lenght
// Length
unsigned int length = ((bufferM[offset + 2] & 0xFF) << 8) | (bufferM[offset + 3] & 0xFF);
// Convert it to bytes
length = (length + 1) * 4;

2
rtcp.h
View File

@ -20,7 +20,7 @@ private:
cSatipTunerIf &tunerM;
unsigned int bufferLenM;
unsigned char *bufferM;
int GetApplicationOffset(int *lenghtP);
int GetApplicationOffset(int *lengthP);
public:
cSatipRtcp(cSatipTunerIf &tunerP);

6
rtp.c
View File

@ -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());
unsigned int headerlen = 0;
@ -88,7 +88,7 @@ int cSatipRtp::GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP)
}
else
sequenceNumberM = seq;
// Header lenght
// Header length
headerlen = (3 + cc) * (unsigned int)sizeof(uint32_t);
// Check if extension
if (x) {
@ -130,7 +130,7 @@ void cSatipRtp::Process(void)
count = ReadMulti(bufferM, lenMsg, eRtpPacketReadCount, eMaxUdpPacketSizeB);
for (int i = 0; i < count; ++i) {
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]))
tunerM.ProcessVideoData(p + headerlen, lenMsg[i] - headerlen);
}

2
rtp.h
View File

@ -25,7 +25,7 @@ private:
time_t lastErrorReportM;
int packetErrorsM;
int sequenceNumberM;
int GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP);
int GetHeaderLength(unsigned char *bufferP, unsigned int lengthP);
public:
cSatipRtp(cSatipTunerIf &tunerP);

View File

@ -12,8 +12,8 @@ class cSatipTunerIf {
public:
cSatipTunerIf() {}
virtual ~cSatipTunerIf() {}
virtual void ProcessVideoData(u_char *bufferP, int lenghtP) = 0;
virtual void ProcessApplicationData(u_char *bufferP, int lenghtP) = 0;
virtual void ProcessVideoData(u_char *bufferP, int lengthP) = 0;
virtual void ProcessApplicationData(u_char *bufferP, int lengthP) = 0;
virtual void SetStreamId(int streamIdP) = 0;
virtual void SetSessionTimeout(const char *sessionP, int timeoutP) = 0;
virtual int GetId(void) = 0;