From 021d2ab947ca4b22b58c5b893759b36c4ee16ba7 Mon Sep 17 00:00:00 2001 From: gb Date: Mon, 3 May 2010 08:34:57 +0000 Subject: [PATCH] Drop obsolete (and wrong) code. --- gst-libs/gst/vaapi/gstvaapidecoder.c | 27 --------------------------- gst-libs/gst/vaapi/gstvaapidecoder_priv.h | 2 -- 2 files changed, 29 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 675600e..1b9bd01 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -53,30 +53,6 @@ enum { PROP_CODEC_DATA }; -static void -update_clock(GstVaapiDecoder *decoder, GstBuffer *buffer) -{ - GstVaapiDecoderPrivate * const priv = decoder->priv; - GstClockTime timestamp, duration; - - timestamp = GST_BUFFER_TIMESTAMP(buffer); - duration = GST_BUFFER_DURATION(buffer); - - if (GST_CLOCK_TIME_IS_VALID(duration)) { - if (GST_CLOCK_TIME_IS_VALID(timestamp)) - priv->surface_timestamp = timestamp; - priv->surface_duration = duration; - } - else { - /* Assumes those are user-generated buffers with no timestamp - or duration information. Try to rely on "framerate". */ - if (!GST_CLOCK_TIME_IS_VALID(priv->surface_timestamp)) - priv->surface_timestamp = 0; - priv->surface_duration = - gst_util_uint64_scale_int(GST_SECOND, priv->fps_d, priv->fps_n); - } -} - static inline void init_buffer(GstBuffer *buffer, const guchar *buf, guint buf_size) { @@ -156,7 +132,6 @@ pop_buffer(GstVaapiDecoder *decoder) GST_DEBUG("dequeue buffer %p for decoding (%d bytes)", buffer, GST_BUFFER_SIZE(buffer)); - update_clock(decoder, buffer); return buffer; } @@ -391,8 +366,6 @@ gst_vaapi_decoder_init(GstVaapiDecoder *decoder) priv->codec_data = NULL; priv->fps_n = 1000; priv->fps_d = 30; - priv->surface_timestamp = GST_CLOCK_TIME_NONE; - priv->surface_duration = GST_CLOCK_TIME_NONE; priv->buffers = g_queue_new(); priv->surfaces = g_queue_new(); } diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_priv.h b/gst-libs/gst/vaapi/gstvaapidecoder_priv.h index fae29f6..1b4a616 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_priv.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_priv.h @@ -96,8 +96,6 @@ struct _GstVaapiDecoderPrivate { guint fps_d; GQueue *buffers; GQueue *surfaces; - GstClockTime surface_timestamp; - GstClockTime surface_duration; }; gboolean -- 2.7.4