commit 9664adfaf5300a039ab4f3a5c640c8dbefd8563a
Author: benjamin gaignard <benjamin.gaignard@stericsson>
Date:   Thu Jan 7 15:09:36 2010 +0100

    add an option to control frame drop message sending

diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index f727ccc..0eb37cb 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -178,6 +178,7 @@ typedef struct
 struct _GstBaseSinkPrivate
 {
   gint qos_enabled;             /* ATOMIC */
+  gboolean frame_drop_enabled;
   gboolean async_enabled;
   GstClockTimeDiff ts_offset;
   GstClockTime render_delay;
@@ -275,6 +276,7 @@ struct _GstBaseSinkPrivate
 #define DEFAULT_TS_OFFSET           0
 #define DEFAULT_BLOCKSIZE           4096
 #define DEFAULT_RENDER_DELAY        0
+#define DEFAULT_FRAME_DROP			FALSE
 
 enum
 {
@@ -288,6 +290,7 @@ enum
   PROP_LAST_BUFFER,
   PROP_BLOCKSIZE,
   PROP_RENDER_DELAY,
+  PROP_FRAME_DROP,
   PROP_LAST
 };
 
@@ -477,6 +480,11 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
           "Additional render delay of the sink in nanoseconds", 0, G_MAXUINT64,
           DEFAULT_RENDER_DELAY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  g_object_class_install_property (gobject_class, PROP_FRAME_DROP,
+      g_param_spec_boolean ("frame-drop", "frame drop",
+          "Generate frame drop message", DEFAULT_FRAME_DROP,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   gstelement_class->change_state =
       GST_DEBUG_FUNCPTR (gst_base_sink_change_state);
   gstelement_class->send_event = GST_DEBUG_FUNCPTR (gst_base_sink_send_event);
@@ -632,6 +640,7 @@ gst_base_sink_init (GstBaseSink * basesink, gpointer g_class)
   priv->ts_offset = DEFAULT_TS_OFFSET;
   priv->render_delay = DEFAULT_RENDER_DELAY;
   priv->blocksize = DEFAULT_BLOCKSIZE;
+  priv->frame_drop_enabled = DEFAULT_FRAME_DROP;
 
   GST_OBJECT_FLAG_SET (basesink, GST_ELEMENT_IS_SINK);
 }
@@ -787,6 +796,43 @@ gst_base_sink_is_qos_enabled (GstBaseSink * sink)
 }
 
 /**
+ * gst_base_sink_set_frame_drop_enabled:
+ * @sink: the sink
+ * @enabled: the new frame drop value.
+ *
+ * Configures @sink to send frame drop message
+ *
+ */
+void
+gst_base_sink_set_frame_drop_enabled (GstBaseSink * sink, gboolean enabled)
+{
+  g_return_if_fail (GST_IS_BASE_SINK (sink));
+
+  g_atomic_int_set (&sink->priv->frame_drop_enabled, enabled);
+}
+
+/**
+ * gst_base_sink_is_frame_drop_enabled:
+ * @sink: the sink
+ *
+ * Checks if @sink is currently configured to send frame drop message
+ *
+ * Returns: TRUE if the sink is configured to send frame drop message
+ *
+ */
+gboolean
+gst_base_sink_is_frame_drop_enabled (GstBaseSink * sink)
+{
+  gboolean res;
+
+  g_return_val_if_fail (GST_IS_BASE_SINK (sink), FALSE);
+
+  res = g_atomic_int_get (&sink->priv->frame_drop_enabled);
+
+  return res;
+}
+
+/**
  * gst_base_sink_set_async_enabled:
  * @sink: the sink
  * @enabled: the new async value.
@@ -1203,6 +1249,9 @@ gst_base_sink_set_property (GObject * object, guint prop_id,
     case PROP_RENDER_DELAY:
       gst_base_sink_set_render_delay (sink, g_value_get_uint64 (value));
       break;
+    case PROP_FRAME_DROP:
+      gst_base_sink_set_frame_drop_enabled (sink, g_value_get_boolean (value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1245,6 +1294,9 @@ gst_base_sink_get_property (GObject * object, guint prop_id, GValue * value,
     case PROP_RENDER_DELAY:
       g_value_set_uint64 (value, gst_base_sink_get_render_delay (sink));
       break;
+    case PROP_FRAME_DROP:
+      g_value_set_boolean (value, gst_base_sink_is_frame_drop_enabled (sink));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -2807,9 +2859,11 @@ dropped:
   {
     priv->dropped++;
     GST_DEBUG_OBJECT (basesink, "buffer late, dropping");
-	gst_element_post_message (GST_ELEMENT (basesink),
-		gst_message_new_frame_drop (GST_OBJECT (basesink),
-			GST_BUFFER_TIMESTAMP(GST_BUFFER_CAST (obj))));
+    if (priv->frame_drop_enabled) {
+      gst_element_post_message (GST_ELEMENT (basesink),
+          gst_message_new_frame_drop (GST_OBJECT (basesink),
+              GST_BUFFER_TIMESTAMP (GST_BUFFER_CAST (obj))));
+    }
     goto done;
   }
 flushing:
diff --git a/libs/gst/base/gstbasesink.h b/libs/gst/base/gstbasesink.h
index f503753..8edfd85 100644
--- a/libs/gst/base/gstbasesink.h
+++ b/libs/gst/base/gstbasesink.h
@@ -26,8 +26,6 @@
 #include <gst/gst.h>
 
 G_BEGIN_DECLS
-
-
 #define GST_TYPE_BASE_SINK              (gst_base_sink_get_type())
 #define GST_BASE_SINK(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_SINK,GstBaseSink))
 #define GST_BASE_SINK_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_SINK,GstBaseSinkClass))
@@ -35,7 +33,6 @@ G_BEGIN_DECLS
 #define GST_IS_BASE_SINK(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_SINK))
 #define GST_IS_BASE_SINK_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_SINK))
 #define GST_BASE_SINK_CAST(obj)         ((GstBaseSink *) (obj))
-
 /**
  * GST_BASE_SINK_PAD:
  * @obj: base sink instance
@@ -43,7 +40,6 @@ G_BEGIN_DECLS
  * Gives the pointer to the #GstPad object of the element.
  */
 #define GST_BASE_SINK_PAD(obj)          (GST_BASE_SINK_CAST (obj)->sinkpad)
-
 typedef struct _GstBaseSink GstBaseSink;
 typedef struct _GstBaseSinkClass GstBaseSinkClass;
 typedef struct _GstBaseSinkPrivate GstBaseSinkPrivate;
@@ -54,48 +50,51 @@ typedef struct _GstBaseSinkPrivate GstBaseSinkPrivate;
  *
  * The opaque #GstBaseSink data structure.
  */
-struct _GstBaseSink {
-  GstElement     element;
-
-  /*< protected >*/
-  GstPad        *sinkpad;
-  GstActivateMode       pad_mode;
-
-  /*< protected >*/ /* with LOCK */
-  guint64        offset;
-  gboolean       can_activate_pull;
-  gboolean       can_activate_push;
-
-  /*< protected >*/ /* with PREROLL_LOCK */
-  GQueue        *preroll_queue;
-  gint           preroll_queue_max_len;
-  gint           preroll_queued;
-  gint           buffers_queued;
-  gint           events_queued;
-  gboolean       eos;
-  gboolean       eos_queued;
-  gboolean       need_preroll;
-  gboolean       have_preroll;
-  gboolean       playing_async;
-
-  /*< protected >*/ /* with STREAM_LOCK */
-  gboolean       have_newsegment;
-  GstSegment     segment;
-
-  /*< private >*/ /* with LOCK */
-  GstClockID     clock_id;
-  GstClockTime   end_time;
-  gboolean       sync;
-  gboolean       flushing;
-
-  /*< private >*/
-  union {
-    struct {
+struct _GstBaseSink
+{
+  GstElement element;
+
+  /*< protected > */
+  GstPad *sinkpad;
+  GstActivateMode pad_mode;
+
+  /*< protected > *//* with LOCK */
+  guint64 offset;
+  gboolean can_activate_pull;
+  gboolean can_activate_push;
+
+  /*< protected > *//* with PREROLL_LOCK */
+  GQueue *preroll_queue;
+  gint preroll_queue_max_len;
+  gint preroll_queued;
+  gint buffers_queued;
+  gint events_queued;
+  gboolean eos;
+  gboolean eos_queued;
+  gboolean need_preroll;
+  gboolean have_preroll;
+  gboolean playing_async;
+
+  /*< protected > *//* with STREAM_LOCK */
+  gboolean have_newsegment;
+  GstSegment segment;
+
+  /*< private > *//* with LOCK */
+  GstClockID clock_id;
+  GstClockTime end_time;
+  gboolean sync;
+  gboolean flushing;
+
+  /*< private > */
+  union
+  {
+    struct
+    {
       /* segment used for clipping incoming buffers */
-      GstSegment    *clip_segment;
+      GstSegment *clip_segment;
       /* max amount of time a buffer can be late, -1 no limit. */
-      gint64         max_lateness;
-      gboolean       running;
+      gint64 max_lateness;
+      gboolean running;
     } ABI;
     gpointer _gst_reserved[GST_PADDING_LARGE - 1];
   } abidata;
@@ -139,104 +138,112 @@ struct _GstBaseSink {
  * needed. At the minimum, the @render method should be overridden to
  * output/present buffers.
  */
-struct _GstBaseSinkClass {
+struct _GstBaseSinkClass
+{
   GstElementClass parent_class;
 
   /* get caps from subclass */
-  GstCaps*      (*get_caps)     (GstBaseSink *sink);
+  GstCaps *(*get_caps) (GstBaseSink * sink);
   /* notify subclass of new caps */
-  gboolean      (*set_caps)     (GstBaseSink *sink, GstCaps *caps);
+    gboolean (*set_caps) (GstBaseSink * sink, GstCaps * caps);
 
   /* allocate a new buffer with given caps */
-  GstFlowReturn (*buffer_alloc) (GstBaseSink *sink, guint64 offset, guint size,
-                                 GstCaps *caps, GstBuffer **buf);
+    GstFlowReturn (*buffer_alloc) (GstBaseSink * sink, guint64 offset,
+      guint size, GstCaps * caps, GstBuffer ** buf);
 
   /* get the start and end times for syncing on this buffer */
-  void          (*get_times)    (GstBaseSink *sink, GstBuffer *buffer,
-                                 GstClockTime *start, GstClockTime *end);
+  void (*get_times) (GstBaseSink * sink, GstBuffer * buffer,
+      GstClockTime * start, GstClockTime * end);
 
   /* start and stop processing, ideal for opening/closing the resource */
-  gboolean      (*start)        (GstBaseSink *sink);
-  gboolean      (*stop)         (GstBaseSink *sink);
+    gboolean (*start) (GstBaseSink * sink);
+    gboolean (*stop) (GstBaseSink * sink);
 
   /* unlock any pending access to the resource. subclasses should unlock
    * any function ASAP. */
-  gboolean      (*unlock)       (GstBaseSink *sink);
+    gboolean (*unlock) (GstBaseSink * sink);
 
   /* notify subclass of event, preroll buffer or real buffer */
-  gboolean      (*event)        (GstBaseSink *sink, GstEvent *event);
-  GstFlowReturn (*preroll)      (GstBaseSink *sink, GstBuffer *buffer);
-  GstFlowReturn (*render)       (GstBaseSink *sink, GstBuffer *buffer);
+    gboolean (*event) (GstBaseSink * sink, GstEvent * event);
+    GstFlowReturn (*preroll) (GstBaseSink * sink, GstBuffer * buffer);
+    GstFlowReturn (*render) (GstBaseSink * sink, GstBuffer * buffer);
 
   /* ABI additions */
 
-  /* when an ASYNC state change to PLAYING happens */ /* with LOCK */
-  GstStateChangeReturn (*async_play)   (GstBaseSink *sink);
+  /* when an ASYNC state change to PLAYING happens *//* with LOCK */
+    GstStateChangeReturn (*async_play) (GstBaseSink * sink);
 
   /* start or stop a pulling thread */
-  gboolean      (*activate_pull)(GstBaseSink *sink, gboolean active);
+    gboolean (*activate_pull) (GstBaseSink * sink, gboolean active);
 
   /* fixate sink caps during pull-mode negotiation */
-  void          (*fixate)       (GstBaseSink *sink, GstCaps *caps);
+  void (*fixate) (GstBaseSink * sink, GstCaps * caps);
 
   /* Clear a previously indicated unlock request not that unlocking is
    * complete. Sub-classes should clear any command queue or indicator they
    * set during unlock */
-  gboolean      (*unlock_stop)  (GstBaseSink *sink);
+    gboolean (*unlock_stop) (GstBaseSink * sink);
 
   /* Render a BufferList */
-  GstFlowReturn (*render_list)  (GstBaseSink *sink, GstBufferList *buffer_list);
+    GstFlowReturn (*render_list) (GstBaseSink * sink,
+      GstBufferList * buffer_list);
 
-  /*< private >*/
-  gpointer       _gst_reserved[GST_PADDING_LARGE-5];
+  /*< private > */
+  gpointer _gst_reserved[GST_PADDING_LARGE - 5];
 };
 
-GType gst_base_sink_get_type(void);
+GType gst_base_sink_get_type (void);
 
-GstFlowReturn   gst_base_sink_do_preroll        (GstBaseSink *sink, GstMiniObject *obj);
-GstFlowReturn   gst_base_sink_wait_preroll      (GstBaseSink *sink);
+GstFlowReturn gst_base_sink_do_preroll (GstBaseSink * sink,
+    GstMiniObject * obj);
+GstFlowReturn gst_base_sink_wait_preroll (GstBaseSink * sink);
 
 /* synchronizing against the clock */
-void            gst_base_sink_set_sync          (GstBaseSink *sink, gboolean sync);
-gboolean        gst_base_sink_get_sync          (GstBaseSink *sink);
+void gst_base_sink_set_sync (GstBaseSink * sink, gboolean sync);
+gboolean gst_base_sink_get_sync (GstBaseSink * sink);
 
 /* dropping late buffers */
-void            gst_base_sink_set_max_lateness  (GstBaseSink *sink, gint64 max_lateness);
-gint64          gst_base_sink_get_max_lateness  (GstBaseSink *sink);
+void gst_base_sink_set_max_lateness (GstBaseSink * sink, gint64 max_lateness);
+gint64 gst_base_sink_get_max_lateness (GstBaseSink * sink);
 
 /* performing QoS */
-void            gst_base_sink_set_qos_enabled   (GstBaseSink *sink, gboolean enabled);
-gboolean        gst_base_sink_is_qos_enabled    (GstBaseSink *sink);
+void gst_base_sink_set_qos_enabled (GstBaseSink * sink, gboolean enabled);
+gboolean gst_base_sink_is_qos_enabled (GstBaseSink * sink);
+
+/* send frame drop message */
+void gst_base_sink_set_frame_drop_enabled (GstBaseSink * sink,
+    gboolean enabled);
+gboolean gst_base_sink_is_frame_drop_enabled (GstBaseSink * sink);
 
 /* doing async state changes */
-void            gst_base_sink_set_async_enabled (GstBaseSink *sink, gboolean enabled);
-gboolean        gst_base_sink_is_async_enabled  (GstBaseSink *sink);
+void gst_base_sink_set_async_enabled (GstBaseSink * sink, gboolean enabled);
+gboolean gst_base_sink_is_async_enabled (GstBaseSink * sink);
 
 /* tuning synchronisation */
-void            gst_base_sink_set_ts_offset     (GstBaseSink *sink, GstClockTimeDiff offset);
-GstClockTimeDiff gst_base_sink_get_ts_offset    (GstBaseSink *sink);
+void gst_base_sink_set_ts_offset (GstBaseSink * sink, GstClockTimeDiff offset);
+GstClockTimeDiff gst_base_sink_get_ts_offset (GstBaseSink * sink);
 
 /* last buffer */
-GstBuffer *     gst_base_sink_get_last_buffer   (GstBaseSink *sink);
+GstBuffer *gst_base_sink_get_last_buffer (GstBaseSink * sink);
 
 /* latency */
-gboolean        gst_base_sink_query_latency     (GstBaseSink *sink, gboolean *live, gboolean *upstream_live,
-                                                 GstClockTime *min_latency, GstClockTime *max_latency);
-GstClockTime    gst_base_sink_get_latency       (GstBaseSink *sink);
+gboolean gst_base_sink_query_latency (GstBaseSink * sink, gboolean * live,
+    gboolean * upstream_live, GstClockTime * min_latency,
+    GstClockTime * max_latency);
+GstClockTime gst_base_sink_get_latency (GstBaseSink * sink);
 
 /* render delay */
-void            gst_base_sink_set_render_delay  (GstBaseSink *sink, GstClockTime delay);
-GstClockTime    gst_base_sink_get_render_delay  (GstBaseSink *sink);
+void gst_base_sink_set_render_delay (GstBaseSink * sink, GstClockTime delay);
+GstClockTime gst_base_sink_get_render_delay (GstBaseSink * sink);
 
 /* blocksize */
-void            gst_base_sink_set_blocksize     (GstBaseSink *sink, guint blocksize);
-guint           gst_base_sink_get_blocksize     (GstBaseSink *sink);
+void gst_base_sink_set_blocksize (GstBaseSink * sink, guint blocksize);
+guint gst_base_sink_get_blocksize (GstBaseSink * sink);
 
-GstClockReturn  gst_base_sink_wait_clock        (GstBaseSink *sink, GstClockTime time,
-                                                 GstClockTimeDiff * jitter);
-GstFlowReturn   gst_base_sink_wait_eos          (GstBaseSink *sink, GstClockTime time,
-                                                 GstClockTimeDiff *jitter);
+GstClockReturn gst_base_sink_wait_clock (GstBaseSink * sink, GstClockTime time,
+    GstClockTimeDiff * jitter);
+GstFlowReturn gst_base_sink_wait_eos (GstBaseSink * sink, GstClockTime time,
+    GstClockTimeDiff * jitter);
 
 G_END_DECLS
-
 #endif /* __GST_BASE_SINK_H__ */
diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c
index 0b63ecd..74d0802 100644
--- a/libs/gst/base/gstbasetransform.c
+++ b/libs/gst/base/gstbasetransform.c
@@ -220,12 +220,14 @@ enum
   LAST_SIGNAL
 };
 
-#define DEFAULT_PROP_QOS	FALSE
+#define DEFAULT_PROP_QOS		FALSE
+#define DEFAULT_PROP_FRAME_DROP	FALSE
 
 enum
 {
   PROP_0,
-  PROP_QOS
+  PROP_QOS,
+  PROP_FRAME_DROP
 };
 
 #define GST_BASE_TRANSFORM_GET_PRIVATE(obj)  \
@@ -235,6 +237,7 @@ struct _GstBaseTransformPrivate
 {
   /* QoS *//* with LOCK */
   gboolean qos_enabled;
+  gboolean frame_drop_enabled;
   gdouble proportion;
   GstClockTime earliest_time;
   /* previous buffer had a discont */
@@ -361,6 +364,12 @@ gst_base_transform_class_init (GstBaseTransformClass * klass)
       g_param_spec_boolean ("qos", "QoS", "Handle Quality-of-Service events",
           DEFAULT_PROP_QOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  g_object_class_install_property (gobject_class, PROP_FRAME_DROP,
+      g_param_spec_boolean ("frame-drop", "Frame drop",
+          "Generate frame drop message", DEFAULT_PROP_FRAME_DROP,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+
   gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_transform_finalize);
 
   klass->passthrough_on_same_caps = FALSE;
@@ -419,6 +428,7 @@ gst_base_transform_init (GstBaseTransform * trans,
   trans->transform_lock = g_mutex_new ();
   trans->pending_configure = FALSE;
   trans->priv->qos_enabled = DEFAULT_PROP_QOS;
+  trans->priv->frame_drop_enabled = DEFAULT_PROP_FRAME_DROP;
   trans->cache_caps1 = NULL;
   trans->cache_caps2 = NULL;
   trans->priv->pad_mode = GST_ACTIVATE_NONE;
@@ -2082,9 +2092,11 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
     } else
       gst_buffer_unref (outbuf);
   } else {
-	gst_element_post_message (GST_ELEMENT (trans),
-		gst_message_new_frame_drop (GST_OBJECT (trans),
-			GST_BUFFER_TIMESTAMP(buffer)));
+    if (trans->priv->frame_drop_enabled) {
+      gst_element_post_message (GST_ELEMENT (trans),
+          gst_message_new_frame_drop (GST_OBJECT (trans),
+              GST_BUFFER_TIMESTAMP (buffer)));
+    }
   }
 
   /* convert internal flow to OK and mark discont for the next buffer. */
@@ -2108,6 +2120,10 @@ gst_base_transform_set_property (GObject * object, guint prop_id,
     case PROP_QOS:
       gst_base_transform_set_qos_enabled (trans, g_value_get_boolean (value));
       break;
+    case PROP_FRAME_DROP:
+      gst_base_transform_set_frame_drop_enabled (trans,
+          g_value_get_boolean (value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -2126,6 +2142,10 @@ gst_base_transform_get_property (GObject * object, guint prop_id,
     case PROP_QOS:
       g_value_set_boolean (value, gst_base_transform_is_qos_enabled (trans));
       break;
+    case PROP_FRAME_DROP:
+      g_value_set_boolean (value,
+          gst_base_transform_is_frame_drop_enabled (trans));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -2406,27 +2426,61 @@ gst_base_transform_set_qos_enabled (GstBaseTransform * trans, gboolean enabled)
   GST_OBJECT_UNLOCK (trans);
 }
 
+gboolean
+gst_base_transform_is_qos_enabled (GstBaseTransform * trans)
+{
+  gboolean result;
+
+  g_return_val_if_fail (GST_IS_BASE_TRANSFORM (trans), FALSE);
+
+  GST_OBJECT_LOCK (trans);
+  result = trans->priv->qos_enabled;
+  GST_OBJECT_UNLOCK (trans);
+
+  return result;
+}
+
+/**
+ * gst_base_transform_set_frame_drop_enabled:
+ * @trans: a #GstBaseTransform
+ * @enabled: new state
+ *
+ * Enable or disable frame drop message in the transform.
+ *
+ * MT safe.
+ *
+ */
+void
+gst_base_transform_set_frame_drop_enabled (GstBaseTransform * trans,
+    gboolean enabled)
+{
+  g_return_if_fail (GST_IS_BASE_TRANSFORM (trans));
+
+  GST_OBJECT_LOCK (trans);
+  trans->priv->frame_drop_enabled = enabled;
+  GST_OBJECT_UNLOCK (trans);
+}
+
 /**
- * gst_base_transform_is_qos_enabled:
+ * gst_base_transform_is_frame_drop_enabled:
  * @trans: a #GstBaseTransform
  *
- * Queries if the transform will handle QoS.
+ * Queries if the transform will send frame drop message.
  *
- * Returns: TRUE if QoS is enabled.
+ * Returns: TRUE if frame drop message is enabled.
  *
  * MT safe.
  *
- * Since: 0.10.5
  */
 gboolean
-gst_base_transform_is_qos_enabled (GstBaseTransform * trans)
+gst_base_transform_is_frame_drop_enabled (GstBaseTransform * trans)
 {
   gboolean result;
 
   g_return_val_if_fail (GST_IS_BASE_TRANSFORM (trans), FALSE);
 
   GST_OBJECT_LOCK (trans);
-  result = trans->priv->qos_enabled;
+  result = trans->priv->frame_drop_enabled;
   GST_OBJECT_UNLOCK (trans);
 
   return result;
diff --git a/libs/gst/base/gstbasetransform.h b/libs/gst/base/gstbasetransform.h
index a5c201b..c8c5209 100644
--- a/libs/gst/base/gstbasetransform.h
+++ b/libs/gst/base/gstbasetransform.h
@@ -24,7 +24,6 @@
 #include <gst/gst.h>
 
 G_BEGIN_DECLS
-
 #define GST_TYPE_BASE_TRANSFORM		   (gst_base_transform_get_type())
 #define GST_BASE_TRANSFORM(obj)		   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_TRANSFORM,GstBaseTransform))
 #define GST_BASE_TRANSFORM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_TRANSFORM,GstBaseTransformClass))
@@ -33,7 +32,6 @@ G_BEGIN_DECLS
 #define GST_IS_BASE_TRANSFORM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_TRANSFORM))
 /* since 0.10.4 */
 #define GST_BASE_TRANSFORM_CAST(obj)	((GstBaseTransform *)(obj))
-
 /**
  * GST_BASE_TRANSFORM_SINK_NAME:
  *
@@ -46,7 +44,6 @@ G_BEGIN_DECLS
  * The name of the templates for the source pad.
  */
 #define GST_BASE_TRANSFORM_SRC_NAME	"src"
-
 /**
  * GST_BASE_TRANSFORM_SRC_PAD:
  * @obj: base transform instance
@@ -56,7 +53,6 @@ G_BEGIN_DECLS
  * Since: 0.10.4
  */
 #define GST_BASE_TRANSFORM_SRC_PAD(obj)		(GST_BASE_TRANSFORM_CAST (obj)->srcpad)
-
 /**
  * GST_BASE_TRANSFORM_SINK_PAD:
  * @obj: base transform instance
@@ -66,7 +62,6 @@ G_BEGIN_DECLS
  * Since: 0.10.4
  */
 #define GST_BASE_TRANSFORM_SINK_PAD(obj)	(GST_BASE_TRANSFORM_CAST (obj)->sinkpad)
-
 /**
  * GST_BASE_TRANSFORM_FLOW_DROPPED:
  *
@@ -76,7 +71,6 @@ G_BEGIN_DECLS
  * Since: 0.10.13
  */
 #define GST_BASE_TRANSFORM_FLOW_DROPPED   GST_FLOW_CUSTOM_SUCCESS
-
 /**
  * GST_BASE_TRANSFORM_LOCK:
  * @obj: base transform instance
@@ -86,7 +80,6 @@ G_BEGIN_DECLS
  * Since: 0.10.13
  */
 #define GST_BASE_TRANSFORM_LOCK(obj)   g_mutex_lock (GST_BASE_TRANSFORM_CAST (obj)->transform_lock)
-
 /**
  * GST_BASE_TRANSFORM_UNLOCK:
  * @obj: base transform instance
@@ -96,7 +89,6 @@ G_BEGIN_DECLS
  * Since: 0.10.13
  */
 #define GST_BASE_TRANSFORM_UNLOCK(obj) g_mutex_unlock (GST_BASE_TRANSFORM_CAST (obj)->transform_lock)
-
 typedef struct _GstBaseTransform GstBaseTransform;
 typedef struct _GstBaseTransformClass GstBaseTransformClass;
 typedef struct _GstBaseTransformPrivate GstBaseTransformPrivate;
@@ -107,39 +99,40 @@ typedef struct _GstBaseTransformPrivate GstBaseTransformPrivate;
  *
  * The opaque #GstBaseTransform data structure.
  */
-struct _GstBaseTransform {
-  GstElement	 element;
+struct _GstBaseTransform
+{
+  GstElement element;
 
-  /*< protected >*/
+  /*< protected > */
   /* source and sink pads */
-  GstPad	*sinkpad;
-  GstPad	*srcpad;
+  GstPad *sinkpad;
+  GstPad *srcpad;
 
   /* Set by sub-class */
-  gboolean	 passthrough;
-  gboolean	 always_in_place;
+  gboolean passthrough;
+  gboolean always_in_place;
 
-  GstCaps	*cache_caps1;
-  guint		 cache_caps1_size;
-  GstCaps	*cache_caps2;
-  guint		 cache_caps2_size;
-  gboolean	 have_same_caps;
+  GstCaps *cache_caps1;
+  guint cache_caps1_size;
+  GstCaps *cache_caps2;
+  guint cache_caps2_size;
+  gboolean have_same_caps;
 
-  gboolean	 delay_configure;
-  gboolean	 pending_configure;
-  gboolean	 negotiated;
+  gboolean delay_configure;
+  gboolean pending_configure;
+  gboolean negotiated;
 
-  gboolean       have_newsegment;
+  gboolean have_newsegment;
 
   /* MT-protected (with STREAM_LOCK) */
-  GstSegment     segment;
+  GstSegment segment;
 
-  GMutex	*transform_lock;
+  GMutex *transform_lock;
 
-  /*< private >*/
+  /*< private > */
   GstBaseTransformPrivate *priv;
 
-  gpointer       _gst_reserved[GST_PADDING_LARGE - 1];
+  gpointer _gst_reserved[GST_PADDING_LARGE - 1];
 };
 
 /**
@@ -192,79 +185,79 @@ struct _GstBaseTransform {
  * If the element can overwrite the input data with the results (data is of the
  * same type and quantity) it should provide @transform_ip.
  */
-struct _GstBaseTransformClass {
+struct _GstBaseTransformClass
+{
   GstElementClass parent_class;
 
-  /*< public >*/
+  /*< public > */
   /* virtual methods for subclasses */
 
-  GstCaps*	(*transform_caps) (GstBaseTransform *trans,
-                                   GstPadDirection direction,
-                                   GstCaps *caps);
+  GstCaps *(*transform_caps) (GstBaseTransform * trans,
+      GstPadDirection direction, GstCaps * caps);
 
-  void		(*fixate_caps)	  (GstBaseTransform *trans,
-                                   GstPadDirection direction, GstCaps *caps,
-                                   GstCaps *othercaps);
+  void (*fixate_caps) (GstBaseTransform * trans,
+      GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
 
-  gboolean      (*transform_size) (GstBaseTransform *trans,
-                                   GstPadDirection direction,
-                                   GstCaps *caps, guint size,
-                                   GstCaps *othercaps, guint *othersize);
+    gboolean (*transform_size) (GstBaseTransform * trans,
+      GstPadDirection direction,
+      GstCaps * caps, guint size, GstCaps * othercaps, guint * othersize);
 
-  gboolean      (*get_unit_size)  (GstBaseTransform *trans, GstCaps *caps,
-                                   guint *size);
+    gboolean (*get_unit_size) (GstBaseTransform * trans, GstCaps * caps,
+      guint * size);
 
-  gboolean      (*set_caps)     (GstBaseTransform *trans, GstCaps *incaps,
-                                 GstCaps *outcaps);
+    gboolean (*set_caps) (GstBaseTransform * trans, GstCaps * incaps,
+      GstCaps * outcaps);
 
-  gboolean      (*start)        (GstBaseTransform *trans);
-  gboolean      (*stop)         (GstBaseTransform *trans);
+    gboolean (*start) (GstBaseTransform * trans);
+    gboolean (*stop) (GstBaseTransform * trans);
 
-  gboolean      (*event)        (GstBaseTransform *trans, GstEvent *event);
+    gboolean (*event) (GstBaseTransform * trans, GstEvent * event);
 
-  GstFlowReturn (*transform)    (GstBaseTransform *trans, GstBuffer *inbuf,
-                                 GstBuffer *outbuf);
-  GstFlowReturn (*transform_ip) (GstBaseTransform *trans, GstBuffer *buf);
+    GstFlowReturn (*transform) (GstBaseTransform * trans, GstBuffer * inbuf,
+      GstBuffer * outbuf);
+    GstFlowReturn (*transform_ip) (GstBaseTransform * trans, GstBuffer * buf);
 
   /* FIXME: When adjusting the padding, move these to nicer places in the class */
-  gboolean       passthrough_on_same_caps;
+  gboolean passthrough_on_same_caps;
 
-  GstFlowReturn (*prepare_output_buffer) (GstBaseTransform * trans,
-     GstBuffer *input, gint size, GstCaps *caps, GstBuffer **buf);
+    GstFlowReturn (*prepare_output_buffer) (GstBaseTransform * trans,
+      GstBuffer * input, gint size, GstCaps * caps, GstBuffer ** buf);
 
   /* src event */
-  gboolean      (*src_event)      (GstBaseTransform *trans, GstEvent *event);
+    gboolean (*src_event) (GstBaseTransform * trans, GstEvent * event);
 
-  void          (*before_transform)  (GstBaseTransform *trans, GstBuffer *buffer);
+  void (*before_transform) (GstBaseTransform * trans, GstBuffer * buffer);
 
-  /*< private >*/
-  gpointer       _gst_reserved[GST_PADDING_LARGE - 2];
+  /*< private > */
+  gpointer _gst_reserved[GST_PADDING_LARGE - 2];
 };
 
-GType           gst_base_transform_get_type         (void);
+GType gst_base_transform_get_type (void);
 
-void		gst_base_transform_set_passthrough  (GstBaseTransform *trans,
-	                                             gboolean passthrough);
-gboolean	gst_base_transform_is_passthrough   (GstBaseTransform *trans);
+void gst_base_transform_set_passthrough (GstBaseTransform * trans,
+    gboolean passthrough);
+gboolean gst_base_transform_is_passthrough (GstBaseTransform * trans);
 
-void		gst_base_transform_set_in_place     (GstBaseTransform *trans,
-	                                             gboolean in_place);
-gboolean	gst_base_transform_is_in_place      (GstBaseTransform *trans);
+void gst_base_transform_set_in_place (GstBaseTransform * trans,
+    gboolean in_place);
+gboolean gst_base_transform_is_in_place (GstBaseTransform * trans);
 
-void		gst_base_transform_update_qos       (GstBaseTransform *trans,
-						     gdouble proportion,
-						     GstClockTimeDiff diff,
-						     GstClockTime timestamp);
-void		gst_base_transform_set_qos_enabled  (GstBaseTransform *trans,
-		                                     gboolean enabled);
-gboolean	gst_base_transform_is_qos_enabled   (GstBaseTransform *trans);
+void gst_base_transform_update_qos (GstBaseTransform * trans,
+    gdouble proportion, GstClockTimeDiff diff, GstClockTime timestamp);
+void gst_base_transform_set_qos_enabled (GstBaseTransform * trans,
+    gboolean enabled);
+gboolean gst_base_transform_is_qos_enabled (GstBaseTransform * trans);
 
-void            gst_base_transform_set_gap_aware    (GstBaseTransform *trans,
-                                                     gboolean gap_aware);
+void gst_base_transform_set_frame_drop_enabled (GstBaseTransform * trans,
+    gboolean enabled);
+gboolean gst_base_transform_is_frame_drop_enabled (GstBaseTransform * trans);
 
-void		gst_base_transform_suggest          (GstBaseTransform *trans,
-	                                             GstCaps *caps, guint size);
-void		gst_base_transform_reconfigure      (GstBaseTransform *trans);
-G_END_DECLS
 
+void gst_base_transform_set_gap_aware (GstBaseTransform * trans,
+    gboolean gap_aware);
+
+void gst_base_transform_suggest (GstBaseTransform * trans,
+    GstCaps * caps, guint size);
+void gst_base_transform_reconfigure (GstBaseTransform * trans);
+G_END_DECLS
 #endif /* __GST_BASE_TRANSFORM_H__ */
