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

Function av_dump_format

libavformat/dump.c:845–935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

843}
844
845void av_dump_format(AVFormatContext *ic, int index,
846 const char *url, int is_output)
847{
848 int i;
849 uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL;
850 if (ic->nb_streams && !printed)
851 return;
852
853 av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
854 is_output ? "Output" : "Input",
855 index,
856 is_output ? ic->oformat->name : ic->iformat->name,
857 is_output ? "to" : "from", url);
858 dump_metadata(NULL, ic->metadata, " ", AV_LOG_INFO);
859
860 if (!is_output) {
861 av_log(NULL, AV_LOG_INFO, " Duration: ");
862 if (ic->duration != AV_NOPTS_VALUE) {
863 int64_t hours, mins, secs, us;
864 int64_t duration = ic->duration + (ic->duration <= INT64_MAX - 5000 ? 5000 : 0);
865 secs = duration / AV_TIME_BASE;
866 us = duration % AV_TIME_BASE;
867 mins = secs / 60;
868 secs %= 60;
869 hours = mins / 60;
870 mins %= 60;
871 av_log(NULL, AV_LOG_INFO, "%02"PRId64":%02"PRId64":%02"PRId64".%02"PRId64"", hours, mins, secs,
872 (100 * us) / AV_TIME_BASE);
873 } else {
874 av_log(NULL, AV_LOG_INFO, "N/A");
875 }
876 if (ic->start_time != AV_NOPTS_VALUE) {
877 int secs, us;
878 av_log(NULL, AV_LOG_INFO, ", start: ");
879 secs = llabs(ic->start_time / AV_TIME_BASE);
880 us = llabs(ic->start_time % AV_TIME_BASE);
881 av_log(NULL, AV_LOG_INFO, "%s%d.%06d",
882 ic->start_time >= 0 ? "" : "-",
883 secs,
884 (int) av_rescale(us, 1000000, AV_TIME_BASE));
885 }
886 av_log(NULL, AV_LOG_INFO, ", bitrate: ");
887 if (ic->bit_rate)
888 av_log(NULL, AV_LOG_INFO, "%"PRId64" kb/s", ic->bit_rate / 1000);
889 else
890 av_log(NULL, AV_LOG_INFO, "N/A");
891 av_log(NULL, AV_LOG_INFO, "\n");
892 }
893
894 if (ic->nb_chapters)
895 av_log(NULL, AV_LOG_INFO, " Chapters:\n");
896 for (i = 0; i < ic->nb_chapters; i++) {
897 const AVChapter *ch = ic->chapters[i];
898 av_log(NULL, AV_LOG_INFO, " Chapter #%d:%d: ", index, i);
899 av_log(NULL, AV_LOG_INFO,
900 "start %f, ", ch->start * av_q2d(ch->time_base));
901 av_log(NULL, AV_LOG_INFO,
902 "end %f\n", ch->end * av_q2d(ch->time_base));

Callers 12

mux_check_initFunction · 0.85
read_threadFunction · 0.85
open_input_fileFunction · 0.85
create_streamsFunction · 0.85
ifile_openFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
open_input_fileFunction · 0.85
open_output_fileFunction · 0.85

Calls 9

av_logFunction · 0.85
dump_metadataFunction · 0.85
av_rescaleFunction · 0.85
av_q2dFunction · 0.85
av_dict_getFunction · 0.85
dump_stream_formatFunction · 0.85
dump_stream_groupFunction · 0.85
av_malloczFunction · 0.50
av_freeFunction · 0.50

Tested by

no test coverage detected