mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
pad: expose gst_pad_mode_get_name() and use it in baseparse
This commit is contained in:
parent
2616e70a8b
commit
221d46f438
5 changed files with 17 additions and 6 deletions
|
@ -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
|
||||
|
|
12
gst/gstpad.c
12
gst/gstpad.c
|
@ -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)
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue