queue2: avoid ping-pong between 0% and 100% buffering messages
[platform/upstream/gstreamer.git] / plugins / elements / gstvalve.h
index cc7cd38..eb3c29e 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * Farsight Voice+Video library
+/* GStreamer valve element
  *
  *  Copyright 2007 Collabora Ltd, 
  *  Copyright 2007 Nokia Corporation
@@ -17,8 +16,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  *
  */
 
@@ -41,9 +40,9 @@ G_BEGIN_DECLS
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VALVE))
 #define GST_IS_VALVE_CLASS(obj) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VALVE))
+
 typedef struct _GstValve GstValve;
 typedef struct _GstValveClass GstValveClass;
-typedef struct _GstValvePrivate GstValvePrivate;
 
 /**
  * GstValve:
@@ -55,28 +54,24 @@ struct _GstValve
   /*< private >*/
   GstElement parent;
 
-  /* Protected by the object lock */
-  gboolean drop;
+  /* atomic boolean */
+  volatile gint drop;
 
   /* Protected by the stream lock */
   gboolean discont;
+  gboolean need_repush_sticky;
 
   GstPad *srcpad;
   GstPad *sinkpad;
-
-  /*< private > */
-  gpointer _gst_reserved[GST_PADDING];
 };
 
 struct _GstValveClass
 {
   GstElementClass parent_class;
-
-  /*< private > */
-  gpointer _gst_reserved[GST_PADDING];
 };
 
-GType gst_valve_get_type (void);
+G_GNUC_INTERNAL GType gst_valve_get_type (void);
 
 G_END_DECLS
+
 #endif /* __GST_VALVE_H__ */