Convert zm_dump_frame from a function to a define, this way we get line #'s from where we call zm_dump_frame instead of from the line in zm_ffmpeg where the function was.
This commit is contained in:
parent
d244aadee6
commit
288f2f3e8f
|
@ -298,25 +298,6 @@ void zm_dump_video_frame(const AVFrame *frame, const char *text) {
|
|||
frame->pts
|
||||
);
|
||||
}
|
||||
void zm_dump_frame(const AVFrame *frame,const char *text) {
|
||||
Debug(1, "%s: format %d %s sample_rate %" PRIu32 " nb_samples %d channels %d"
|
||||
" duration %" PRId64
|
||||
" layout %d pts %" PRId64,
|
||||
text,
|
||||
frame->format,
|
||||
av_get_sample_fmt_name((AVSampleFormat)frame->format),
|
||||
frame->sample_rate,
|
||||
frame->nb_samples,
|
||||
#if LIBAVCODEC_VERSION_CHECK(56, 8, 0, 60, 100)
|
||||
frame->channels,
|
||||
frame->pkt_duration,
|
||||
#else
|
||||
0, 0,
|
||||
#endif
|
||||
frame->channel_layout,
|
||||
frame->pts
|
||||
);
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
|
||||
void zm_dump_codecpar ( const AVCodecParameters *par ) {
|
||||
|
|
|
@ -299,7 +299,36 @@ void zm_dump_codec(const AVCodecContext *codec);
|
|||
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
|
||||
void zm_dump_codecpar(const AVCodecParameters *par);
|
||||
#endif
|
||||
void zm_dump_frame(const AVFrame *frame, const char *text="Frame");
|
||||
#if LIBAVCODEC_VERSION_CHECK(56, 8, 0, 60, 100)
|
||||
#define zm_dump_frame(frame, text) Debug(1, "%s: format %d %s sample_rate %" PRIu32 " nb_samples %d channels %d" \
|
||||
" duration %" PRId64 \
|
||||
" layout %d pts %" PRId64,\
|
||||
text, \
|
||||
frame->format, \
|
||||
av_get_sample_fmt_name((AVSampleFormat)frame->format), \
|
||||
frame->sample_rate, \
|
||||
frame->nb_samples, \
|
||||
frame->channels, \
|
||||
frame->pkt_duration, \
|
||||
frame->channel_layout, \
|
||||
frame->pts \
|
||||
);
|
||||
#else
|
||||
#define zm_dump_frame(frame, text) Debug(1, "%s: format %d %s sample_rate %" PRIu32 " nb_samples %d channels %d" \
|
||||
" duration %" PRId64 \
|
||||
" layout %d pts %" PRId64, \
|
||||
text, \
|
||||
frame->format, \
|
||||
av_get_sample_fmt_name((AVSampleFormat)frame->format), \
|
||||
frame->sample_rate, \
|
||||
frame->nb_samples, \
|
||||
0, 0, \
|
||||
frame->channel_layout, \
|
||||
frame->pts \
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
void zm_dump_video_frame(const AVFrame *frame, const char *text="Frame");
|
||||
|
||||
#if LIBAVCODEC_VERSION_CHECK(56, 8, 0, 60, 100)
|
||||
|
|
Loading…
Reference in New Issue