Skip to content

Commit

Permalink
evte: remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouqueau committed Mar 2, 2024
1 parent e194a8e commit 9574251
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions include/gpac/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,9 @@ typedef enum

GF_CODECID_TMCD = GF_4CC('t','m','c','d'),

/*Event Message Track*/
GF_CODECID_EVTE = GF_4CC('e','v','t','e'),

/*! codecid for FFV1*/
GF_CODECID_FFV1 = GF_4CC('f','f','v','1'),

Expand Down
4 changes: 3 additions & 1 deletion src/filters/dec_scte35.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ GF_Err scte35dec_process(GF_Filter *filter)
if (!emib) return GF_OUT_OF_MEM;

// Values according to SCTE 214-3 2015
// TODO: parse SCTE-35: missing embedded dts=pcr (when from m2ts), presentation_time_delta=pts-dts
emib->timescale = gf_filter_pck_get_timescale(pck);
emib->presentation_time_delta = 0;
emib->event_duration = 0xFFFFFFFF;
Expand Down Expand Up @@ -141,7 +142,8 @@ GF_Err scte35dec_process(GF_Filter *filter)
gf_filter_pck_set_framing(pck_dst, GF_TRUE, GF_TRUE);
gf_filter_pck_set_sap(pck_dst, GF_FILTER_SAP_1);
//TODO: compute duration when available in the SCTE35 payload
gf_filter_pck_set_duration(pck_dst, (u32)(gf_filter_pck_get_dts(pck) - ctx->last_dts));
if (ctx->last_dts)
gf_filter_pck_set_duration(pck_dst, (u32)(gf_filter_pck_get_dts(pck) - ctx->last_dts));
ctx->last_dts = gf_filter_pck_get_dts(pck);
gf_filter_pck_set_dts(pck_dst, ctx->last_dts);
gf_filter_pck_send(pck_dst);
Expand Down
5 changes: 5 additions & 0 deletions src/filters/isoffin_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ static void isor_declare_track(ISOMReader *read, ISOMChannel *ch, u32 track, u32
load_default = GF_TRUE;
break;

case GF_4CC('e','v','t','e'):
codec_id = m_subtype;
load_default = GF_TRUE;
break;

default:
codec_id = gf_codec_id_from_isobmf(m_subtype);
if (!codec_id || (codec_id==GF_CODECID_RAW)) {
Expand Down
2 changes: 1 addition & 1 deletion src/filters/mux_isom.c
Original file line number Diff line number Diff line change
Expand Up @@ -3080,7 +3080,7 @@ static GF_Err mp4_mux_setup_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_tr
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[MP4Mux] Error creating new TrueHD Audio sample description: %s\n", gf_error_to_string(e) ));
return e;
}
} else if (codec_id==GF_CODECID_SCTE35) { //EventMessage Track
} else if (codec_id==GF_CODECID_SCTE35 || codec_id==GF_CODECID_EVTE) { //EventMessage Track
e = gf_isom_evte_config_new(ctx->file, tkw->track_num, &tkw->stsd_idx);
if (e) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[MP4Mux] Error creating new EventMessage Track sample description: %s\n", gf_error_to_string(e) ));
Expand Down
1 change: 1 addition & 0 deletions src/utils/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ CodecIDReg CodecRegistry [] = {

{GF_CODECID_TMCD, 0, GF_STREAM_METADATA, "QT TimeCode", "tmcd", NULL, NULL},
//{GF_CODECID_SCTE35, 0, GF_STREAM_METADATA, "SCTE35", "scte", NULL, NULL},
{GF_CODECID_EVTE, 0, GF_STREAM_METADATA, "Event Messages", "evte", NULL, NULL},
{GF_CODECID_VVC, 0, GF_STREAM_VISUAL, "VVC Video", "vvc|266|h266", "vvc1", "video/vvc", .unframe=GF_TRUE},
{GF_CODECID_VVC_SUBPIC, 0, GF_STREAM_VISUAL, "VVC Subpicture Video", "vvs1", "vvs1", "video/x-vvc-subpic", .alt_codecid=GF_CODECID_VVC, .unframe=GF_TRUE},
{GF_CODECID_USAC, GF_CODECID_AAC_MPEG4, GF_STREAM_AUDIO, "xHEAAC / USAC Audio", "usac|xheaac", "mp4a", "audio/x-xheaac", .unframe=GF_TRUE},
Expand Down

0 comments on commit 9574251

Please sign in to comment.