From 356daf25a523fb9a81f8d50cd7cddf7ed94fa806 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 20 Sep 2010 12:34:06 -0700 Subject: [PATCH] basevideo: Remove unused code --- gst-libs/gst/video/gstbasevideocodec.c | 39 -------------------------- gst-libs/gst/video/gstbasevideocodec.h | 31 -------------------- gst-libs/gst/video/gstbasevideoutils.h | 2 -- 3 files changed, 72 deletions(-) diff --git a/gst-libs/gst/video/gstbasevideocodec.c b/gst-libs/gst/video/gstbasevideocodec.c index a6931c96cb..f72a9b282c 100644 --- a/gst-libs/gst/video/gstbasevideocodec.c +++ b/gst-libs/gst/video/gstbasevideocodec.c @@ -104,9 +104,6 @@ gst_base_video_codec_init (GstBaseVideoCodec * base_video_codec, gst_element_add_pad (GST_ELEMENT (base_video_codec), base_video_codec->srcpad); - base_video_codec->input_adapter = gst_adapter_new (); - base_video_codec->output_adapter = gst_adapter_new (); - } static void @@ -114,12 +111,6 @@ gst_base_video_codec_reset (GstBaseVideoCodec * base_video_codec) { GST_DEBUG ("reset"); - base_video_codec->system_frame_number = 0; - - //gst_segment_init (&base_video_codec->state.segment, GST_FORMAT_TIME); - gst_adapter_clear (base_video_codec->input_adapter); - gst_adapter_clear (base_video_codec->output_adapter); - } static void @@ -130,12 +121,6 @@ gst_base_video_codec_finalize (GObject * object) g_return_if_fail (GST_IS_BASE_VIDEO_CODEC (object)); base_video_codec = GST_BASE_VIDEO_CODEC (object); - if (base_video_codec->input_adapter) { - g_object_unref (base_video_codec->input_adapter); - } - if (base_video_codec->output_adapter) { - g_object_unref (base_video_codec->output_adapter); - } G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -527,25 +512,6 @@ gst_base_video_codec_change_state (GstElement * element, return ret; } -#if 0 -guint64 -gst_base_video_codec_get_timestamp (GstBaseVideoCodec * base_video_codec, - int picture_number) -{ - if (picture_number < 0) { - return base_video_codec->timestamp_offset - - (gint64) gst_util_uint64_scale (-picture_number, - base_video_codec->state.fps_d * GST_SECOND, - base_video_codec->state.fps_n); - } else { - return base_video_codec->timestamp_offset + - gst_util_uint64_scale (picture_number, - base_video_codec->state.fps_d * GST_SECOND, - base_video_codec->state.fps_n); - } -} -#endif - GstVideoFrame * gst_base_video_codec_new_frame (GstBaseVideoCodec * base_video_codec) { @@ -565,11 +531,6 @@ gst_base_video_codec_free_frame (GstVideoFrame * frame) if (frame->sink_buffer) { gst_buffer_unref (frame->sink_buffer); } -#if 0 - if (frame->src_buffer) { - gst_buffer_unref (frame->src_buffer); - } -#endif g_free (frame); } diff --git a/gst-libs/gst/video/gstbasevideocodec.h b/gst-libs/gst/video/gstbasevideocodec.h index b6acf62ee6..9d24c5a8ba 100644 --- a/gst-libs/gst/video/gstbasevideocodec.h +++ b/gst-libs/gst/video/gstbasevideocodec.h @@ -88,34 +88,8 @@ struct _GstBaseVideoCodec /*< private >*/ GstPad *sinkpad; GstPad *srcpad; - GstAdapter *input_adapter; - GstAdapter *output_adapter; -#if 0 - /* FIXME need to move from subclasses */ - GstVideoState state; -#endif - - //int reorder_depth; - - //gboolean have_sync; - //gboolean discont; - //gboolean started; - - //GstVideoFrame *current_frame; - //int distance_from_sync; - - //gboolean sink_clipping; - - //guint64 presentation_frame_number; guint64 system_frame_number; - - //GstCaps *caps; - //gboolean set_output_caps; - - //GstClockTime buffer_timestamp; - - GstClockTime timestamp_offset; }; struct _GstBaseVideoCodecClass @@ -135,11 +109,6 @@ struct _GstBaseVideoCodecClass GType gst_base_video_codec_get_type (void); -#if 0 -guint64 gst_base_video_codec_get_timestamp (GstBaseVideoCodec *codec, - int picture_number); -#endif - GstVideoFrame * gst_base_video_codec_new_frame (GstBaseVideoCodec *base_video_codec); void gst_base_video_codec_free_frame (GstVideoFrame *frame); diff --git a/gst-libs/gst/video/gstbasevideoutils.h b/gst-libs/gst/video/gstbasevideoutils.h index 995cdd3a11..5f71aee510 100644 --- a/gst-libs/gst/video/gstbasevideoutils.h +++ b/gst-libs/gst/video/gstbasevideoutils.h @@ -93,8 +93,6 @@ gboolean gst_base_video_encoded_video_convert (GstVideoState *state, GstClockTime gst_video_state_get_timestamp (const GstVideoState *state, GstSegment *segment, int frame_number); -int gst_adapter_masked_scan_uint32_compat (GstAdapter *adapter, - guint32 pattern, guint32 mask, guint offset, guint n); GstBuffer *gst_adapter_get_buffer (GstAdapter *adapter); G_END_DECLS