queue2: avoid ping-pong between 0% and 100% buffering messages
[platform/upstream/gstreamer.git] / plugins / elements / gstvalve.h
index a0a09d8..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.
  *
  */
 
@@ -28,7 +27,6 @@
 #include <gst/gst.h>
 
 G_BEGIN_DECLS
-
 /* #define's don't like whitespacey bits */
 #define GST_TYPE_VALVE \
   (gst_valve_get_type())
@@ -45,34 +43,34 @@ G_BEGIN_DECLS
 
 typedef struct _GstValve GstValve;
 typedef struct _GstValveClass GstValveClass;
-typedef struct _GstValvePrivate GstValvePrivate;
 
+/**
+ * GstValve:
+ *
+ * The private valve structure
+ */
 struct _GstValve
 {
+  /*< private >*/
   GstElement parent;
 
-  /* Protected by the object lock */
-  gboolean      drop;
+  /* atomic boolean */
+  volatile gint drop;
 
-  /* Protected by the stream lock*/
-  gboolean      discont;
+  /* Protected by the stream lock */
+  gboolean discont;
+  gboolean need_repush_sticky;
 
-  GstPad        *srcpad;
-  GstPad        *sinkpad;
-
-  /*< private > */
-  gpointer _gst_reserved[GST_PADDING];
+  GstPad *srcpad;
+  GstPad *sinkpad;
 };
 
 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