mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Improved RTP data logging.
Original patch tweaked ad optimized by Rolf Ahrenberg.
This commit is contained in:
parent
395390fb32
commit
7c1aa732b4
13
rtp.c
13
rtp.c
@ -71,7 +71,10 @@ int cSatipRtp::GetHeaderLenght(unsigned int lengthP)
|
|||||||
// CSCR count
|
// CSCR count
|
||||||
unsigned int cc = bufferM[0] & 0x0F;
|
unsigned int cc = bufferM[0] & 0x0F;
|
||||||
// Payload type: MPEG2 TS = 33
|
// Payload type: MPEG2 TS = 33
|
||||||
//unsigned int pt = bufferM[1] & 0x7F;
|
unsigned int pt = bufferM[1] & 0x7F;
|
||||||
|
if (pt != 33)
|
||||||
|
debug16("%s (%d) Received invalid RTP payload type %d - v=%d len=%d sync=0x%02X [device %d]",
|
||||||
|
__PRETTY_FUNCTION__, lengthP, pt, v, headerlen, bufferM[headerlen], tunerM.GetId());
|
||||||
// Sequence number
|
// Sequence number
|
||||||
int seq = ((bufferM[2] & 0xFF) << 8) | (bufferM[3] & 0xFF);
|
int seq = ((bufferM[2] & 0xFF) << 8) | (bufferM[3] & 0xFF);
|
||||||
if ((((sequenceNumberM + 1) % 0xFFFF) == 0) && (seq == 0xFFFF))
|
if ((((sequenceNumberM + 1) % 0xFFFF) == 0) && (seq == 0xFFFF))
|
||||||
@ -98,14 +101,18 @@ int cSatipRtp::GetHeaderLenght(unsigned int lengthP)
|
|||||||
}
|
}
|
||||||
// Check for empty payload
|
// Check for empty payload
|
||||||
if (lengthP == headerlen) {
|
if (lengthP == headerlen) {
|
||||||
debug1("%s (%d) Received empty RTP packet #%d [device %d]", __PRETTY_FUNCTION__, lengthP, seq, tunerM.GetId());
|
debug16("%s (%d) Received empty RTP packet #%d [device %d]", __PRETTY_FUNCTION__, lengthP, seq, tunerM.GetId());
|
||||||
headerlen = -1;
|
headerlen = -1;
|
||||||
}
|
}
|
||||||
// Check that rtp is version 2 and payload contains multiple of TS packet data
|
// 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)) {
|
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());
|
debug16("%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;
|
headerlen = -1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
debug16("%s (%d) Received RTP packet #%d v=%d len=%d sync=0x%02X [device %d]", __PRETTY_FUNCTION__,
|
||||||
|
lengthP, seq, v, headerlen, bufferM[headerlen], tunerM.GetId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user