Add parser for OBU packets

This commit is contained in:
dijunkun
2024-04-22 17:32:25 +08:00
parent f5586a7922
commit dfc72b5ccc
8 changed files with 353 additions and 1 deletions

View File

@@ -20,6 +20,8 @@ extern "C" {
};
#endif
#include "obu_parser.h"
#define SAVE_NV12_STREAM 0
#define SAVE_H264_STREAM 1
@@ -340,6 +342,13 @@ int AomAv1Encoder::Encode(
SET_ENCODER_PARAM_OR_RETURN_ERROR(AOME_GET_LAST_QUANTIZER, &qp);
LOG_INFO("Encoded frame qp = {}", qp);
std::vector<Obu> obus = ParseObus(encoded_frame_, encoded_frame_size_);
// LOG_ERROR("Obu size = [{}]", obus.size());
// for (int i = 0; i < obus.size(); i++) {
// LOG_ERROR("Obu size = {} [{} {}]", i, obus[i].size_,
// obus[i].payload_size_);
// }
// int consumed_size = 0;
// int offset = 0;
// int unit = 0;