mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
videoutils: add some debug
This commit is contained in:
parent
016e5285c7
commit
fba783a5fe
1 changed files with 10 additions and 0 deletions
|
@ -107,6 +107,8 @@ gst_video_codec_frame_ref (GstVideoCodecFrame * frame)
|
|||
{
|
||||
g_return_val_if_fail (frame != NULL, NULL);
|
||||
|
||||
GST_TRACE ("%p ref %d->%d", frame, frame->ref_count, frame->ref_count + 1);
|
||||
|
||||
g_atomic_int_inc (&frame->ref_count);
|
||||
|
||||
return frame;
|
||||
|
@ -125,6 +127,8 @@ gst_video_codec_frame_unref (GstVideoCodecFrame * frame)
|
|||
g_return_if_fail (frame != NULL);
|
||||
g_return_if_fail (frame->ref_count > 0);
|
||||
|
||||
GST_TRACE ("%p unref %d->%d", frame, frame->ref_count, frame->ref_count - 1);
|
||||
|
||||
if (g_atomic_int_dec_and_test (&frame->ref_count)) {
|
||||
_gst_video_codec_frame_free (frame);
|
||||
}
|
||||
|
@ -144,6 +148,8 @@ gst_video_codec_state_ref (GstVideoCodecState * state)
|
|||
{
|
||||
g_return_val_if_fail (state != NULL, NULL);
|
||||
|
||||
GST_TRACE ("%p ref %d->%d", state, state->ref_count, state->ref_count + 1);
|
||||
|
||||
g_atomic_int_inc (&state->ref_count);
|
||||
|
||||
return state;
|
||||
|
@ -152,6 +158,8 @@ gst_video_codec_state_ref (GstVideoCodecState * state)
|
|||
static void
|
||||
_gst_video_codec_state_free (GstVideoCodecState * state)
|
||||
{
|
||||
GST_DEBUG ("free state %p", state);
|
||||
|
||||
if (state->caps)
|
||||
gst_caps_unref (state->caps);
|
||||
if (state->codec_data)
|
||||
|
@ -172,6 +180,8 @@ gst_video_codec_state_unref (GstVideoCodecState * state)
|
|||
g_return_if_fail (state != NULL);
|
||||
g_return_if_fail (state->ref_count > 0);
|
||||
|
||||
GST_TRACE ("%p unref %d->%d", state, state->ref_count, state->ref_count - 1);
|
||||
|
||||
if (g_atomic_int_dec_and_test (&state->ref_count)) {
|
||||
_gst_video_codec_state_free (state);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue