static gboolean gst_tcp_mix_src_pad_stop (GstTCPMixSrcPad * pad, GstTaskFunction func) { gboolean res; if (GST_PAD_TASK (pad) != NULL) { // FIXME: pad->status == started res = gst_pad_stop_task (GST_PAD (pad)); } return res; }
static gboolean gst_tcp_mix_src_pad_start (GstTCPMixSrcPad * pad) { gboolean res = FALSE; if (GST_PAD_TASK (pad) == NULL) { GstTaskFunction func = (GstTaskFunction) gst_tcp_mix_src_loop; res = gst_pad_start_task (GST_PAD (pad), func, GST_PAD (pad), NULL); } return res; }
static void debug_dump_pad (GstPad * pad, const gchar * color_name, const gchar * element_name, GstDebugGraphDetails details, GString * str, const gint indent) { GstPadTemplate *pad_templ; GstPadPresence presence; gchar *pad_name; const gchar *style_name; const gchar *spc = &spaces[MAX (sizeof (spaces) - (1 + indent * 2), 0)]; pad_name = debug_dump_make_object_name (GST_OBJECT (pad)); /* pad availability */ style_name = "filled,solid"; if ((pad_templ = gst_pad_get_pad_template (pad))) { presence = GST_PAD_TEMPLATE_PRESENCE (pad_templ); gst_object_unref (pad_templ); if (presence == GST_PAD_SOMETIMES) { style_name = "filled,dotted"; } else if (presence == GST_PAD_REQUEST) { style_name = "filled,dashed"; } } if (details & GST_DEBUG_GRAPH_SHOW_STATES) { gchar pad_flags[4]; const gchar *activation_mode = "-><"; const gchar *task_mode = ""; GstTask *task; GST_OBJECT_LOCK (pad); task = GST_PAD_TASK (pad); if (task) { switch (gst_task_get_state (task)) { case GST_TASK_STARTED: task_mode = "[T]"; break; case GST_TASK_PAUSED: task_mode = "[t]"; break; default: /* Invalid task state, ignoring */ break; } } GST_OBJECT_UNLOCK (pad); /* check if pad flags */ pad_flags[0] = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKED) ? 'B' : 'b'; pad_flags[1] = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FLUSHING) ? 'F' : 'f'; pad_flags[2] = GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKING) ? 'B' : 'b'; pad_flags[3] = '\0'; g_string_append_printf (str, "%s %s_%s [color=black, fillcolor=\"%s\", label=\"%s\\n[%c][%s]%s\", height=\"0.2\", style=\"%s\"];\n", spc, element_name, pad_name, color_name, GST_OBJECT_NAME (pad), activation_mode[pad->mode], pad_flags, task_mode, style_name); } else { g_string_append_printf (str, "%s %s_%s [color=black, fillcolor=\"%s\", label=\"%s\", height=\"0.2\", style=\"%s\"];\n", spc, element_name, pad_name, color_name, GST_OBJECT_NAME (pad), style_name); } g_free (pad_name); }