2003-06-29 14:05:49 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
#include <gst/gst.h>
|
2005-11-30 19:01:53 +00:00
|
|
|
#include <stdlib.h>
|
2003-02-20 23:07:01 +00:00
|
|
|
#include <string.h>
|
2003-08-19 08:11:58 +00:00
|
|
|
#include <locale.h>
|
2004-05-07 02:36:28 +00:00
|
|
|
#include <glib/gprintf.h>
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
#define PUT_START_TAG(pfx,tag) \
|
2003-02-20 23:07:01 +00:00
|
|
|
G_STMT_START{ \
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%*.*s<%s>\n", pfx, pfx, "", tag); \
|
2003-02-20 23:07:01 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
#define PUT_END_TAG(pfx,tag) \
|
2003-02-20 23:07:01 +00:00
|
|
|
G_STMT_START{ \
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%*.*s</%s>\n", pfx, pfx, "", tag); \
|
2003-02-20 23:07:01 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
#define PUT_ESCAPED(pfx,tag,value) \
|
|
|
|
G_STMT_START{ \
|
|
|
|
const gchar *toconv = value; \
|
|
|
|
if (value) { \
|
|
|
|
gchar *v = g_markup_escape_text (toconv, strlen (toconv)); \
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%*.*s<%s>%s</%s>\n", pfx, pfx, "", tag, v, tag); \
|
2003-02-20 23:07:01 +00:00
|
|
|
g_free (v); \
|
|
|
|
} \
|
|
|
|
}G_STMT_END
|
|
|
|
|
2003-03-11 16:46:58 +00:00
|
|
|
#ifdef G_HAVE_ISO_VARARGS
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
#define PUT_STRING(pfx, ...) \
|
2003-03-11 16:46:58 +00:00
|
|
|
G_STMT_START{ \
|
|
|
|
gchar *ps_val = g_strdup_printf(__VA_ARGS__); \
|
|
|
|
g_print ("%*.*s%s\n", pfx, pfx, "", ps_val); \
|
|
|
|
g_free(ps_val); \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
#define PUT_STRING(pfx, str, a...) \
|
2003-02-20 23:07:01 +00:00
|
|
|
G_STMT_START{ \
|
2005-12-06 19:29:15 +00:00
|
|
|
g_print ("%*.*s"str"\n", pfx, pfx, "" , ##a); \
|
2003-02-20 23:07:01 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
2004-05-07 02:36:28 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
PUT_STRING (int pfx, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
g_print ("%*.*s", pfx, pfx, "");
|
|
|
|
va_start (varargs, format);
|
|
|
|
g_vprintf (format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
|
2003-03-11 16:46:58 +00:00
|
|
|
#endif
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_caps (const GstCaps * caps, gint pfx)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2003-12-22 01:39:35 +00:00
|
|
|
char *s;
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
if (!caps)
|
|
|
|
return;
|
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
s = gst_caps_to_string (caps);
|
|
|
|
PUT_ESCAPED (pfx, "caps", s);
|
2004-03-13 15:27:01 +00:00
|
|
|
g_free (s);
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
#if 0
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_formats (const GstFormat * formats, gint pfx)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
while (formats && *formats) {
|
|
|
|
const GstFormatDefinition *definition;
|
|
|
|
|
|
|
|
definition = gst_format_get_details (*formats);
|
|
|
|
if (definition)
|
|
|
|
PUT_STRING (pfx, "<format id=\"%d\" nick=\"%s\">%s</format>",
|
2004-03-15 19:27:17 +00:00
|
|
|
*formats, definition->nick, definition->description);
|
2003-02-20 23:07:01 +00:00
|
|
|
else
|
2004-03-13 15:27:01 +00:00
|
|
|
PUT_STRING (pfx, "<format id=\"%d\">unknown</format>", *formats);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
formats++;
|
|
|
|
}
|
|
|
|
}
|
2005-05-09 10:53:13 +00:00
|
|
|
#endif
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_query_types (const GstQueryType * types, gint pfx)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
while (types && *types) {
|
|
|
|
const GstQueryTypeDefinition *definition;
|
|
|
|
|
|
|
|
definition = gst_query_type_get_details (*types);
|
|
|
|
if (definition)
|
|
|
|
PUT_STRING (pfx, "<query-type id=\"%d\" nick=\"%s\">%s</query-type>",
|
2004-03-15 19:27:17 +00:00
|
|
|
*types, definition->nick, definition->description);
|
2003-02-20 23:07:01 +00:00
|
|
|
else
|
2004-03-13 15:27:01 +00:00
|
|
|
PUT_STRING (pfx, "<query-type id=\"%d\">unknown</query-type>", *types);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
types++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
#if 0
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_event_masks (const GstEventMask * masks, gint pfx)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
#ifndef GST_DISABLE_ENUMTYPES
|
|
|
|
GType event_type;
|
|
|
|
GEnumClass *klass;
|
|
|
|
GType event_flags;
|
|
|
|
GFlagsClass *flags_class = NULL;
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
event_type = gst_event_type_get_type ();
|
2003-02-20 23:07:01 +00:00
|
|
|
klass = (GEnumClass *) g_type_class_ref (event_type);
|
|
|
|
|
|
|
|
while (masks && masks->type) {
|
|
|
|
GEnumValue *value;
|
|
|
|
gint flags = 0, index = 0;
|
|
|
|
|
|
|
|
switch (masks->type) {
|
|
|
|
case GST_EVENT_SEEK:
|
2004-03-15 19:27:17 +00:00
|
|
|
flags = masks->flags;
|
|
|
|
event_flags = gst_seek_type_get_type ();
|
|
|
|
flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
default:
|
2004-03-15 19:27:17 +00:00
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
value = g_enum_get_value (klass, masks->type);
|
2004-03-13 15:27:01 +00:00
|
|
|
PUT_STRING (pfx, "<event type=\"%s\">", value->value_nick);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
while (flags) {
|
|
|
|
GFlagsValue *value;
|
|
|
|
|
|
|
|
if (flags & 1) {
|
2004-03-15 19:27:17 +00:00
|
|
|
value = g_flags_get_first_value (flags_class, 1 << index);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
if (value)
|
|
|
|
PUT_ESCAPED (pfx + 1, "flag", value->value_nick);
|
|
|
|
else
|
|
|
|
PUT_ESCAPED (pfx + 1, "flag", "?");
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
flags >>= 1;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
PUT_END_TAG (pfx, "event");
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
masks++;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
2005-05-09 10:53:13 +00:00
|
|
|
#endif
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
output_hierarchy (GType type, gint level, gint * maxlevel)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
GType parent;
|
|
|
|
|
|
|
|
parent = g_type_parent (type);
|
|
|
|
|
|
|
|
*maxlevel = *maxlevel + 1;
|
|
|
|
level++;
|
|
|
|
|
|
|
|
PUT_STRING (level, "<object name=\"%s\">", g_type_name (type));
|
|
|
|
|
|
|
|
if (parent)
|
|
|
|
output_hierarchy (parent, level, maxlevel);
|
|
|
|
|
|
|
|
PUT_END_TAG (level, "object");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_element_properties (GstElement * element, gint pfx)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
GParamSpec **property_specs;
|
GCC 4 fixen.
Original commit message from CVS:
2005-05-04 Andy Wingo <wingo@pobox.com>
* check/Makefile.am:
* docs/gst/tmpl/gstatomic.sgml:
* docs/gst/tmpl/gstplugin.sgml:
* gst/base/gstbasesink.c: (gst_basesink_activate):
* gst/base/gstbasesrc.c: (gst_basesrc_class_init),
(gst_basesrc_init), (gst_basesrc_set_dataflow_funcs),
(gst_basesrc_query), (gst_basesrc_set_property),
(gst_basesrc_get_property), (gst_basesrc_check_get_range),
(gst_basesrc_activate):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c: (gst_base_transform_sink_activate),
(gst_base_transform_src_activate):
* gst/elements/gstelements.c:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_set_property), (gst_fakesrc_get_property):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/elements/gsttypefindelement.c: (find_element_get_length),
(gst_type_find_element_checkgetrange),
(gst_type_find_element_activate):
* gst/gstbin.c: (gst_bin_save_thyself), (gst_bin_restore_thyself):
* gst/gstcaps.c: (gst_caps_do_simplify), (gst_caps_save_thyself),
(gst_caps_load_thyself):
* gst/gstelement.c: (gst_element_pads_activate),
(gst_element_save_thyself), (gst_element_restore_thyself):
* gst/gstpad.c: (gst_pad_load_and_link), (gst_pad_save_thyself),
(gst_ghost_pad_save_thyself), (gst_pad_check_pull_range):
* gst/gstpad.h:
* gst/gstxml.c: (gst_xml_write), (gst_xml_parse_doc),
(gst_xml_parse_file), (gst_xml_parse_memory),
(gst_xml_get_element), (gst_xml_make_element):
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(_file_index_id_save_xml), (gst_file_index_commit):
* gst/registries/gstlibxmlregistry.c: (read_string), (read_uint),
(read_enum), (load_pad_template), (load_feature), (load_plugin),
(load_paths):
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_caps),
(gst_dp_packet_from_event), (gst_dp_caps_from_packet):
* tools/gst-complete.c: (main):
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_element_properties_info):
* tools/gst-launch.c: (xmllaunch_parse_cmdline):
* tools/gst-xmlinspect.c: (print_element_properties):
GCC 4 fixen.
2005-05-04 21:29:44 +00:00
|
|
|
guint num_properties;
|
|
|
|
gint i;
|
2003-02-20 23:07:01 +00:00
|
|
|
gboolean readable;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
|
|
|
property_specs = g_object_class_list_properties
|
2004-03-13 15:27:01 +00:00
|
|
|
(G_OBJECT_GET_CLASS (element), &num_properties);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
PUT_START_TAG (pfx, "element-properties");
|
|
|
|
|
|
|
|
for (i = 0; i < num_properties; i++) {
|
|
|
|
GValue value = { 0, };
|
|
|
|
GParamSpec *param = property_specs[i];
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
readable = FALSE;
|
|
|
|
|
|
|
|
g_value_init (&value, param->value_type);
|
|
|
|
if (param->flags & G_PARAM_READABLE) {
|
|
|
|
g_object_get_property (G_OBJECT (element), param->name, &value);
|
|
|
|
readable = TRUE;
|
|
|
|
}
|
|
|
|
PUT_START_TAG (pfx + 1, "element-property");
|
|
|
|
PUT_ESCAPED (pfx + 2, "name", g_param_spec_get_name (param));
|
2004-03-13 15:27:01 +00:00
|
|
|
PUT_ESCAPED (pfx + 2, "type", g_type_name (param->value_type));
|
2003-02-20 23:07:01 +00:00
|
|
|
PUT_ESCAPED (pfx + 2, "nick", g_param_spec_get_nick (param));
|
|
|
|
PUT_ESCAPED (pfx + 2, "blurb", g_param_spec_get_blurb (param));
|
|
|
|
if (readable) {
|
|
|
|
PUT_ESCAPED (pfx + 2, "flags", "RW");
|
2004-03-13 15:27:01 +00:00
|
|
|
} else {
|
2003-02-20 23:07:01 +00:00
|
|
|
PUT_ESCAPED (pfx + 2, "flags", "W");
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (G_VALUE_TYPE (&value)) {
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_STRING:
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_BOOLEAN:
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_ULONG:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2, "<range min=\"%lu\" max=\"%lu\"/>",
|
|
|
|
pulong->minimum, pulong->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_LONG:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2, "<range min=\"%ld\" max=\"%ld\"/>",
|
|
|
|
plong->minimum, plong->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_UINT:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2, "<range min=\"%u\" max=\"%u\"/>",
|
|
|
|
puint->minimum, puint->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2, "<range min=\"%d\" max=\"%d\"/>",
|
|
|
|
pint->minimum, pint->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_UINT64:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2,
|
|
|
|
"<range min=\"%" G_GUINT64_FORMAT "\" max=\"%" G_GUINT64_FORMAT
|
|
|
|
"\"/>", puint64->minimum, puint64->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT64:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2,
|
|
|
|
"<range min=\"%" G_GINT64_FORMAT "\" max=\"%" G_GINT64_FORMAT
|
|
|
|
"\"/>", pint64->minimum, pint64->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_FLOAT:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2, "<range min=\"%f\" max=\"%f\"/>",
|
|
|
|
pfloat->minimum, pfloat->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_DOUBLE:
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (pfx + 2, "<range min=\"%g\" max=\"%g\"/>",
|
|
|
|
pdouble->minimum, pdouble->maximum);
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
default:
|
2004-03-15 19:27:17 +00:00
|
|
|
if (param->value_type == GST_TYPE_CAPS) {
|
|
|
|
GstCaps *caps = g_value_peek_pointer (&value);
|
|
|
|
|
|
|
|
if (!caps)
|
|
|
|
PUT_ESCAPED (pfx + 2, "default", "NULL");
|
|
|
|
else {
|
|
|
|
print_caps (caps, 2);
|
|
|
|
}
|
|
|
|
} else if (G_IS_PARAM_SPEC_ENUM (param)) {
|
|
|
|
GEnumValue *values;
|
|
|
|
guint j = 0;
|
|
|
|
gint enum_value;
|
|
|
|
|
|
|
|
values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
|
|
|
|
enum_value = g_value_get_enum (&value);
|
|
|
|
|
|
|
|
while (values[j].value_name) {
|
|
|
|
if (values[j].value == enum_value)
|
|
|
|
break;
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
PUT_STRING (pfx + 2, "<default>%d</default>", values[j].value);
|
|
|
|
|
|
|
|
PUT_START_TAG (pfx + 2, "enum-values");
|
|
|
|
j = 0;
|
|
|
|
while (values[j].value_name) {
|
|
|
|
PUT_STRING (pfx + 3, "<value value=\"%d\" nick=\"%s\"/>",
|
|
|
|
values[j].value, values[j].value_nick);
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
PUT_END_TAG (pfx + 2, "enum-values");
|
|
|
|
} else if (G_IS_PARAM_SPEC_FLAGS (param)) {
|
|
|
|
GFlagsValue *values;
|
|
|
|
guint j = 0;
|
|
|
|
gint flags_value;
|
|
|
|
|
|
|
|
values = G_FLAGS_CLASS (g_type_class_ref (param->value_type))->values;
|
|
|
|
flags_value = g_value_get_flags (&value);
|
|
|
|
|
|
|
|
PUT_STRING (pfx + 2, "<default>%d</default>", flags_value);
|
|
|
|
|
|
|
|
PUT_START_TAG (pfx + 2, "flags");
|
|
|
|
j = 0;
|
|
|
|
while (values[j].value_name) {
|
|
|
|
PUT_STRING (pfx + 3, "<flag value=\"%d\" nick=\"%s\"/>",
|
|
|
|
values[j].value, values[j].value_nick);
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
PUT_END_TAG (pfx + 2, "flags");
|
|
|
|
} else if (G_IS_PARAM_SPEC_OBJECT (param)) {
|
|
|
|
PUT_ESCAPED (pfx + 2, "object-type", g_type_name (param->value_type));
|
|
|
|
}
|
|
|
|
break;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PUT_END_TAG (pfx + 1, "element-property");
|
|
|
|
}
|
|
|
|
PUT_END_TAG (pfx, "element-properties");
|
2005-08-24 13:04:31 +00:00
|
|
|
g_free (property_specs);
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_element_signals (GstElement * element, gint pfx)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
guint *signals;
|
|
|
|
guint nsignals;
|
|
|
|
gint i, k;
|
|
|
|
GSignalQuery *query;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
signals = g_signal_list_ids (G_OBJECT_TYPE (element), &nsignals);
|
|
|
|
for (k = 0; k < 2; k++) {
|
|
|
|
gint counted = 0;
|
|
|
|
|
|
|
|
if (k == 0)
|
|
|
|
PUT_START_TAG (pfx, "element-signals");
|
|
|
|
else
|
|
|
|
PUT_START_TAG (pfx, "element-actions");
|
|
|
|
|
|
|
|
for (i = 0; i < nsignals; i++) {
|
|
|
|
gint n_params;
|
|
|
|
GType return_type;
|
|
|
|
const GType *param_types;
|
|
|
|
gint j;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
query = g_new0 (GSignalQuery, 1);
|
2003-02-20 23:07:01 +00:00
|
|
|
g_signal_query (signals[i], query);
|
|
|
|
|
|
|
|
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
2004-03-15 19:27:17 +00:00
|
|
|
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION))) {
|
|
|
|
n_params = query->n_params;
|
|
|
|
return_type = query->return_type;
|
|
|
|
param_types = query->param_types;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_START_TAG (pfx + 1, "signal");
|
|
|
|
PUT_ESCAPED (pfx + 2, "name", query->signal_name);
|
|
|
|
PUT_ESCAPED (pfx + 2, "return-type", g_type_name (return_type));
|
|
|
|
PUT_ESCAPED (pfx + 2, "object-type",
|
|
|
|
g_type_name (G_OBJECT_TYPE (element)));
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_START_TAG (pfx + 2, "params");
|
|
|
|
for (j = 0; j < n_params; j++) {
|
|
|
|
PUT_ESCAPED (pfx + 3, "type", g_type_name (param_types[j]));
|
|
|
|
}
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_END_TAG (pfx + 2, "params");
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_END_TAG (pfx + 1, "signal");
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
counted++;
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
g_free (query);
|
|
|
|
}
|
|
|
|
if (k == 0)
|
|
|
|
PUT_END_TAG (pfx, "element-signals");
|
|
|
|
else
|
|
|
|
PUT_END_TAG (pfx, "element-actions");
|
|
|
|
}
|
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
static gint
|
2004-03-13 15:27:01 +00:00
|
|
|
print_element_info (GstElementFactory * factory)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
GstElement *element;
|
|
|
|
GstObjectClass *gstobject_class;
|
|
|
|
GstElementClass *gstelement_class;
|
|
|
|
GList *pads;
|
|
|
|
GstPad *pad;
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
GstStaticPadTemplate *padtemplate;
|
2003-02-20 23:07:01 +00:00
|
|
|
gint maxlevel = 0;
|
|
|
|
|
|
|
|
element = gst_element_factory_create (factory, "element");
|
|
|
|
if (!element) {
|
|
|
|
g_print ("couldn't construct element for some reason\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
PUT_START_TAG (0, "element");
|
|
|
|
PUT_ESCAPED (1, "name", GST_PLUGIN_FEATURE_NAME (factory));
|
|
|
|
|
|
|
|
gstobject_class = GST_OBJECT_CLASS (G_OBJECT_GET_CLASS (element));
|
|
|
|
gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
|
|
|
|
|
|
|
|
PUT_START_TAG (1, "details");
|
2004-03-13 15:27:01 +00:00
|
|
|
PUT_ESCAPED (2, "long-name", factory->details.longname);
|
|
|
|
PUT_ESCAPED (2, "class", factory->details.klass);
|
|
|
|
PUT_ESCAPED (2, "description", factory->details.description);
|
|
|
|
PUT_ESCAPED (2, "authors", factory->details.author);
|
2003-02-20 23:07:01 +00:00
|
|
|
PUT_END_TAG (1, "details");
|
|
|
|
|
|
|
|
output_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);
|
|
|
|
|
|
|
|
PUT_START_TAG (1, "pad-templates");
|
|
|
|
if (factory->numpadtemplates) {
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
pads = factory->staticpadtemplates;
|
2003-02-20 23:07:01 +00:00
|
|
|
while (pads) {
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
padtemplate = (GstStaticPadTemplate *) (pads->data);
|
2004-03-13 15:27:01 +00:00
|
|
|
pads = g_list_next (pads);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
PUT_START_TAG (2, "pad-template");
|
2004-03-13 15:27:01 +00:00
|
|
|
PUT_ESCAPED (3, "name", padtemplate->name_template);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
if (padtemplate->direction == GST_PAD_SRC)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "direction", "src");
|
2003-02-20 23:07:01 +00:00
|
|
|
else if (padtemplate->direction == GST_PAD_SINK)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "direction", "sink");
|
2003-02-20 23:07:01 +00:00
|
|
|
else
|
2004-05-14 11:37:56 +00:00
|
|
|
PUT_ESCAPED (3, "direction", "unknown");
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
if (padtemplate->presence == GST_PAD_ALWAYS)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "presence", "always");
|
2003-02-20 23:07:01 +00:00
|
|
|
else if (padtemplate->presence == GST_PAD_SOMETIMES)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "presence", "sometimes");
|
2003-02-20 23:07:01 +00:00
|
|
|
else if (padtemplate->presence == GST_PAD_REQUEST) {
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "presence", "request");
|
|
|
|
PUT_ESCAPED (3, "request-function",
|
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
|
2004-03-13 15:27:01 +00:00
|
|
|
} else
|
2004-05-14 11:37:56 +00:00
|
|
|
PUT_ESCAPED (3, "presence", "unknown");
|
2003-02-20 23:07:01 +00:00
|
|
|
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
if (padtemplate->static_caps.string) {
|
|
|
|
print_caps (gst_static_caps_get (&padtemplate->static_caps), 3);
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
PUT_END_TAG (2, "pad-template");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
PUT_END_TAG (1, "pad-templates");
|
|
|
|
|
|
|
|
PUT_START_TAG (1, "element-flags");
|
|
|
|
PUT_END_TAG (1, "element-flags");
|
|
|
|
|
|
|
|
if (GST_IS_BIN (element)) {
|
|
|
|
PUT_START_TAG (1, "bin-flags");
|
|
|
|
|
|
|
|
PUT_END_TAG (1, "bin-flags");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PUT_START_TAG (1, "element-implementation");
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
PUT_STRING (2, "<state-change function=\"%s\"/>",
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstelement_class->change_state));
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
#ifndef GST_DISABLE_LOADSAVE
|
2003-03-16 20:06:02 +00:00
|
|
|
PUT_STRING (2, "<save function=\"%s\"/>",
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstobject_class->save_thyself));
|
2003-03-16 20:06:02 +00:00
|
|
|
PUT_STRING (2, "<load function=\"%s\"/>",
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstobject_class->restore_thyself));
|
2003-02-20 23:07:01 +00:00
|
|
|
#endif
|
|
|
|
PUT_END_TAG (1, "element-implementation");
|
|
|
|
|
|
|
|
PUT_START_TAG (1, "clocking-interaction");
|
|
|
|
if (gst_element_requires_clock (element)) {
|
|
|
|
PUT_STRING (2, "<requires-clock/>");
|
|
|
|
}
|
|
|
|
if (gst_element_provides_clock (element)) {
|
|
|
|
GstClock *clock;
|
|
|
|
|
|
|
|
clock = gst_element_get_clock (element);
|
|
|
|
if (clock)
|
|
|
|
PUT_STRING (2, "<provides-clock name=\"%s\"/>", GST_OBJECT_NAME (clock));
|
|
|
|
}
|
|
|
|
PUT_END_TAG (1, "clocking-interaction");
|
|
|
|
|
|
|
|
#ifndef GST_DISABLE_INDEX
|
|
|
|
if (gst_element_is_indexable (element)) {
|
|
|
|
PUT_STRING (1, "<indexing-capabilities/>");
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
PUT_START_TAG (1, "pads");
|
|
|
|
if (element->numpads) {
|
|
|
|
const GList *pads;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
pads = element->pads;
|
2003-02-20 23:07:01 +00:00
|
|
|
while (pads) {
|
|
|
|
pad = GST_PAD (pads->data);
|
|
|
|
pads = g_list_next (pads);
|
|
|
|
|
|
|
|
PUT_START_TAG (2, "pad");
|
2004-03-13 15:27:01 +00:00
|
|
|
PUT_ESCAPED (3, "name", gst_pad_get_name (pad));
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "direction", "src");
|
2003-02-20 23:07:01 +00:00
|
|
|
else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "direction", "sink");
|
2003-02-20 23:07:01 +00:00
|
|
|
else
|
2004-05-14 11:37:56 +00:00
|
|
|
PUT_ESCAPED (3, "direction", "unknown");
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
if (pad->padtemplate)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_ESCAPED (3, "template", pad->padtemplate->name_template);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
PUT_START_TAG (3, "implementation");
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->chainfunc)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (4, "<chain-based function=\"%s\"/>",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->chainfunc));
|
|
|
|
if (pad->getrangefunc)
|
2005-03-21 17:34:02 +00:00
|
|
|
PUT_STRING (4, "<get-range-based function=\"%s\"/>",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->getrangefunc));
|
|
|
|
if (pad->eventfunc != gst_pad_event_default)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (4, "<event-function function=\"%s\"/>",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->eventfunc));
|
|
|
|
if (pad->queryfunc != gst_pad_query_default)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (4, "<query-function function=\"%s\"/>",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->queryfunc));
|
|
|
|
if (pad->querytypefunc != gst_pad_get_query_types_default) {
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (4, "<query-type-func function=\"%s\">",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->querytypefunc));
|
|
|
|
print_query_types (gst_pad_get_query_types (pad), 5);
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_END_TAG (4, "query-type-func");
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->intlinkfunc != gst_pad_get_internal_links_default)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (4, "<intlink-function function=\"%s\"/>",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->intlinkfunc));
|
2003-02-20 23:07:01 +00:00
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->bufferallocfunc)
|
2004-03-15 19:27:17 +00:00
|
|
|
PUT_STRING (4, "<bufferalloc-function function=\"%s\"/>",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->bufferallocfunc));
|
2003-02-20 23:07:01 +00:00
|
|
|
PUT_END_TAG (3, "implementation");
|
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->caps) {
|
|
|
|
print_caps (pad->caps, 3);
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
PUT_END_TAG (2, "pad");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
PUT_END_TAG (1, "pads");
|
|
|
|
|
|
|
|
print_element_properties (element, 1);
|
|
|
|
print_element_signals (element, 1);
|
|
|
|
|
|
|
|
/* for compound elements */
|
2005-03-21 17:34:02 +00:00
|
|
|
/* FIXME: gst_bin_get_list does not exist anymore
|
|
|
|
if (GST_IS_BIN (element)) {
|
|
|
|
GList *children;
|
|
|
|
GstElement *child;
|
|
|
|
PUT_START_TAG (1, "children");
|
|
|
|
children = (GList *) gst_bin_get_list (GST_BIN (element));
|
|
|
|
while (children) {
|
|
|
|
child = GST_ELEMENT (children->data);
|
|
|
|
children = g_list_next (children);
|
|
|
|
|
|
|
|
PUT_ESCAPED (2, "child", GST_ELEMENT_NAME (child));
|
|
|
|
}
|
|
|
|
PUT_END_TAG (1, "children");
|
|
|
|
}
|
|
|
|
*/
|
2003-02-20 23:07:01 +00:00
|
|
|
PUT_END_TAG (0, "element");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_element_list (void)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
GList *plugins;
|
|
|
|
|
2005-09-15 00:13:26 +00:00
|
|
|
plugins = gst_default_registry_get_plugin_list ();
|
2003-02-20 23:07:01 +00:00
|
|
|
while (plugins) {
|
|
|
|
GList *features;
|
|
|
|
GstPlugin *plugin;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
plugin = (GstPlugin *) (plugins->data);
|
2003-02-20 23:07:01 +00:00
|
|
|
plugins = g_list_next (plugins);
|
|
|
|
|
2005-09-18 06:59:25 +00:00
|
|
|
features =
|
|
|
|
gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
|
|
|
|
plugin->desc.name);
|
2003-02-20 23:07:01 +00:00
|
|
|
while (features) {
|
|
|
|
GstPluginFeature *feature;
|
|
|
|
|
|
|
|
feature = GST_PLUGIN_FEATURE (features->data);
|
|
|
|
|
|
|
|
if (GST_IS_ELEMENT_FACTORY (feature)) {
|
2004-03-15 19:27:17 +00:00
|
|
|
GstElementFactory *factory;
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
factory = GST_ELEMENT_FACTORY (feature);
|
|
|
|
g_print ("%s: %s: %s\n", plugin->desc.name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory), factory->details.longname);
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
#ifndef GST_DISABLE_INDEX
|
|
|
|
else if (GST_IS_INDEX_FACTORY (feature)) {
|
2004-03-15 19:27:17 +00:00
|
|
|
GstIndexFactory *factory;
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
factory = GST_INDEX_FACTORY (feature);
|
|
|
|
g_print ("%s: %s: %s\n", plugin->desc.name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
#endif
|
2003-10-28 20:25:30 +00:00
|
|
|
else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
|
2004-03-15 19:27:17 +00:00
|
|
|
GstTypeFindFactory *factory;
|
|
|
|
|
|
|
|
factory = GST_TYPE_FIND_FACTORY (feature);
|
|
|
|
if (factory->extensions) {
|
|
|
|
guint i = 0;
|
|
|
|
|
|
|
|
g_print ("%s type: ", plugin->desc.name);
|
|
|
|
while (factory->extensions[i]) {
|
|
|
|
g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
g_print ("%s type: N/A\n", plugin->desc.name);
|
2004-03-13 15:27:01 +00:00
|
|
|
} else {
|
2004-03-15 19:27:17 +00:00
|
|
|
g_print ("%s: %s (%s)\n", plugin->desc.name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (feature),
|
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
2003-02-20 23:07:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
features = g_list_next (features);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_plugin_info (GstPlugin * plugin)
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
GList *features;
|
|
|
|
gint num_features = 0;
|
|
|
|
gint num_elements = 0;
|
|
|
|
gint num_autoplug = 0;
|
|
|
|
gint num_types = 0;
|
|
|
|
gint num_indexes = 0;
|
|
|
|
gint num_other = 0;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
g_print ("Plugin Details:\n");
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print (" Name:\t\t%s\n", plugin->desc.name);
|
|
|
|
g_print (" Description:\t%s\n", plugin->desc.description);
|
|
|
|
g_print (" Filename:\t%s\n", plugin->filename);
|
|
|
|
g_print (" Version:\t%s\n", plugin->desc.version);
|
|
|
|
g_print (" License:\t%s\n", plugin->desc.license);
|
|
|
|
g_print (" Package:\t%s\n", plugin->desc.package);
|
|
|
|
g_print (" Origin URL:\t%s\n", plugin->desc.origin);
|
2003-02-20 23:07:01 +00:00
|
|
|
g_print ("\n");
|
|
|
|
|
2005-09-18 06:59:25 +00:00
|
|
|
features =
|
|
|
|
gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
|
|
|
|
plugin->desc.name);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
while (features) {
|
|
|
|
GstPluginFeature *feature;
|
|
|
|
|
|
|
|
feature = GST_PLUGIN_FEATURE (features->data);
|
|
|
|
|
|
|
|
if (GST_IS_ELEMENT_FACTORY (feature)) {
|
|
|
|
GstElementFactory *factory;
|
|
|
|
|
|
|
|
factory = GST_ELEMENT_FACTORY (feature);
|
|
|
|
g_print (" %s: %s\n", GST_OBJECT_NAME (factory),
|
2004-03-15 19:27:17 +00:00
|
|
|
factory->details.longname);
|
2003-02-20 23:07:01 +00:00
|
|
|
num_elements++;
|
|
|
|
}
|
|
|
|
#ifndef GST_DISABLE_INDEX
|
|
|
|
else if (GST_IS_INDEX_FACTORY (feature)) {
|
|
|
|
GstIndexFactory *factory;
|
|
|
|
|
|
|
|
factory = GST_INDEX_FACTORY (feature);
|
|
|
|
g_print (" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
|
|
|
|
num_indexes++;
|
|
|
|
}
|
|
|
|
#endif
|
2003-10-28 20:25:30 +00:00
|
|
|
else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
|
|
|
|
GstTypeFindFactory *factory;
|
|
|
|
|
|
|
|
factory = GST_TYPE_FIND_FACTORY (feature);
|
|
|
|
if (factory->extensions) {
|
2004-03-15 19:27:17 +00:00
|
|
|
guint i = 0;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
g_print ("%s type: ", plugin->desc.name);
|
|
|
|
while (factory->extensions[i]) {
|
|
|
|
g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
|
|
|
|
i++;
|
|
|
|
}
|
2003-10-28 20:25:30 +00:00
|
|
|
} else
|
2004-03-15 19:27:17 +00:00
|
|
|
g_print ("%s type: N/A\n", plugin->desc.name);
|
2003-02-20 23:07:01 +00:00
|
|
|
num_types++;
|
2004-03-13 15:27:01 +00:00
|
|
|
} else {
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
2004-03-15 19:27:17 +00:00
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
2003-02-20 23:07:01 +00:00
|
|
|
num_other++;
|
|
|
|
}
|
|
|
|
num_features++;
|
|
|
|
features = g_list_next (features);
|
|
|
|
}
|
|
|
|
g_print ("\n %d features:\n", num_features);
|
|
|
|
if (num_elements > 0)
|
|
|
|
g_print (" +-- %d elements\n", num_elements);
|
|
|
|
if (num_autoplug > 0)
|
|
|
|
g_print (" +-- %d autopluggers\n", num_autoplug);
|
|
|
|
if (num_types > 0)
|
|
|
|
g_print (" +-- %d types\n", num_types);
|
|
|
|
if (num_indexes > 0)
|
|
|
|
g_print (" +-- %d indexes\n", num_indexes);
|
|
|
|
if (num_other > 0)
|
|
|
|
g_print (" +-- %d other objects\n", num_other);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
2003-02-20 23:07:01 +00:00
|
|
|
{
|
|
|
|
GstElementFactory *factory;
|
|
|
|
GstPlugin *plugin;
|
|
|
|
gchar *so;
|
Merged in popt removal + GOption addition patch from Ronald, bug #169772.
Original commit message from CVS:
2005-10-10 Andy Wingo <wingo@pobox.com>
Merged in popt removal + GOption addition patch from Ronald, bug
#169772.
* docs/gst/gstreamer-sections.txt: Add STATE_(UN)LOCK_FULL, move
GstElement macros around, remove popt-related symbols, add goption
stuff.
* configure.ac: Remove popt checks, require GLib 2.6 for GOption.
* docs/gst/Makefile.am:
* docs/libs/Makefile.am: No POPT_CFLAGS.
* examples/manual/Makefile.am:
* docs/manual/basics-init.xml: Doc updates with an example.
* gst/gst.c: (gst_init_get_option_group), (gst_init_check),
(gst_init), (parse_one_option), (parse_goption_arg):
* gst/gst.h: Removed gst_init_with_popt_table and friends. Took a
bit of hand merging and debugging to get the GOption stuff working
tho.
* tests/Makefile.am:
* tools/Makefile.am:
* tools/gst-inspect.c: (main):
* tools/gst-launch.c: (main):
* tools/gst-run.c: (main):
* tools/gst-xmlinspect.c: (main): Thanks Ronald!
2005-10-10 15:53:59 +00:00
|
|
|
GOptionEntry options[] = {
|
|
|
|
{"gst-inspect-plugin", 'p', 0, G_OPTION_ARG_STRING,
|
2004-03-15 19:27:17 +00:00
|
|
|
"Show plugin details", NULL},
|
Merged in popt removal + GOption addition patch from Ronald, bug #169772.
Original commit message from CVS:
2005-10-10 Andy Wingo <wingo@pobox.com>
Merged in popt removal + GOption addition patch from Ronald, bug
#169772.
* docs/gst/gstreamer-sections.txt: Add STATE_(UN)LOCK_FULL, move
GstElement macros around, remove popt-related symbols, add goption
stuff.
* configure.ac: Remove popt checks, require GLib 2.6 for GOption.
* docs/gst/Makefile.am:
* docs/libs/Makefile.am: No POPT_CFLAGS.
* examples/manual/Makefile.am:
* docs/manual/basics-init.xml: Doc updates with an example.
* gst/gst.c: (gst_init_get_option_group), (gst_init_check),
(gst_init), (parse_one_option), (parse_goption_arg):
* gst/gst.h: Removed gst_init_with_popt_table and friends. Took a
bit of hand merging and debugging to get the GOption stuff working
tho.
* tests/Makefile.am:
* tools/Makefile.am:
* tools/gst-inspect.c: (main):
* tools/gst-launch.c: (main):
* tools/gst-run.c: (main):
* tools/gst-xmlinspect.c: (main): Thanks Ronald!
2005-10-10 15:53:59 +00:00
|
|
|
{"gst-inspect-scheduler", 's', 0, G_OPTION_ARG_STRING,
|
|
|
|
"Show scheduler details", NULL},
|
|
|
|
{NULL}
|
2003-02-20 23:07:01 +00:00
|
|
|
};
|
Merged in popt removal + GOption addition patch from Ronald, bug #169772.
Original commit message from CVS:
2005-10-10 Andy Wingo <wingo@pobox.com>
Merged in popt removal + GOption addition patch from Ronald, bug
#169772.
* docs/gst/gstreamer-sections.txt: Add STATE_(UN)LOCK_FULL, move
GstElement macros around, remove popt-related symbols, add goption
stuff.
* configure.ac: Remove popt checks, require GLib 2.6 for GOption.
* docs/gst/Makefile.am:
* docs/libs/Makefile.am: No POPT_CFLAGS.
* examples/manual/Makefile.am:
* docs/manual/basics-init.xml: Doc updates with an example.
* gst/gst.c: (gst_init_get_option_group), (gst_init_check),
(gst_init), (parse_one_option), (parse_goption_arg):
* gst/gst.h: Removed gst_init_with_popt_table and friends. Took a
bit of hand merging and debugging to get the GOption stuff working
tho.
* tests/Makefile.am:
* tools/Makefile.am:
* tools/gst-inspect.c: (main):
* tools/gst-launch.c: (main):
* tools/gst-run.c: (main):
* tools/gst-xmlinspect.c: (main): Thanks Ronald!
2005-10-10 15:53:59 +00:00
|
|
|
GOptionContext *ctx;
|
|
|
|
GError *err = NULL;
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2003-08-19 08:11:58 +00:00
|
|
|
setlocale (LC_ALL, "");
|
|
|
|
|
Merged in popt removal + GOption addition patch from Ronald, bug #169772.
Original commit message from CVS:
2005-10-10 Andy Wingo <wingo@pobox.com>
Merged in popt removal + GOption addition patch from Ronald, bug
#169772.
* docs/gst/gstreamer-sections.txt: Add STATE_(UN)LOCK_FULL, move
GstElement macros around, remove popt-related symbols, add goption
stuff.
* configure.ac: Remove popt checks, require GLib 2.6 for GOption.
* docs/gst/Makefile.am:
* docs/libs/Makefile.am: No POPT_CFLAGS.
* examples/manual/Makefile.am:
* docs/manual/basics-init.xml: Doc updates with an example.
* gst/gst.c: (gst_init_get_option_group), (gst_init_check),
(gst_init), (parse_one_option), (parse_goption_arg):
* gst/gst.h: Removed gst_init_with_popt_table and friends. Took a
bit of hand merging and debugging to get the GOption stuff working
tho.
* tests/Makefile.am:
* tools/Makefile.am:
* tools/gst-inspect.c: (main):
* tools/gst-launch.c: (main):
* tools/gst-run.c: (main):
* tools/gst-xmlinspect.c: (main): Thanks Ronald!
2005-10-10 15:53:59 +00:00
|
|
|
ctx = g_option_context_new ("gst-xmlinspect");
|
|
|
|
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
|
|
|
|
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
|
|
|
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
|
|
|
|
g_print ("Error initializing: %s\n", err->message);
|
|
|
|
exit (1);
|
|
|
|
}
|
2005-10-13 09:57:15 +00:00
|
|
|
g_option_context_free (ctx);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2003-02-20 23:07:01 +00:00
|
|
|
PUT_STRING (0, "<?xml version=\"1.0\"?>");
|
|
|
|
|
|
|
|
/* if no arguments, print out list of elements */
|
|
|
|
if (argc == 1) {
|
2004-03-13 15:27:01 +00:00
|
|
|
print_element_list ();
|
2003-02-20 23:07:01 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
/* else we try to get a factory */
|
2003-02-20 23:07:01 +00:00
|
|
|
} else {
|
|
|
|
/* first check for help */
|
|
|
|
if (strstr (argv[1], "-help")) {
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("Usage: %s\t\t\tList all registered elements\n", argv[0]);
|
|
|
|
g_print (" %s element-name\tShow element details\n", argv[0]);
|
2003-02-20 23:07:01 +00:00
|
|
|
g_print (" %s plugin-name[.so]\tShow information about plugin\n",
|
2004-03-15 19:27:17 +00:00
|
|
|
argv[0]);
|
2003-02-20 23:07:01 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* only search for a factory if there's not a '.so' */
|
2004-03-13 15:27:01 +00:00
|
|
|
if (!strstr (argv[1], ".so")) {
|
2003-02-20 23:07:01 +00:00
|
|
|
factory = gst_element_factory_find (argv[1]);
|
|
|
|
|
|
|
|
/* if there's a factory, print out the info */
|
|
|
|
if (factory)
|
2004-03-15 19:27:17 +00:00
|
|
|
return print_element_info (factory);
|
2003-02-20 23:07:01 +00:00
|
|
|
else {
|
2004-03-15 19:27:17 +00:00
|
|
|
GstPluginFeature *feature;
|
|
|
|
|
|
|
|
/* FIXME implement other pretty print function for these */
|
2003-02-20 23:07:01 +00:00
|
|
|
#ifndef GST_DISABLE_INDEX
|
2005-09-15 00:13:26 +00:00
|
|
|
feature = gst_default_registry_find_feature (argv[1],
|
2004-03-15 19:27:17 +00:00
|
|
|
GST_TYPE_INDEX_FACTORY);
|
|
|
|
if (feature) {
|
|
|
|
g_print ("%s: an index\n", argv[1]);
|
|
|
|
return 0;
|
|
|
|
}
|
2003-02-20 23:07:01 +00:00
|
|
|
#endif
|
2005-09-15 00:13:26 +00:00
|
|
|
feature = gst_default_registry_find_feature (argv[1],
|
2004-03-15 19:27:17 +00:00
|
|
|
GST_TYPE_TYPE_FIND_FACTORY);
|
|
|
|
if (feature) {
|
|
|
|
g_print ("%s: a type find function\n", argv[1]);
|
|
|
|
return 0;
|
|
|
|
}
|
2003-02-20 23:07:01 +00:00
|
|
|
#ifndef GST_DISABLE_URI
|
2005-09-15 00:13:26 +00:00
|
|
|
feature = gst_default_registry_find_feature (argv[1],
|
2004-03-15 19:27:17 +00:00
|
|
|
GST_TYPE_URI_HANDLER);
|
|
|
|
if (feature) {
|
|
|
|
g_print ("%s: an uri handler\n", argv[1]);
|
|
|
|
return 0;
|
|
|
|
}
|
2003-02-20 23:07:01 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/* strip the .so */
|
2004-03-13 15:27:01 +00:00
|
|
|
so = strstr (argv[1], ".so");
|
2003-02-20 23:07:01 +00:00
|
|
|
so[0] = '\0';
|
|
|
|
}
|
|
|
|
|
|
|
|
/* otherwise assume it's a plugin */
|
2005-09-15 00:13:26 +00:00
|
|
|
plugin = gst_default_registry_find_plugin (argv[1]);
|
2003-02-20 23:07:01 +00:00
|
|
|
|
|
|
|
/* if there is such a plugin, print out info */
|
|
|
|
|
|
|
|
if (plugin) {
|
|
|
|
print_plugin_info (plugin);
|
|
|
|
} else {
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print ("no such element or plugin '%s'\n", argv[1]);
|
2003-02-20 23:07:01 +00:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|