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

Function dump_stream_group

libavformat/dump.c:691–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691static void dump_stream_group(const AVFormatContext *ic, uint8_t *printed,
692 int i, int index, int is_output)
693{
694 const AVStreamGroup *stg = ic->stream_groups[i];
695 int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
696 char buf[512];
697 int ret;
698
699 av_log(NULL, AV_LOG_INFO, " Stream group #%d:%d", index, i);
700 if (flags & AVFMT_SHOW_IDS)
701 av_log(NULL, AV_LOG_INFO, "[0x%"PRIx64"]", stg->id);
702 av_log(NULL, AV_LOG_INFO, ":");
703
704 switch (stg->type) {
705 case AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT: {
706 const AVIAMFAudioElement *audio_element = stg->params.iamf_audio_element;
707 av_log(NULL, AV_LOG_INFO, " IAMF Audio Element:");
708 dump_disposition(stg->disposition, AV_LOG_INFO);
709 av_log(NULL, AV_LOG_INFO, "\n");
710 dump_metadata(NULL, stg->metadata, " ", AV_LOG_INFO);
711 for (int j = 0; j < audio_element->nb_layers; j++) {
712 const AVIAMFLayer *layer = audio_element->layers[j];
713 int channel_count = layer->ch_layout.nb_channels;
714 av_log(NULL, AV_LOG_INFO, " Layer %d:", j);
715 ret = av_channel_layout_describe(&layer->ch_layout, buf, sizeof(buf));
716 if (ret >= 0)
717 av_log(NULL, AV_LOG_INFO, " %s", buf);
718 av_log(NULL, AV_LOG_INFO, "\n");
719 for (int k = 0; channel_count > 0 && k < stg->nb_streams; k++) {
720 AVStream *st = stg->streams[k];
721 dump_stream_format(ic, st->index, i, index, is_output, AV_LOG_VERBOSE);
722 printed[st->index] = 1;
723 channel_count -= st->codecpar->ch_layout.nb_channels;
724 }
725 }
726 break;
727 }
728 case AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION: {
729 const AVIAMFMixPresentation *mix_presentation = stg->params.iamf_mix_presentation;
730 av_log(NULL, AV_LOG_INFO, " IAMF Mix Presentation:");
731 dump_disposition(stg->disposition, AV_LOG_INFO);
732 av_log(NULL, AV_LOG_INFO, "\n");
733 dump_metadata(NULL, stg->metadata, " ", AV_LOG_INFO);
734 dump_dictionary(NULL, mix_presentation->annotations, "Annotations", " ", AV_LOG_INFO);
735 for (int j = 0; j < mix_presentation->nb_submixes; j++) {
736 AVIAMFSubmix *sub_mix = mix_presentation->submixes[j];
737 av_log(NULL, AV_LOG_INFO, " Submix %d:\n", j);
738 for (int k = 0; k < sub_mix->nb_elements; k++) {
739 const AVIAMFSubmixElement *submix_element = sub_mix->elements[k];
740 const AVStreamGroup *audio_element = NULL;
741 for (int l = 0; l < ic->nb_stream_groups; l++)
742 if (ic->stream_groups[l]->type == AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT &&
743 ic->stream_groups[l]->id == submix_element->audio_element_id) {
744 audio_element = ic->stream_groups[l];
745 break;
746 }
747 if (audio_element) {
748 av_log(NULL, AV_LOG_INFO, " IAMF Audio Element #%d:%d",

Callers 1

av_dump_formatFunction · 0.85

Calls 13

av_logFunction · 0.85
dump_dispositionFunction · 0.85
dump_metadataFunction · 0.85
dump_stream_formatFunction · 0.85
avcodec_alloc_context3Function · 0.85
av_opt_setFunction · 0.85
avcodec_stringFunction · 0.85
av_stristrFunction · 0.85
avcodec_free_contextFunction · 0.85
dump_sidedataFunction · 0.85

Tested by

no test coverage detected