Include codec_type in stream and packet dumps

pull/3187/head
Isaac Connor 2021-03-03 15:23:58 -05:00
parent de0bbf7e04
commit 8a33fb6665
2 changed files with 8 additions and 3 deletions

View File

@ -257,9 +257,10 @@ void zm_dump_codecpar(const AVCodecParameters *par) {
#endif
void zm_dump_codec(const AVCodecContext *codec) {
Debug(1, "Dumping codec_context codec_type(%d) codec_id(%d %s) width(%d) height(%d) timebase(%d/%d) format(%s) "
Debug(1, "Dumping codec_context codec_type(%d %s) codec_id(%d %s) width(%d) height(%d) timebase(%d/%d) format(%s) "
"gop_size %d max_b_frames %d me_cmp %d me_range %d qmin %d qmax %d",
codec->codec_type,
av_get_media_type_string(codec->codec_type),
codec->codec_id,
avcodec_get_name(codec->codec_id),
codec->width,
@ -306,7 +307,10 @@ void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output)
);
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
Debug(1, "codec: %s", avcodec_get_name(st->codecpar->codec_id));
Debug(1, "codec: %s %s",
avcodec_get_name(st->codecpar->codec_id),
av_get_media_type_string(st->codecpar->codec_type)
);
#else
char buf[256];
avcodec_string(buf, sizeof(buf), st->codec, is_output);

View File

@ -370,7 +370,7 @@ void zm_dump_codecpar(const AVCodecParameters *par);
double pts_time = static_cast<double>(av_rescale_q(pkt.pts, stream->time_base, AV_TIME_BASE_Q)) / AV_TIME_BASE; \
\
Debug(2, "%s: pts: %" PRId64 " * %u/%u=%f, dts: %" PRId64 \
", size: %d, stream_index: %d, flags: %04x, keyframe(%d) pos: %" PRId64", duration: %" AV_PACKET_DURATION_FMT, \
", size: %d, stream_index: %d, %s flags: %04x, keyframe(%d) pos: %" PRId64", duration: %" AV_PACKET_DURATION_FMT, \
text, \
pkt.pts, \
stream->time_base.num, \
@ -379,6 +379,7 @@ void zm_dump_codecpar(const AVCodecParameters *par);
pkt.dts, \
pkt.size, \
pkt.stream_index, \
av_get_media_type_string(stream->codecpar->codec_type), \
pkt.flags, \
pkt.flags & AV_PKT_FLAG_KEY, \
pkt.pos, \