add MP4Encoder class and test timelapse exporting

This commit is contained in:
2019-10-31 23:22:09 +01:00
parent 8e94d6b401
commit 9eecf60219
11 changed files with 283 additions and 47 deletions

View File

@@ -786,10 +786,7 @@ void App::dialog_export_mp4()
{
int nalu_sz = info.sLayerInfo[layer].pNalLengthInByte[nal];
uint8_t* data = info.sLayerInfo[layer].pBsBuf + bs_size;
data[0] = (nalu_sz - 4) >> 24;
data[1] = (nalu_sz - 4) >> 16;
data[2] = (nalu_sz - 4) >> 8;
data[3] = (nalu_sz - 4) & 0xff;
*(uint32_t*)data = BinaryStream::htonx(nalu_sz - 4);
bool sync = false;
if (nalu_bytes[4] == 0x65) // I-frame
sync = true;