MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / print_frame_side_data

Function print_frame_side_data

fftools/ffprobe.c:1344–1407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1342}
1343
1344static void print_frame_side_data(AVTextFormatContext *tfc,
1345 const AVFrame *frame,
1346 const AVStream *stream)
1347{
1348 avtext_print_section_header(tfc, NULL, SECTION_ID_FRAME_SIDE_DATA_LIST);
1349
1350 for (int i = 0; i < frame->nb_side_data; i++) {
1351 const AVFrameSideData *sd = frame->side_data[i];
1352 const char *name;
1353
1354 avtext_print_section_header(tfc, sd, SECTION_ID_FRAME_SIDE_DATA);
1355 name = av_frame_side_data_name(sd->type);
1356 print_str("side_data_type", name ? name : "unknown");
1357 if (sd->type == AV_FRAME_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
1358 print_displaymatrix(tfc, (const int32_t*)sd->data);
1359 } else if (sd->type == AV_FRAME_DATA_AFD && sd->size > 0) {
1360 print_int("active_format", *sd->data);
1361 } else if (sd->type == AV_FRAME_DATA_GOP_TIMECODE && sd->size >= 8) {
1362 char tcbuf[AV_TIMECODE_STR_SIZE];
1363 av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data));
1364 print_str("timecode", tcbuf);
1365 } else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size == 16) {
1366 uint32_t *tc = (uint32_t*)sd->data;
1367 int m = FFMIN(tc[0],3);
1368 avtext_print_section_header(tfc, NULL, SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST);
1369 for (int j = 1; j <= m ; j++) {
1370 char tcbuf[AV_TIMECODE_STR_SIZE];
1371 av_timecode_make_smpte_tc_string2(tcbuf, stream->avg_frame_rate, tc[j], 0, 0);
1372 avtext_print_section_header(tfc, NULL, SECTION_ID_FRAME_SIDE_DATA_TIMECODE);
1373 print_str("value", tcbuf);
1374 avtext_print_section_footer(tfc);
1375 }
1376 avtext_print_section_footer(tfc);
1377 } else if (sd->type == AV_FRAME_DATA_MASTERING_DISPLAY_METADATA) {
1378 print_mastering_display_metadata(tfc, (AVMasteringDisplayMetadata *)sd->data);
1379 } else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_PLUS) {
1380 AVDynamicHDRPlus *metadata = (AVDynamicHDRPlus *)sd->data;
1381 print_dynamic_hdr10_plus(tfc, metadata);
1382 } else if (sd->type == AV_FRAME_DATA_CONTENT_LIGHT_LEVEL) {
1383 print_context_light_level(tfc, (AVContentLightMetadata *)sd->data);
1384 } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) {
1385 const AVDictionaryEntry *tag = av_dict_get(sd->metadata, "name", NULL, AV_DICT_MATCH_CASE);
1386 if (tag)
1387 print_str(tag->key, tag->value);
1388 print_int("size", sd->size);
1389 } else if (sd->type == AV_FRAME_DATA_DOVI_METADATA) {
1390 print_dovi_metadata(tfc, (const AVDOVIMetadata *)sd->data);
1391 } else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_VIVID) {
1392 AVDynamicHDRVivid *metadata = (AVDynamicHDRVivid *)sd->data;
1393 print_dynamic_hdr_vivid(tfc, metadata);
1394 } else if (sd->type == AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT) {
1395 print_ambient_viewing_environment(tfc, (const AVAmbientViewingEnvironment *)sd->data);
1396 } else if (sd->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS) {
1397 AVFilmGrainParams *fgp = (AVFilmGrainParams *)sd->data;
1398 print_film_grain_params(tfc, fgp);
1399 } else if (sd->type == AV_FRAME_DATA_VIEW_ID) {
1400 print_int("view_id", *(int*)sd->data);
1401 } else if (sd->type == AV_FRAME_DATA_EXIF) {

Callers 1

show_frameFunction · 0.85

Calls 14

av_frame_side_data_nameFunction · 0.85
print_displaymatrixFunction · 0.85
print_dynamic_hdr10_plusFunction · 0.85
av_dict_getFunction · 0.85
print_dovi_metadataFunction · 0.85
print_dynamic_hdr_vividFunction · 0.85

Tested by

no test coverage detected