mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
pad: set a good name on the task of the pad
Use the element:pad names to configure a good name for the pad task.
This commit is contained in:
parent
f4b43b6c12
commit
f089c3cceb
1 changed files with 14 additions and 0 deletions
14
gst/gstpad.c
14
gst/gstpad.c
|
@ -5144,6 +5144,20 @@ do_stream_status (GstPad * pad, GstStreamStatusType type,
|
|||
GstMessage *message;
|
||||
GValue value = { 0 };
|
||||
|
||||
if (type == GST_STREAM_STATUS_TYPE_ENTER) {
|
||||
gchar *tname, *ename, *pname;
|
||||
|
||||
/* create a good task name */
|
||||
ename = gst_element_get_name (parent);
|
||||
pname = gst_pad_get_name (pad);
|
||||
tname = g_strdup_printf ("%s:%s", ename, pname);
|
||||
g_free (ename);
|
||||
g_free (pname);
|
||||
|
||||
gst_object_set_name (GST_OBJECT_CAST (task), tname);
|
||||
g_free (tname);
|
||||
}
|
||||
|
||||
message = gst_message_new_stream_status (GST_OBJECT_CAST (pad),
|
||||
type, parent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue