mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-13 03:46:34 +00:00
minor updates to ouptut, added section for meta-elements' children
Original commit message from CVS: minor updates to ouptut, added section for meta-elements' children
This commit is contained in:
parent
38e8ff8b70
commit
24a3b52549
1 changed files with 50 additions and 24 deletions
|
@ -76,6 +76,8 @@ print_element_info (GstElementFactory *factory)
|
||||||
GtkArg *args;
|
GtkArg *args;
|
||||||
guint32 *flags;
|
guint32 *flags;
|
||||||
gint num_args,i;
|
gint num_args,i;
|
||||||
|
GList *children;
|
||||||
|
GstElement *child;
|
||||||
|
|
||||||
element = gst_elementfactory_create(factory,"element");
|
element = gst_elementfactory_create(factory,"element");
|
||||||
if (!element) {
|
if (!element) {
|
||||||
|
@ -142,9 +144,11 @@ print_element_info (GstElementFactory *factory)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
printf(" none\n\n");
|
printf(" none\n");
|
||||||
|
|
||||||
printf("Element Flags:\n");
|
|
||||||
|
|
||||||
|
printf("\nElement Flags:\n");
|
||||||
if (GST_FLAG_IS_SET(element,GST_ELEMENT_COMPLEX))
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_COMPLEX))
|
||||||
printf(" GST_ELEMENT_COMPLEX\n");
|
printf(" GST_ELEMENT_COMPLEX\n");
|
||||||
if (GST_FLAG_IS_SET(element,GST_ELEMENT_DECOUPLED))
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_DECOUPLED))
|
||||||
|
@ -153,43 +157,51 @@ print_element_info (GstElementFactory *factory)
|
||||||
printf(" GST_ELEMENT_THREADSUGGESTED\n");
|
printf(" GST_ELEMENT_THREADSUGGESTED\n");
|
||||||
if (GST_FLAG_IS_SET(element,GST_ELEMENT_NO_SEEK))
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_NO_SEEK))
|
||||||
printf(" GST_ELEMENT_NO_SEEK\n");
|
printf(" GST_ELEMENT_NO_SEEK\n");
|
||||||
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_NO_ENTRY))
|
||||||
|
printf(" GST_ELEMENT_NO_ENTRY\n");
|
||||||
if (! GST_FLAG_IS_SET(element, GST_ELEMENT_COMPLEX | GST_ELEMENT_DECOUPLED |
|
if (! GST_FLAG_IS_SET(element, GST_ELEMENT_COMPLEX | GST_ELEMENT_DECOUPLED |
|
||||||
GST_ELEMENT_THREAD_SUGGESTED | GST_ELEMENT_NO_SEEK))
|
GST_ELEMENT_THREAD_SUGGESTED | GST_ELEMENT_NO_SEEK |
|
||||||
|
GST_ELEMENT_NO_ENTRY))
|
||||||
printf(" no flags set\n");
|
printf(" no flags set\n");
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
|
|
||||||
printf("Element Implementation:\n");
|
|
||||||
|
printf("\nElement Implementation:\n");
|
||||||
|
|
||||||
if (element->loopfunc)
|
if (element->loopfunc)
|
||||||
printf(" loopfunc()-based element\n");
|
printf(" loopfunc()-based element: %s\n",GST_DEBUG_FUNCPTR_NAME(element->loopfunc));
|
||||||
else
|
else
|
||||||
printf(" No loopfunc(), must be chain-based or not configured yet\n");
|
printf(" No loopfunc(), must be chain-based or not configured yet\n");
|
||||||
if (gstelement_class->change_state)
|
|
||||||
printf(" Has change_state() function\n");
|
printf(" Has change_state() function: %s\n",
|
||||||
else
|
GST_DEBUG_FUNCPTR_NAME(gstelement_class->change_state));
|
||||||
printf(" No change_state() class function\n");
|
printf(" Has custom save_thyself() function: %s\n",
|
||||||
if (gstobject_class->save_thyself)
|
GST_DEBUG_FUNCPTR_NAME(gstobject_class->save_thyself));
|
||||||
printf(" Has custom save_thyself() class function\n");
|
printf(" Has custom restore_thyself() function: %s\n",
|
||||||
if (gstobject_class->restore_thyself)
|
GST_DEBUG_FUNCPTR_NAME(gstobject_class->restore_thyself));
|
||||||
printf(" Has custom restore_thyself() class function\n");
|
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
|
|
||||||
printf("Pads:\n");
|
|
||||||
|
printf("\nPads:\n");
|
||||||
if (element->numpads) {
|
if (element->numpads) {
|
||||||
pads = gst_element_get_pad_list(element);
|
pads = gst_element_get_pad_list(element);
|
||||||
while (pads) {
|
while (pads) {
|
||||||
pad = GST_PAD(pads->data);
|
pad = GST_PAD(pads->data);
|
||||||
pads = g_list_next(pads);
|
pads = g_list_next(pads);
|
||||||
realpad = GST_REAL_PAD(pad);
|
realpad = GST_PAD_REALIZE(pad);
|
||||||
|
|
||||||
if (gst_pad_get_direction(pad) == GST_PAD_SRC)
|
if (gst_pad_get_direction(pad) == GST_PAD_SRC)
|
||||||
printf(" SRC: '%s'\n",gst_pad_get_name(pad));
|
printf(" SRC: '%s'",gst_pad_get_name(pad));
|
||||||
else if (gst_pad_get_direction(pad) == GST_PAD_SINK)
|
else if (gst_pad_get_direction(pad) == GST_PAD_SINK)
|
||||||
printf(" SINK: '%s'\n",gst_pad_get_name(pad));
|
printf(" SINK: '%s'",gst_pad_get_name(pad));
|
||||||
else
|
else
|
||||||
printf(" UNKNOWN!!!: '%s'\n",gst_pad_get_name(pad));
|
printf(" UNKNOWN!!!: '%s'\n",gst_pad_get_name(pad));
|
||||||
|
|
||||||
|
if (GST_IS_GHOST_PAD(pad))
|
||||||
|
printf(", ghost of real pad %s:%s\n",GST_DEBUG_PAD_NAME(realpad));
|
||||||
|
else
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
printf(" Implementation:\n");
|
printf(" Implementation:\n");
|
||||||
if (realpad->chainfunc)
|
if (realpad->chainfunc)
|
||||||
printf(" Has chainfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->chainfunc));
|
printf(" Has chainfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->chainfunc));
|
||||||
|
@ -199,7 +211,7 @@ print_element_info (GstElementFactory *factory)
|
||||||
printf(" Has getregionfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->getregionfunc));
|
printf(" Has getregionfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->getregionfunc));
|
||||||
if (realpad->qosfunc)
|
if (realpad->qosfunc)
|
||||||
printf(" Has qosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->qosfunc));
|
printf(" Has qosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->qosfunc));
|
||||||
if (realpad->eosfunc) {
|
if (realpad->eosfunc != gst_pad_eos_func) {
|
||||||
printf(" Has eosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->eosfunc));
|
printf(" Has eosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->eosfunc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,13 +238,13 @@ print_element_info (GstElementFactory *factory)
|
||||||
caps = caps->next;
|
caps = caps->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n");
|
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
printf(" none\n\n");
|
printf(" none\n");
|
||||||
|
|
||||||
printf("Element Arguments:\n");
|
|
||||||
|
|
||||||
|
printf("\nElement Arguments:\n");
|
||||||
args = gtk_object_query_args(GTK_OBJECT_TYPE(element), &flags, &num_args);
|
args = gtk_object_query_args(GTK_OBJECT_TYPE(element), &flags, &num_args);
|
||||||
for (i=0;i<num_args;i++) {
|
for (i=0;i<num_args;i++) {
|
||||||
gtk_object_getv(GTK_OBJECT(element), 1, &args[i]);
|
gtk_object_getv(GTK_OBJECT(element), 1, &args[i]);
|
||||||
|
@ -275,6 +287,20 @@ print_element_info (GstElementFactory *factory)
|
||||||
if (num_args == 0) g_print (" none");
|
if (num_args == 0) g_print (" none");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// for compound elements
|
||||||
|
if (GST_IS_BIN(element)) {
|
||||||
|
printf("\nChildren:\n");
|
||||||
|
children = gst_bin_get_list(GST_BIN(element));
|
||||||
|
while (children) {
|
||||||
|
child = GST_ELEMENT (children->data);
|
||||||
|
children = g_list_next (children);
|
||||||
|
|
||||||
|
g_print(" %s\n",GST_ELEMENT_NAME(child));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue