baseparse: cleanup struct and remove unused member
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 16 Sep 2010 09:51:20 +0000 (11:51 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 8 Apr 2011 14:44:50 +0000 (15:44 +0100)
gst/audioparsers/gstbaseparse.c
gst/audioparsers/gstbaseparse.h

index 3bea83b..91192ce 100644 (file)
@@ -802,7 +802,6 @@ gst_base_parse_convert (GstBaseParse * parse,
     if (dest_format == GST_FORMAT_TIME) {
       /* BYTES -> TIME conversion */
       GST_DEBUG_OBJECT (parse, "converting bytes -> time");
-
       *dest_value = gst_util_uint64_scale (src_value, duration, bytes);
       *dest_value *= GST_MSECOND;
       GST_DEBUG_OBJECT (parse, "conversion result: %" G_GINT64_FORMAT " ms",
@@ -810,8 +809,8 @@ gst_base_parse_convert (GstBaseParse * parse,
       ret = TRUE;
     }
   } else if (src_format == GST_FORMAT_TIME) {
-    GST_DEBUG_OBJECT (parse, "converting time -> bytes");
     if (dest_format == GST_FORMAT_BYTES) {
+      GST_DEBUG_OBJECT (parse, "converting time -> bytes");
       *dest_value = gst_util_uint64_scale (src_value / GST_MSECOND, bytes,
           duration);
       GST_DEBUG_OBJECT (parse,
@@ -2267,6 +2266,5 @@ gst_base_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
   if (klass->set_sink_caps)
     res = klass->set_sink_caps (parse, caps);
 
-  parse->negotiated = res;
   return res && gst_pad_set_caps (pad, caps);
 }
index 9c48155..733fa85 100644 (file)
@@ -120,16 +120,16 @@ typedef struct _GstBaseParsePrivate GstBaseParsePrivate;
  * The opaque #GstBaseParse data structure.
  */
 struct _GstBaseParse {
-  GstElement    element;
-  GstAdapter   *adapter;
+  GstElement     element;
+  GstAdapter    *adapter;
 
   /*< protected >*/
   /* source and sink pads */
-  GstPad       *sinkpad;
-  GstPad       *srcpad;
+  GstPad         *sinkpad;
+  GstPad         *srcpad;
 
   /* MT-protected (with STREAM_LOCK) */
-  GstSegment     segment;
+  GstSegment      segment;
 
   /* Newsegment event to be sent after SEEK */
   GstEvent       *pending_segment;
@@ -137,10 +137,7 @@ struct _GstBaseParse {
   /* Segment event that closes the running segment prior to SEEK */
   GstEvent       *close_segment;
 
-  /* Caps nego done already? */
-  gboolean   negotiated;
-
-  GMutex       *parse_lock;
+  GMutex         *parse_lock;
 
   /*< private >*/
   gpointer       _gst_reserved[GST_PADDING_LARGE];