pad: expose gst_pad_mode_get_name() and use it in baseparse

This commit is contained in:
Tim-Philipp Müller 2012-09-11 19:49:58 +01:00
parent 2616e70a8b
commit 221d46f438
5 changed files with 17 additions and 6 deletions

View 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

View 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)

View 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__ */

View 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;

View 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