pad: expose gst_pad_mode_get_name() and use it in baseparse
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 11 Sep 2012 18:49:58 +0000 (19:49 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 11 Sep 2012 18:51:02 +0000 (19:51 +0100)
docs/gst/gstreamer-sections.txt
gst/gstpad.c
gst/gstpad.h
libs/gst/base/gstbaseparse.c
win32/common/libgstreamer.def

index 5cc4b9c..fa80173 100644 (file)
@@ -1620,7 +1620,10 @@ GST_PAD_LINK_FAILED
 GST_PAD_LINK_SUCCESSFUL
 GstPadLinkCheck
 GstFlowReturn
+gst_flow_get_name
+gst_flow_to_quark
 GstPadMode
+gst_pad_mode_get_name
 
 <SUBSECTION Application>
 gst_pad_get_name
@@ -2932,8 +2935,6 @@ GFLOAT_TO_BE
 GFLOAT_TO_LE
 
 
-gst_flow_get_name
-gst_flow_to_quark
 gst_guint64_to_gdouble
 gst_gdouble_to_guint64
 gst_util_dump_mem
index 971f84b..b07fc4b 100644 (file)
@@ -808,8 +808,15 @@ gst_pad_activate_default (GstPad * pad, GstObject * parent)
   return gst_pad_activate_mode (pad, GST_PAD_MODE_PUSH, TRUE);
 }
 
-#ifndef GST_DISABLE_GST_DEBUG
-static const gchar *
+/**
+ * gst_pad_mode_get_name:
+ * @mode: the pad mode
+ *
+ * Return the name of a pad mode, for use in debug messages mostly.
+ *
+ * Returns: short mnemonic for pad mode @mode
+ */
+const gchar *
 gst_pad_mode_get_name (GstPadMode mode)
 {
   switch (mode) {
@@ -824,7 +831,6 @@ gst_pad_mode_get_name (GstPadMode mode)
   }
   return "unknown";
 }
-#endif
 
 static void
 pre_activate (GstPad * pad, GstPadMode new_mode)
index 2fd7ff1..f14e7fe 100644 (file)
@@ -979,6 +979,8 @@ gboolean            gst_pad_query_default                   (GstPad *pad, GstObject *parent,
 gboolean               gst_pad_forward                         (GstPad *pad, GstPadForwardFunction forward,
                                                                 gpointer user_data);
 
+const gchar   * gst_pad_mode_get_name (GstPadMode mode);
+
 G_END_DECLS
 
 #endif /* __GST_PAD_H__ */
index 6d2f24a..bcc8f75 100644 (file)
@@ -3048,7 +3048,8 @@ gst_base_parse_sink_activate_mode (GstPad * pad, GstObject * parent,
 
   parse = GST_BASE_PARSE (parent);
 
-  GST_DEBUG_OBJECT (parse, "sink activate mode %d, %d", mode, active);
+  GST_DEBUG_OBJECT (parse, "sink %sactivate in %s mode",
+      (active) ? "" : "de", gst_pad_mode_get_name (mode));
 
   if (!gst_base_parse_activate (parse, active))
     goto activate_failed;
index b30b962..403656a 100644 (file)
@@ -691,6 +691,7 @@ EXPORTS
        gst_pad_link_full
        gst_pad_link_return_get_type
        gst_pad_mark_reconfigure
+       gst_pad_mode_get_name
        gst_pad_mode_get_type
        gst_pad_needs_reconfigure
        gst_pad_new