pad: Put all of the probe types in the enum so they work with bindings
authorOlivier Crête <olivier.crete@collabora.com>
Fri, 23 Nov 2012 09:58:25 +0000 (10:58 +0100)
committerOlivier Crête <olivier.crete@collabora.com>
Fri, 23 Nov 2012 12:30:15 +0000 (13:30 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=688804

gst/gstpad.h

index f631602bd73c04834e94ae9de5e2bbca4f398b10..bc95b508d3d61211822512b69ad0522bcd6bdc86 100644 (file)
@@ -469,24 +469,30 @@ typedef enum
   GST_PAD_PROBE_TYPE_QUERY_UPSTREAM   = (1 << 10),
   /* flags to select scheduling mode */
   GST_PAD_PROBE_TYPE_PUSH             = (1 << 12),
-  GST_PAD_PROBE_TYPE_PULL             = (1 << 13)
+  GST_PAD_PROBE_TYPE_PULL             = (1 << 13),
+
+  /* flag combinations */
+  GST_PAD_PROBE_TYPE_BLOCKING         = (GST_PAD_PROBE_TYPE_IDLE |
+      GST_PAD_PROBE_TYPE_BLOCK),
+  GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM = (GST_PAD_PROBE_TYPE_BUFFER |
+      GST_PAD_PROBE_TYPE_BUFFER_LIST | GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM),
+  GST_PAD_PROBE_TYPE_DATA_UPSTREAM  = (GST_PAD_PROBE_TYPE_EVENT_UPSTREAM),
+  GST_PAD_PROBE_TYPE_DATA_BOTH      = (GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM |
+      GST_PAD_PROBE_TYPE_DATA_UPSTREAM),
+  GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM = (GST_PAD_PROBE_TYPE_BLOCK |
+      GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM),
+  GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM = (GST_PAD_PROBE_TYPE_BLOCK |
+      GST_PAD_PROBE_TYPE_DATA_UPSTREAM),
+  GST_PAD_PROBE_TYPE_EVENT_BOTH     = (GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM |
+      GST_PAD_PROBE_TYPE_EVENT_UPSTREAM),
+  GST_PAD_PROBE_TYPE_QUERY_BOTH     = (GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM |
+      GST_PAD_PROBE_TYPE_QUERY_UPSTREAM),
+  GST_PAD_PROBE_TYPE_ALL_BOTH       = (GST_PAD_PROBE_TYPE_DATA_BOTH |
+      GST_PAD_PROBE_TYPE_QUERY_BOTH),
+  GST_PAD_PROBE_TYPE_SCHEDULING     = (GST_PAD_PROBE_TYPE_PUSH |
+      GST_PAD_PROBE_TYPE_PULL)
 } GstPadProbeType;
 
-#define GST_PAD_PROBE_TYPE_BLOCKING         (GST_PAD_PROBE_TYPE_IDLE | GST_PAD_PROBE_TYPE_BLOCK)
-#define GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM (GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM)
-#define GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM   (GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_DATA_UPSTREAM)
-#define GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM  (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST | \
-                                             GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
-#define GST_PAD_PROBE_TYPE_DATA_UPSTREAM    (GST_PAD_PROBE_TYPE_EVENT_UPSTREAM)
-#define GST_PAD_PROBE_TYPE_DATA_BOTH        (GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM | \
-                                             GST_PAD_PROBE_TYPE_DATA_UPSTREAM)
-#define GST_PAD_PROBE_TYPE_EVENT_BOTH       (GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | \
-                                             GST_PAD_PROBE_TYPE_EVENT_UPSTREAM)
-#define GST_PAD_PROBE_TYPE_QUERY_BOTH       (GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM | \
-                                             GST_PAD_PROBE_TYPE_QUERY_UPSTREAM)
-#define GST_PAD_PROBE_TYPE_ALL_BOTH         (GST_PAD_PROBE_TYPE_DATA_BOTH | \
-                                             GST_PAD_PROBE_TYPE_QUERY_BOTH)
-#define GST_PAD_PROBE_TYPE_SCHEDULING       (GST_PAD_PROBE_TYPE_PUSH | GST_PAD_PROBE_TYPE_PULL)
 
 /**
  * GstPadProbeReturn: