Skip to content

Commit

Permalink
23001-18: inspect evte
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouqueau committed Mar 22, 2024
1 parent f58b71e commit bd71339
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/filters/inspect.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <gpac/list.h>
#include <gpac/xml.h>
#include <gpac/internal/media_dev.h>
#include <gpac/internal/isomedia_dev.h>

#ifndef GPAC_DISABLE_INSPECT

Expand Down Expand Up @@ -3055,6 +3056,24 @@ static void inspect_dump_tmcd(GF_InspectCtx *ctx, PidCtx *pctx, const u8 *data,
inspect_format_tmcd_internal(data, size, pctx->tmcd_flags, pctx->tmcd_rate.num, pctx->tmcd_rate.den, pctx->tmcd_fpt, NULL, pctx->bs, ctx->fftmcd, dump);
}

static void inspect_dump_boxes(GF_InspectCtx *ctx, PidCtx *pctx, const u8 *data, u32 size, FILE *dump)
{
if (ctx->dump) {
GF_BitStream *bs = gf_bs_new(data, size, GF_BITSTREAM_READ);
GF_Err e = GF_OK;
while (gf_bs_available(bs) > 0) {
GF_Box *a = NULL;
e = gf_isom_box_parse(&a, bs);
if (e) {
GF_LOG(GF_LOG_WARNING, GF_LOG_MEDIA, ("[Inspect] Event Track: error while parsing data boxes\n"));
break; //don't parse any further
}
gf_isom_box_dump(a, dump);
data += a->size;
}
}
}

static void inspect_dump_vpx(GF_InspectCtx *ctx, FILE *dump, u8 *ptr, u64 frame_size, Bool dump_crc, PidCtx *pctx, u32 vpversion)
{
GF_Err e;
Expand Down Expand Up @@ -3443,6 +3462,9 @@ static void inspect_dump_packet(GF_InspectCtx *ctx, FILE *dump, GF_FilterPacket
case GF_CODECID_TMCD:
inspect_dump_tmcd(ctx, pctx, (char *) data, size, dump);
break;
case GF_CODECID_EVTE:
inspect_dump_boxes(ctx, pctx, (char *) data, size, dump);
break;
case GF_CODECID_SUBS_TEXT:
case GF_CODECID_META_TEXT:
dflag=1;
Expand Down Expand Up @@ -4316,6 +4338,7 @@ static void inspect_dump_pid(GF_InspectCtx *ctx, FILE *dump, GF_FilterPid *pid,
case GF_CODECID_MPEG2_PART3:
case GF_CODECID_MPEG_AUDIO_L1:
case GF_CODECID_TMCD:
case GF_CODECID_EVTE:
inspect_printf(dump, "/>\n");
return;
case GF_CODECID_SUBS_XML:
Expand Down

0 comments on commit bd71339

Please sign in to comment.