Implemented RTP HEVC Aggregation Packets

This commit is contained in:
Thulinma 2019-09-20 12:55:47 +02:00
parent 218e1e70a6
commit 6d3eb861b8
2 changed files with 13 additions and 2 deletions

View file

@ -703,7 +703,18 @@ namespace RTP{
} }
uint8_t nalType = (pl[0] & 0x7E) >> 1; uint8_t nalType = (pl[0] & 0x7E) >> 1;
if (nalType == 48){ if (nalType == 48){
ERROR_MSG("AP not supported yet"); unsigned int pos = 2;
while (pos + 2 < plSize){
unsigned int pLen = Bit::btohs(pl + pos);
VERYHIGH_MSG("AP Packet of %ub and type %s", pLen, h265::typeToStr((pl[pos+2]&0x7E) >> 1));
if (packBuffer.allocate(4 + pLen)){
Bit::htobl(packBuffer, pLen); // size-prepend
memcpy(packBuffer + 4, pl + pos + 2, pLen);
handleHEVCSingle(msTime, packBuffer, pLen + 4, h265::isKeyframe(pl + pos + 2, pLen));
}
pos += 2 + pLen;
}
return;
}else if (nalType == 49){ }else if (nalType == 49){
DONTEVEN_MSG("H265 Fragmentation Unit"); DONTEVEN_MSG("H265 Fragmentation Unit");
// No length yet? Check for start bit. Ignore rest. // No length yet? Check for start bit. Ignore rest.

View file

@ -384,7 +384,7 @@ namespace Mist{
HTTP_R.Clean(); HTTP_R.Clean();
continue; continue;
} }
WARN_MSG("Unhandled command %s:\n%s", HTTP_R.method.c_str(), HTTP_R.BuildRequest().c_str()); WARN_MSG("Unhandled command received (protocol corruption?)");
HTTP_R.Clean(); HTTP_R.Clean();
} }
} }