mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
avviddec: Improve debug statements
Add SFN to better track what is going on Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6301>
This commit is contained in:
parent
3bed35c342
commit
eacd5c1cb1
1 changed files with 9 additions and 6 deletions
|
@ -748,7 +748,8 @@ gst_ffmpegviddec_video_frame_new (GstFFMpegVidDec * ffmpegdec,
|
||||||
dframe->ffmpegdec = ffmpegdec;
|
dframe->ffmpegdec = ffmpegdec;
|
||||||
dframe->frame = frame;
|
dframe->frame = frame;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "new video frame %p", dframe);
|
GST_DEBUG_OBJECT (ffmpegdec, "new video frame %p for sfn # %d", dframe,
|
||||||
|
frame->system_frame_number);
|
||||||
|
|
||||||
return dframe;
|
return dframe;
|
||||||
}
|
}
|
||||||
|
@ -757,7 +758,8 @@ static void
|
||||||
gst_ffmpegviddec_video_frame_free (GstFFMpegVidDec * ffmpegdec,
|
gst_ffmpegviddec_video_frame_free (GstFFMpegVidDec * ffmpegdec,
|
||||||
GstFFMpegVidDecVideoFrame * frame)
|
GstFFMpegVidDecVideoFrame * frame)
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "free video frame %p", frame);
|
GST_DEBUG_OBJECT (ffmpegdec, "free video frame %p for sfn # %d", frame,
|
||||||
|
frame->frame->system_frame_number);
|
||||||
|
|
||||||
if (frame->mapped)
|
if (frame->mapped)
|
||||||
gst_video_frame_unmap (&frame->vframe);
|
gst_video_frame_unmap (&frame->vframe);
|
||||||
|
@ -994,14 +996,14 @@ gst_ffmpegviddec_get_buffer2 (AVCodecContext * context, AVFrame * picture,
|
||||||
|
|
||||||
/* GstFFMpegVidDecVideoFrame receives the frame ref */
|
/* GstFFMpegVidDecVideoFrame receives the frame ref */
|
||||||
if (picture->opaque) {
|
if (picture->opaque) {
|
||||||
|
GST_DEBUG_OBJECT (ffmpegdec, "Re-using opaque %p", picture->opaque);
|
||||||
dframe = picture->opaque;
|
dframe = picture->opaque;
|
||||||
dframe->frame = frame;
|
dframe->frame = frame;
|
||||||
} else {
|
} else {
|
||||||
picture->opaque = dframe =
|
picture->opaque = dframe =
|
||||||
gst_ffmpegviddec_video_frame_new (ffmpegdec, frame);
|
gst_ffmpegviddec_video_frame_new (ffmpegdec, frame);
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "storing opaque %p", dframe);
|
GST_DEBUG_OBJECT (ffmpegdec, "storing opaque %p", dframe);
|
||||||
|
}
|
||||||
|
|
||||||
if (!gst_ffmpegviddec_can_direct_render (ffmpegdec))
|
if (!gst_ffmpegviddec_can_direct_render (ffmpegdec))
|
||||||
goto no_dr;
|
goto no_dr;
|
||||||
|
@ -2239,8 +2241,9 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
|
||||||
packet->opaque_ref =
|
packet->opaque_ref =
|
||||||
av_buffer_create (NULL, 0, gst_ffmpeg_opaque_free,
|
av_buffer_create (NULL, 0, gst_ffmpeg_opaque_free,
|
||||||
gst_video_codec_frame_ref (frame), 0);
|
gst_video_codec_frame_ref (frame), 0);
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "Store incoming frame %u on AVPacket opaque",
|
GST_DEBUG_OBJECT (ffmpegdec,
|
||||||
frame->system_frame_number);
|
"Store incoming frame # %u (%p) on AVPacket opaque",
|
||||||
|
frame->system_frame_number, frame);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
ffmpegdec->context->reordered_opaque = (gint64) frame->system_frame_number;
|
ffmpegdec->context->reordered_opaque = (gint64) frame->system_frame_number;
|
||||||
|
|
Loading…
Reference in a new issue