Adjust debug logging
This commit is contained in:
parent
85b35cf82c
commit
25bce3b8ca
|
@ -2643,9 +2643,7 @@ bool Monitor::Decode() {
|
||||||
delete packet->image;
|
delete packet->image;
|
||||||
packet->image = nullptr;
|
packet->image = nullptr;
|
||||||
}
|
}
|
||||||
Debug(1, "Done assigning about to unref");
|
|
||||||
av_frame_unref(dest_frame);
|
av_frame_unref(dest_frame);
|
||||||
Debug(1, "Done assigning onde to unref");
|
|
||||||
} // end if have convert_context
|
} // end if have convert_context
|
||||||
} // end if need transfer to image
|
} // end if need transfer to image
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -132,8 +132,8 @@ int ZMPacket::decode(AVCodecContext *ctx) {
|
||||||
#if HAVE_LIBAVUTIL_HWCONTEXT_H
|
#if HAVE_LIBAVUTIL_HWCONTEXT_H
|
||||||
#if LIBAVCODEC_VERSION_CHECK(57, 89, 0, 89, 0)
|
#if LIBAVCODEC_VERSION_CHECK(57, 89, 0, 89, 0)
|
||||||
|
|
||||||
if ( fix_deprecated_pix_fmt(ctx->sw_pix_fmt) != fix_deprecated_pix_fmt(static_cast<AVPixelFormat>(in_frame->format)) ) {
|
if (fix_deprecated_pix_fmt(ctx->sw_pix_fmt) != fix_deprecated_pix_fmt(static_cast<AVPixelFormat>(in_frame->format))) {
|
||||||
Debug(1, "Have different format ctx->pix_fmt %s ?= ctx->sw_pix_fmt %s in_frame->format %s.",
|
Debug(3, "Have different format ctx->pix_fmt %s ?= ctx->sw_pix_fmt %s in_frame->format %s.",
|
||||||
av_get_pix_fmt_name(ctx->pix_fmt),
|
av_get_pix_fmt_name(ctx->pix_fmt),
|
||||||
av_get_pix_fmt_name(ctx->sw_pix_fmt),
|
av_get_pix_fmt_name(ctx->sw_pix_fmt),
|
||||||
av_get_pix_fmt_name(static_cast<AVPixelFormat>(in_frame->format))
|
av_get_pix_fmt_name(static_cast<AVPixelFormat>(in_frame->format))
|
||||||
|
@ -180,7 +180,7 @@ int ZMPacket::decode(AVCodecContext *ctx) {
|
||||||
/* retrieve data from GPU to CPU */
|
/* retrieve data from GPU to CPU */
|
||||||
zm_dump_video_frame(in_frame, "Before hwtransfer");
|
zm_dump_video_frame(in_frame, "Before hwtransfer");
|
||||||
ret = av_hwframe_transfer_data(new_frame, in_frame, 0);
|
ret = av_hwframe_transfer_data(new_frame, in_frame, 0);
|
||||||
if ( ret < 0 ) {
|
if (ret < 0) {
|
||||||
Error("Unable to transfer frame: %s, continuing",
|
Error("Unable to transfer frame: %s, continuing",
|
||||||
av_make_error_string(ret).c_str());
|
av_make_error_string(ret).c_str());
|
||||||
av_frame_free(&in_frame);
|
av_frame_free(&in_frame);
|
||||||
|
@ -188,7 +188,7 @@ int ZMPacket::decode(AVCodecContext *ctx) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ret = av_frame_copy_props(new_frame, in_frame);
|
ret = av_frame_copy_props(new_frame, in_frame);
|
||||||
if ( ret < 0 ) {
|
if (ret < 0) {
|
||||||
Error("Unable to copy props: %s, continuing",
|
Error("Unable to copy props: %s, continuing",
|
||||||
av_make_error_string(ret).c_str());
|
av_make_error_string(ret).c_str());
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ int ZMPacket::decode(AVCodecContext *ctx) {
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
Debug(2, "Same pix format %s so not hwtransferring. sw_pix_fmt is %s",
|
Debug(3, "Same pix format %s so not hwtransferring. sw_pix_fmt is %s",
|
||||||
av_get_pix_fmt_name(ctx->pix_fmt),
|
av_get_pix_fmt_name(ctx->pix_fmt),
|
||||||
av_get_pix_fmt_name(ctx->sw_pix_fmt)
|
av_get_pix_fmt_name(ctx->sw_pix_fmt)
|
||||||
);
|
);
|
||||||
|
@ -219,12 +219,12 @@ int ZMPacket::decode(AVCodecContext *ctx) {
|
||||||
} // end ZMPacket::decode
|
} // end ZMPacket::decode
|
||||||
|
|
||||||
Image *ZMPacket::get_image(Image *i) {
|
Image *ZMPacket::get_image(Image *i) {
|
||||||
if ( !in_frame ) {
|
if (!in_frame) {
|
||||||
Error("Can't get image without frame.. maybe need to decode first");
|
Error("Can't get image without frame.. maybe need to decode first");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if ( !image ) {
|
if (!image) {
|
||||||
if ( !i ) {
|
if (!i) {
|
||||||
Error("Need a pre-allocated image buffer");
|
Error("Need a pre-allocated image buffer");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ Image *ZMPacket::set_image(Image *i) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AVPacket *ZMPacket::set_packet(AVPacket *p) {
|
AVPacket *ZMPacket::set_packet(AVPacket *p) {
|
||||||
if ( zm_av_packet_ref(&packet, p) < 0 ) {
|
if (zm_av_packet_ref(&packet, p) < 0) {
|
||||||
Error("error refing packet");
|
Error("error refing packet");
|
||||||
}
|
}
|
||||||
//ZM_DUMP_PACKET(packet, "zmpacket:");
|
//ZM_DUMP_PACKET(packet, "zmpacket:");
|
||||||
|
|
Loading…
Reference in New Issue