summaryrefslogtreecommitdiff
path: root/gst-libs/gst/video/gstvideoutils.c
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-01-13 12:16:01 +0100
committerWim Taymans <wtaymans@redhat.com>2014-01-13 17:24:01 +0100
commitfba783a5febd2c32a171446f4abd758224e3dd91 (patch)
tree3c2e1ac4eecb067b0d0a57558d5b494408d2886b /gst-libs/gst/video/gstvideoutils.c
parent016e5285c7354601dc67e8a1c94ac280e2c9e4cb (diff)
videoutils: add some debug
Diffstat (limited to 'gst-libs/gst/video/gstvideoutils.c')
-rw-r--r--gst-libs/gst/video/gstvideoutils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gst-libs/gst/video/gstvideoutils.c b/gst-libs/gst/video/gstvideoutils.c
index b4bf0097f..b3decaf26 100644
--- a/gst-libs/gst/video/gstvideoutils.c
+++ b/gst-libs/gst/video/gstvideoutils.c
@@ -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);
}