mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
Fixed bug #108514.
Original commit message from CVS: Fixed bug #108514.
This commit is contained in:
parent
17b8c5d004
commit
dabb6637bd
9 changed files with 637 additions and 587 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
|||
2003-03-16 Christian Meyer <chrisime@gnome.org>
|
||||
|
||||
* tools/gst-inspect.c
|
||||
(print_prop): Modified to make compile compile with the new introduced
|
||||
function.
|
||||
* tools/gst-xmlinspect.c
|
||||
(print_prop): ditto.
|
||||
|
||||
2003-03-16 Christian Meyer <chrisime@gnome.org>
|
||||
|
||||
* gst/gstprops.[ch]: Add function gst_props_get_type().
|
||||
* gst/gstprops.[ch], gst/gstutils.c, gst/registries/gstxmlregistry.c:
|
||||
- Rename gst_props_entry_get_type() -> gst_props_entry_get_props_type().
|
||||
- Add gst_props_entry_get_type() (returning the GType).
|
||||
* gst/gstcaps.[ch]: Add function gst_caps_get_type().
|
||||
|
||||
Applied patches from Martin Schulze.
|
||||
|
||||
2003-01-09 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* first pass at changing _connect/_disconnect -> _link/_unlink
|
||||
|
|
|
@ -90,6 +90,12 @@ _gst_caps_initialize (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
GType
|
||||
gst_caps_get_type (void)
|
||||
{
|
||||
return _gst_caps_type;
|
||||
}
|
||||
|
||||
static guint16
|
||||
get_type_for_mime (const gchar *mime)
|
||||
{
|
||||
|
|
|
@ -120,6 +120,7 @@ factoryname (void) \
|
|||
void _gst_caps_initialize (void);
|
||||
|
||||
/* creating new caps */
|
||||
GType gst_caps_get_type (void);
|
||||
GstCaps* gst_caps_new (const gchar *name, const gchar *mime, GstProps *props);
|
||||
GstCaps* gst_caps_new_id (const gchar *name, const guint16 id, GstProps *props);
|
||||
/* replace pointer to caps, doing proper refcounting */
|
||||
|
|
|
@ -119,7 +119,6 @@ transform_func (const GValue *src_value,
|
|||
g_string_free (result, FALSE);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_gst_props_initialize (void)
|
||||
{
|
||||
|
@ -363,6 +362,12 @@ gst_props_entry_destroy (GstPropsEntry *entry)
|
|||
#endif
|
||||
}
|
||||
|
||||
GType
|
||||
gst_props_get_type (void)
|
||||
{
|
||||
return _gst_props_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_props_empty_new:
|
||||
*
|
||||
|
@ -506,7 +511,6 @@ gst_props_new (const gchar *firstname, ...)
|
|||
return props;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gst_props_debug:
|
||||
* @props: the props to debug
|
||||
|
@ -636,6 +640,12 @@ gst_props_add_to_int_list (GList *entries, GstPropsEntry *newentry)
|
|||
return g_list_prepend (entries, newentry);
|
||||
}
|
||||
|
||||
GType
|
||||
gst_props_entry_get_type (void)
|
||||
{
|
||||
return _gst_props_entry_type;
|
||||
}
|
||||
|
||||
static GstPropsEntry*
|
||||
gst_props_entry_newv (const gchar *name, va_list var_args)
|
||||
{
|
||||
|
@ -1122,7 +1132,7 @@ gst_props_has_fixed_property (GstProps *props, const gchar *name)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_props_entry_get_type:
|
||||
* gst_props_entry_get_props_type:
|
||||
* @entry: the props entry to query
|
||||
*
|
||||
* Get the type of the given props entry.
|
||||
|
@ -1130,7 +1140,7 @@ gst_props_has_fixed_property (GstProps *props, const gchar *name)
|
|||
* Returns: The type of the props entry.
|
||||
*/
|
||||
GstPropsType
|
||||
gst_props_entry_get_type (const GstPropsEntry *entry)
|
||||
gst_props_entry_get_props_type (const GstPropsEntry *entry)
|
||||
{
|
||||
g_return_val_if_fail (entry != NULL, GST_PROPS_INVALID_TYPE);
|
||||
|
||||
|
@ -1465,8 +1475,7 @@ gst_props_entry_check_list_compatibility (GstPropsEntry *entry1, GstPropsEntry *
|
|||
static gboolean
|
||||
gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry2)
|
||||
{
|
||||
GST_DEBUG (GST_CAT_PROPERTIES,"compare: %s %s", g_quark_to_string (entry1->propid),
|
||||
g_quark_to_string (entry2->propid));
|
||||
GST_DEBUG (GST_CAT_PROPERTIES,"compare: %s %s", g_quark_to_string (entry1->propid), g_quark_to_string (entry2->propid));
|
||||
|
||||
if (entry2->propstype == GST_PROPS_LIST_TYPE && entry1->propstype != GST_PROPS_LIST_TYPE) {
|
||||
return gst_props_entry_check_list_compatibility (entry1, entry2);
|
||||
|
|
|
@ -115,6 +115,7 @@ struct _GstProps {
|
|||
void _gst_props_initialize (void);
|
||||
|
||||
/* creating new properties */
|
||||
GType gst_props_get_type (void);
|
||||
GstProps* gst_props_new (const gchar *firstname, ...);
|
||||
GstProps* gst_props_newv (const gchar *firstname, va_list var_args);
|
||||
GstProps* gst_props_empty_new (void);
|
||||
|
@ -161,11 +162,12 @@ void gst_props_remove_entry (GstProps *props, GstPropsEntry *entry);
|
|||
void gst_props_remove_entry_by_name (GstProps *props, const gchar *name);
|
||||
|
||||
/* working with props entries */
|
||||
GType gst_props_entry_get_type (void);
|
||||
GstPropsEntry* gst_props_entry_new (const gchar *name, ...);
|
||||
|
||||
void gst_props_entry_destroy (GstPropsEntry *entry);
|
||||
GstPropsEntry* gst_props_entry_copy (const GstPropsEntry *entry);
|
||||
GstPropsType gst_props_entry_get_type (const GstPropsEntry *entry);
|
||||
GstPropsType gst_props_entry_get_props_type (const GstPropsEntry *entry);
|
||||
const gchar* gst_props_entry_get_name (const GstPropsEntry *entry);
|
||||
gboolean gst_props_entry_is_fixed (const GstPropsEntry *entry);
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ gst_print_props (GString *buf, gint indent, GList *props, gboolean showname)
|
|||
string_append_indent (buf, 2 + width - strlen (name));
|
||||
}
|
||||
|
||||
type = gst_props_entry_get_type (prop);
|
||||
type = gst_props_entry_get_props_type (prop);
|
||||
switch (type) {
|
||||
case GST_PROPS_INT_TYPE:
|
||||
{
|
||||
|
|
|
@ -1286,7 +1286,7 @@ gst_xml_registry_save_props_func (GstPropsEntry *entry,
|
|||
|
||||
name = gst_props_entry_get_name (entry);
|
||||
|
||||
switch (gst_props_entry_get_type (entry)) {
|
||||
switch (gst_props_entry_get_props_type (entry)) {
|
||||
case GST_PROPS_INT_TYPE:
|
||||
{
|
||||
gint value;
|
||||
|
@ -1338,7 +1338,7 @@ gst_xml_registry_save_props_func (GstPropsEntry *entry,
|
|||
break;
|
||||
}
|
||||
default:
|
||||
g_warning ("trying to save unknown property type %d", gst_props_entry_get_type (entry));
|
||||
g_warning ("trying to save unknown property type %d", gst_props_entry_get_props_type (entry));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -1354,7 +1354,7 @@ gst_xml_registry_save_props (GstXMLRegistry *xmlregistry, GstProps *props)
|
|||
while (proplist) {
|
||||
GstPropsEntry *entry = (GstPropsEntry *) proplist->data;
|
||||
|
||||
switch (gst_props_entry_get_type (entry)) {
|
||||
switch (gst_props_entry_get_props_type (entry)) {
|
||||
case GST_PROPS_LIST_TYPE:
|
||||
{
|
||||
const GList *list;
|
||||
|
|
|
@ -12,7 +12,7 @@ print_prop (GstPropsEntry *prop, gboolean showname, const gchar *pfx)
|
|||
else
|
||||
g_print(pfx);
|
||||
|
||||
type = gst_props_entry_get_type (prop);
|
||||
type = gst_props_entry_get_props_type (prop);
|
||||
|
||||
switch (type) {
|
||||
case GST_PROPS_INT_TYPE:
|
||||
|
@ -63,9 +63,9 @@ print_prop (GstPropsEntry *prop, gboolean showname, const gchar *pfx)
|
|||
gst_props_entry_get_fourcc_int (prop, &val);
|
||||
g_print("FourCC: '%c%c%c%c'\n",
|
||||
(gchar)( val & 0xff),
|
||||
(gchar)((val >> 8) & 0xff),
|
||||
(gchar)((val >> 8) & 0xff),
|
||||
(gchar)((val >> 16) & 0xff),
|
||||
(gchar)((val >> 24) & 0xff));
|
||||
(gchar)((val >> 24) & 0xff));
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_LIST_TYPE:
|
||||
|
@ -142,7 +142,7 @@ print_formats (const GstFormat *formats)
|
|||
definition = gst_format_get_details (*formats);
|
||||
if (definition)
|
||||
g_print ("\t\t(%d):\t%s (%s)\n", *formats,
|
||||
definition->nick, definition->description);
|
||||
definition->nick, definition->description);
|
||||
else
|
||||
g_print ("\t\t(%d):\tUnknown format\n", *formats);
|
||||
|
||||
|
@ -159,7 +159,7 @@ print_query_types (const GstQueryType *types)
|
|||
definition = gst_query_type_get_details (*types);
|
||||
if (definition)
|
||||
g_print ("\t\t(%d):\t%s (%s)\n", *types,
|
||||
definition->nick, definition->description);
|
||||
definition->nick, definition->description);
|
||||
else
|
||||
g_print ("\t\t(%d):\tUnknown query format\n", *types);
|
||||
|
||||
|
@ -186,8 +186,8 @@ print_event_masks (const GstEventMask *masks)
|
|||
switch (masks->type) {
|
||||
case GST_EVENT_SEEK:
|
||||
flags = masks->flags;
|
||||
event_flags = gst_seek_type_get_type ();
|
||||
flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
|
||||
event_flags = gst_seek_type_get_type ();
|
||||
flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -202,9 +202,9 @@ print_event_masks (const GstEventMask *masks)
|
|||
if (flags & 1) {
|
||||
value = g_flags_get_first_value (flags_class, 1 << index);
|
||||
|
||||
if (value)
|
||||
if (value)
|
||||
g_print ("| %s ", value->value_nick);
|
||||
else
|
||||
else
|
||||
g_print ("| ? ");
|
||||
}
|
||||
flags >>= 1;
|
||||
|
@ -251,7 +251,7 @@ print_element_properties (GstElement *element)
|
|||
|
||||
|
||||
property_specs = g_object_class_list_properties
|
||||
(G_OBJECT_GET_CLASS (element), &num_properties);
|
||||
(G_OBJECT_GET_CLASS (element), &num_properties);
|
||||
g_print("\nElement Arguments:\n");
|
||||
|
||||
for (i = 0; i < num_properties; i++) {
|
||||
|
@ -266,165 +266,167 @@ print_element_properties (GstElement *element)
|
|||
}
|
||||
|
||||
g_print(" %-20s: %s\n", g_param_spec_get_name (param),
|
||||
g_param_spec_get_blurb (param));
|
||||
g_param_spec_get_blurb (param));
|
||||
|
||||
switch (G_VALUE_TYPE (&value)) {
|
||||
case G_TYPE_STRING:
|
||||
g_print ("%-23.23s String. ", "");
|
||||
if (readable) g_print ("(Default \"%s\")", g_value_get_string (&value));
|
||||
break;
|
||||
g_print ("%-23.23s String. ", "");
|
||||
if (readable) g_print ("(Default \"%s\")", g_value_get_string (&value));
|
||||
break;
|
||||
case G_TYPE_BOOLEAN:
|
||||
g_print ("%-23.23s Boolean. ", "");
|
||||
if (readable) g_print ("(Default %s)", (g_value_get_boolean (&value) ? "true" : "false"));
|
||||
break;
|
||||
g_print ("%-23.23s Boolean. ", "");
|
||||
if (readable) g_print ("(Default %s)", (g_value_get_boolean (&value) ? "true" : "false"));
|
||||
break;
|
||||
case G_TYPE_ULONG:
|
||||
{
|
||||
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
|
||||
g_print("%-23.23s Unsigned Long. ", "");
|
||||
if (readable) g_print("Range: %lu - %lu (Default %lu)",
|
||||
pulong->minimum, pulong->maximum, g_value_get_ulong (&value));
|
||||
break;
|
||||
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
|
||||
g_print("%-23.23s Unsigned Long. ", "");
|
||||
if (readable) g_print("Range: %lu - %lu (Default %lu)",
|
||||
pulong->minimum, pulong->maximum, g_value_get_ulong (&value));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_LONG:
|
||||
{
|
||||
GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
|
||||
g_print("%-23.23s Long. ", "");
|
||||
if (readable) g_print("Range: %ld - %ld (Default %ld)",
|
||||
plong->minimum, plong->maximum, g_value_get_long (&value));
|
||||
break;
|
||||
GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
|
||||
g_print("%-23.23s Long. ", "");
|
||||
if (readable) g_print("Range: %ld - %ld (Default %ld)",
|
||||
plong->minimum, plong->maximum, g_value_get_long (&value));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_UINT:
|
||||
{
|
||||
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
|
||||
g_print("%-23.23s Unsigned Integer. ", "");
|
||||
if (readable) g_print("Range: %u - %u (Default %u)",
|
||||
puint->minimum, puint->maximum, g_value_get_uint (&value));
|
||||
break;
|
||||
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
|
||||
g_print("%-23.23s Unsigned Integer. ", "");
|
||||
if (readable) g_print("Range: %u - %u (Default %u)",
|
||||
puint->minimum, puint->maximum, g_value_get_uint (&value));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_INT:
|
||||
{
|
||||
GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
|
||||
g_print("%-23.23s Integer. ", "");
|
||||
if (readable) g_print("Range: %d - %d (Default %d)",
|
||||
pint->minimum, pint->maximum, g_value_get_int (&value));
|
||||
break;
|
||||
GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
|
||||
g_print("%-23.23s Integer. ", "");
|
||||
if (readable) g_print("Range: %d - %d (Default %d)",
|
||||
pint->minimum, pint->maximum, g_value_get_int (&value));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_UINT64:
|
||||
{
|
||||
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
|
||||
g_print("%-23.23s Unsigned Integer64. ", "");
|
||||
if (readable) g_print("Range: %" G_GUINT64_FORMAT " - %" G_GUINT64_FORMAT " (Default %" G_GUINT64_FORMAT ")",
|
||||
puint64->minimum, puint64->maximum, g_value_get_uint64 (&value));
|
||||
break;
|
||||
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
|
||||
g_print("%-23.23s Unsigned Integer64. ", "");
|
||||
if (readable) g_print("Range: %" G_GUINT64_FORMAT " - %"
|
||||
G_GUINT64_FORMAT " (Default %" G_GUINT64_FORMAT ")",
|
||||
puint64->minimum, puint64->maximum,
|
||||
g_value_get_uint64 (&value));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_INT64:
|
||||
{
|
||||
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
|
||||
g_print("%-23.23s Integer64. ", "");
|
||||
if (readable) g_print("Range: %" G_GINT64_FORMAT " - %" G_GINT64_FORMAT " (Default %" G_GINT64_FORMAT ")",
|
||||
pint64->minimum, pint64->maximum, g_value_get_int64 (&value));
|
||||
break;
|
||||
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
|
||||
g_print("%-23.23s Integer64. ", "");
|
||||
if (readable) g_print("Range: %" G_GINT64_FORMAT " - %" G_GINT64_FORMAT " (Default %" G_GINT64_FORMAT ")", pint64->minimum,
|
||||
pint64->maximum, g_value_get_int64 (&value));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_FLOAT:
|
||||
{
|
||||
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
|
||||
g_print("%-23.23s Float. Default: %-8.8s %15.7g\n", "", "",
|
||||
g_value_get_float (&value));
|
||||
g_print("%-23.23s Range: %15.7g - %15.7g", "",
|
||||
pfloat->minimum, pfloat->maximum);
|
||||
break;
|
||||
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
|
||||
g_print("%-23.23s Float. Default: %-8.8s %15.7g\n", "", "",
|
||||
g_value_get_float (&value));
|
||||
g_print("%-23.23s Range: %15.7g - %15.7g", "",
|
||||
pfloat->minimum, pfloat->maximum);
|
||||
break;
|
||||
}
|
||||
case G_TYPE_DOUBLE:
|
||||
{
|
||||
GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
|
||||
g_print("%-23.23s Double. Default: %-8.8s %15.7g\n", "", "",
|
||||
g_value_get_double (&value));
|
||||
g_print("%-23.23s Range: %15.7g - %15.7g", "",
|
||||
pdouble->minimum, pdouble->maximum);
|
||||
break;
|
||||
GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
|
||||
g_print("%-23.23s Double. Default: %-8.8s %15.7g\n", "", "",
|
||||
g_value_get_double (&value));
|
||||
g_print("%-23.23s Range: %15.7g - %15.7g", "",
|
||||
pdouble->minimum, pdouble->maximum);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (param->value_type == GST_TYPE_URI) {
|
||||
g_print("%-23.23s URI", "");
|
||||
}
|
||||
}
|
||||
if (param->value_type == GST_TYPE_CAPS) {
|
||||
GstCaps *caps = g_value_peek_pointer (&value);
|
||||
|
||||
if (!caps)
|
||||
if (!caps)
|
||||
g_print("%-23.23s Caps (NULL)", "");
|
||||
else {
|
||||
else {
|
||||
print_caps (caps, " ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_ENUM (param)) {
|
||||
GEnumValue *values;
|
||||
guint j = 0;
|
||||
gint enum_value;
|
||||
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);
|
||||
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++;
|
||||
}
|
||||
while (values[j].value_name) {
|
||||
if (values[j].value == enum_value)
|
||||
break;
|
||||
j++;
|
||||
}
|
||||
|
||||
g_print ("%-23.23s Enum \"%s\" (default %d, \"%s\")", "",
|
||||
g_type_name (G_VALUE_TYPE (&value)),
|
||||
enum_value, values[j].value_nick);
|
||||
g_type_name (G_VALUE_TYPE (&value)),
|
||||
enum_value, values[j].value_nick);
|
||||
|
||||
j = 0;
|
||||
while (values[j].value_name) {
|
||||
j = 0;
|
||||
while (values[j].value_name) {
|
||||
g_print("\n%-23.23s (%d): \t%s", "",
|
||||
values[j].value, values[j].value_nick);
|
||||
j++;
|
||||
}
|
||||
/* g_type_class_unref (ec); */
|
||||
}
|
||||
values[j].value, values[j].value_nick);
|
||||
j++;
|
||||
}
|
||||
/* g_type_class_unref (ec); */
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_FLAGS (param)) {
|
||||
GFlagsValue *values;
|
||||
guint j = 0;
|
||||
gint flags_value;
|
||||
GString *flags = NULL;
|
||||
guint j = 0;
|
||||
gint flags_value;
|
||||
GString *flags = NULL;
|
||||
|
||||
values = G_FLAGS_CLASS (g_type_class_ref (param->value_type))->values;
|
||||
flags_value = g_value_get_flags (&value);
|
||||
values = G_FLAGS_CLASS (g_type_class_ref (param->value_type))->values;
|
||||
flags_value = g_value_get_flags (&value);
|
||||
|
||||
while (values[j].value_name) {
|
||||
if (values[j].value & flags_value) {
|
||||
if (flags) {
|
||||
g_string_append_printf (flags, " | %s", values[j].value_nick);
|
||||
}
|
||||
else {
|
||||
flags = g_string_new (values[j].value_nick);
|
||||
}
|
||||
}
|
||||
j++;
|
||||
}
|
||||
while (values[j].value_name) {
|
||||
if (values[j].value & flags_value) {
|
||||
if (flags) {
|
||||
g_string_append_printf (flags, " | %s", values[j].value_nick);
|
||||
}
|
||||
else {
|
||||
flags = g_string_new (values[j].value_nick);
|
||||
}
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
g_print ("%-23.23s Flags \"%s\" (default %d, \"%s\")", "",
|
||||
g_type_name (G_VALUE_TYPE (&value)),
|
||||
flags_value, (flags ? flags->str : "(none)"));
|
||||
g_print("%-23.23s Flags \"%s\" (default %d, \"%s\")", "",
|
||||
g_type_name (G_VALUE_TYPE (&value)),
|
||||
flags_value, (flags ? flags->str : "(none)"));
|
||||
|
||||
j = 0;
|
||||
while (values[j].value_name) {
|
||||
j = 0;
|
||||
while (values[j].value_name) {
|
||||
g_print("\n%-23.23s (%d): \t%s", "",
|
||||
values[j].value, values[j].value_nick);
|
||||
j++;
|
||||
}
|
||||
values[j].value, values[j].value_nick);
|
||||
j++;
|
||||
}
|
||||
|
||||
if (flags)
|
||||
g_string_free (flags, TRUE);
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_OBJECT (param)) {
|
||||
g_print("%-23.23s Object of type \"%s\"", "",
|
||||
g_type_name(param->value_type));
|
||||
if (flags)
|
||||
g_string_free (flags, TRUE);
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_OBJECT (param)) {
|
||||
g_print("%-23.23s Object of type \"%s\"", "",
|
||||
g_type_name(param->value_type));
|
||||
}
|
||||
else {
|
||||
g_print ("%-23.23s Unknown type %ld \"%s\"", "", param->value_type,
|
||||
g_type_name(param->value_type));
|
||||
}
|
||||
else {
|
||||
g_print ("%-23.23s Unknown type %ld \"%s\"", "",param->value_type,
|
||||
g_type_name(param->value_type));
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (!readable)
|
||||
|
@ -500,7 +502,7 @@ print_element_info (GstElementFactory *factory)
|
|||
|
||||
if (padtemplate->caps) {
|
||||
g_print (" Capabilities:\n");
|
||||
print_caps (padtemplate->caps, " ");
|
||||
print_caps (padtemplate->caps, " ");
|
||||
}
|
||||
|
||||
g_print ("\n");
|
||||
|
@ -554,7 +556,7 @@ print_element_info (GstElementFactory *factory)
|
|||
|
||||
if (element->loopfunc)
|
||||
g_print (" loopfunc()-based element: %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (element->loopfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (element->loopfunc));
|
||||
else
|
||||
g_print (" No loopfunc(), must be chain-based or not configured yet\n");
|
||||
|
||||
|
@ -622,47 +624,47 @@ print_element_info (GstElementFactory *factory)
|
|||
g_print (" Implementation:\n");
|
||||
if (realpad->chainfunc)
|
||||
g_print (" Has chainfunc(): %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->chainfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->chainfunc));
|
||||
if (realpad->getfunc)
|
||||
g_print (" Has getfunc(): %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->getfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->getfunc));
|
||||
if (realpad->formatsfunc != gst_pad_get_formats_default) {
|
||||
g_print (" Supports seeking/conversion/query formats:\n");
|
||||
print_formats (gst_pad_get_formats (GST_PAD (realpad)));
|
||||
print_formats (gst_pad_get_formats (GST_PAD (realpad)));
|
||||
}
|
||||
if (realpad->convertfunc != gst_pad_convert_default)
|
||||
g_print (" Has custom convertfunc(): %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->convertfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->convertfunc));
|
||||
if (realpad->eventfunc != gst_pad_event_default)
|
||||
g_print (" Has custom eventfunc(): %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->eventfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->eventfunc));
|
||||
if (realpad->eventmaskfunc != gst_pad_get_event_masks_default) {
|
||||
g_print (" Provides event masks:\n");
|
||||
print_event_masks (gst_pad_get_event_masks (GST_PAD (realpad)));
|
||||
print_event_masks (gst_pad_get_event_masks (GST_PAD (realpad)));
|
||||
}
|
||||
if (realpad->queryfunc != gst_pad_query_default)
|
||||
g_print (" Has custom queryfunc(): %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->queryfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->queryfunc));
|
||||
if (realpad->querytypefunc != gst_pad_get_query_types_default) {
|
||||
g_print (" Provides query types:\n");
|
||||
print_query_types (gst_pad_get_query_types (GST_PAD (realpad)));
|
||||
print_query_types (gst_pad_get_query_types (GST_PAD (realpad)));
|
||||
}
|
||||
|
||||
if (realpad->intlinkfunc != gst_pad_get_internal_links_default)
|
||||
g_print (" Has custom intconnfunc(): %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->intlinkfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->intlinkfunc));
|
||||
|
||||
if (realpad->bufferpoolfunc)
|
||||
g_print (" Has bufferpoolfunc(): %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->bufferpoolfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->bufferpoolfunc));
|
||||
|
||||
if (pad->padtemplate)
|
||||
g_print (" Pad Template: '%s'\n",
|
||||
pad->padtemplate->name_template);
|
||||
pad->padtemplate->name_template);
|
||||
|
||||
if (realpad->caps) {
|
||||
g_print (" Capabilities:\n");
|
||||
print_caps (realpad->caps, " ");
|
||||
print_caps (realpad->caps, " ");
|
||||
}
|
||||
}
|
||||
} else
|
||||
|
@ -684,7 +686,8 @@ print_element_info (GstElementFactory *factory)
|
|||
|
||||
switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) {
|
||||
case G_TYPE_INT64:
|
||||
g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %" G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")",
|
||||
g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %"
|
||||
G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")",
|
||||
((GParamSpecInt64 *) specs[x])->default_value,
|
||||
((GParamSpecInt64 *) specs[x])->minimum,
|
||||
((GParamSpecInt64 *) specs[x])->maximum);
|
||||
|
@ -696,9 +699,9 @@ print_element_info (GstElementFactory *factory)
|
|||
((GParamSpecInt *) specs[x])->maximum);
|
||||
break;
|
||||
case G_TYPE_FLOAT:
|
||||
g_print ("Float. Default: %-8.8s %15.7g\n", "",
|
||||
g_print ("Float. Default: %-8.8s %15.7g\n", "",
|
||||
((GParamSpecFloat *) specs[x])->default_value);
|
||||
g_print ("%-23.23s Range: %15.7g - %15.7g", "",
|
||||
g_print ("%-23.23s Range: %15.7g - %15.7g", "",
|
||||
((GParamSpecFloat *) specs[x])->minimum,
|
||||
((GParamSpecFloat *) specs[x])->maximum);
|
||||
break;
|
||||
|
@ -738,26 +741,26 @@ print_element_info (GstElementFactory *factory)
|
|||
query = g_new0 (GSignalQuery,1);
|
||||
g_signal_query (signals[i], query);
|
||||
|
||||
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
||||
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION))) {
|
||||
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
||||
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION))) {
|
||||
n_params = query->n_params;
|
||||
return_type = query->return_type;
|
||||
param_types = query->param_types;
|
||||
|
||||
g_print (" \"%s\" :\t %s user_function (%s* object",
|
||||
query->signal_name, g_type_name (return_type),
|
||||
g_type_name (G_OBJECT_TYPE (element)));
|
||||
query->signal_name, g_type_name (return_type),
|
||||
g_type_name (G_OBJECT_TYPE (element)));
|
||||
|
||||
for (j = 0; j < n_params; j++) {
|
||||
g_print (",\n \t\t\t\t%s arg%d", g_type_name (param_types[j]), j);
|
||||
g_print (",\n \t\t\t\t%s arg%d", g_type_name(param_types[j]), j);
|
||||
}
|
||||
if (k == 0)
|
||||
if (k == 0)
|
||||
g_print (",\n \t\t\t\tgpointer user_data);\n");
|
||||
else
|
||||
else
|
||||
g_print (");\n");
|
||||
|
||||
counted++;
|
||||
}
|
||||
counted++;
|
||||
}
|
||||
|
||||
g_free (query);
|
||||
}
|
||||
|
@ -765,7 +768,6 @@ print_element_info (GstElementFactory *factory)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* for compound elements */
|
||||
if (GST_IS_BIN (element)) {
|
||||
g_print ("\nChildren:\n");
|
||||
|
@ -809,7 +811,7 @@ print_element_list (void)
|
|||
|
||||
factory = GST_ELEMENT_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory) ,factory->details->longname);
|
||||
GST_PLUGIN_FEATURE_NAME (factory) ,factory->details->longname);
|
||||
}
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
else if (GST_IS_AUTOPLUG_FACTORY (feature)) {
|
||||
|
@ -817,7 +819,7 @@ print_element_list (void)
|
|||
|
||||
factory = GST_AUTOPLUG_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
}
|
||||
#endif
|
||||
#ifndef GST_DISABLE_INDEX
|
||||
|
@ -826,7 +828,7 @@ print_element_list (void)
|
|||
|
||||
factory = GST_INDEX_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
}
|
||||
#endif
|
||||
else if (GST_IS_TYPE_FACTORY (feature)) {
|
||||
|
@ -834,33 +836,33 @@ print_element_list (void)
|
|||
|
||||
factory = GST_TYPE_FACTORY (feature);
|
||||
g_print ("%s type: %s: %s\n", plugin->name,
|
||||
factory->mime, factory->exts);
|
||||
factory->mime, factory->exts);
|
||||
|
||||
if (factory->typefindfunc)
|
||||
g_print (" Has typefind function: %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
}
|
||||
else if (GST_IS_SCHEDULER_FACTORY (feature)) {
|
||||
GstSchedulerFactory *factory;
|
||||
|
||||
factory = GST_SCHEDULER_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
}
|
||||
#ifndef GST_DISABLE_URI
|
||||
else if (GST_IS_URI_HANDLER (feature)) {
|
||||
GstURIHandler *handler;
|
||||
|
||||
handler = GST_URI_HANDLER (feature);
|
||||
g_print ("%s: %s: \"%s\" (%s) element \"%s\" property \"%s\"\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (handler), handler->uri, handler->longdesc,
|
||||
handler->element, handler->property);
|
||||
g_print ("%s: %s: \"%s\" (%s) element \"%s\" property \"%s\"\n",
|
||||
plugin->name, GST_PLUGIN_FEATURE_NAME (handler), handler->uri,
|
||||
handler->longdesc, handler->element, handler->property);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
g_print ("%s: %s (%s)\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (feature),
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
GST_PLUGIN_FEATURE_NAME (feature),
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
}
|
||||
|
||||
features = g_list_next (features);
|
||||
|
@ -898,7 +900,7 @@ print_plugin_info (GstPlugin *plugin)
|
|||
|
||||
factory = GST_ELEMENT_FACTORY (feature);
|
||||
g_print (" %s: %s\n", GST_OBJECT_NAME (factory),
|
||||
factory->details->longname);
|
||||
factory->details->longname);
|
||||
num_elements++;
|
||||
}
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
|
@ -927,7 +929,7 @@ print_plugin_info (GstPlugin *plugin)
|
|||
|
||||
if (factory->typefindfunc)
|
||||
g_print (" Has typefind function: %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
num_types++;
|
||||
}
|
||||
else if (GST_IS_SCHEDULER_FACTORY (feature)) {
|
||||
|
@ -939,7 +941,7 @@ print_plugin_info (GstPlugin *plugin)
|
|||
}
|
||||
else {
|
||||
g_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
num_other++;
|
||||
}
|
||||
num_features++;
|
||||
|
@ -962,7 +964,6 @@ print_plugin_info (GstPlugin *plugin)
|
|||
g_print ("\n");
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
|
@ -970,10 +971,10 @@ main (int argc, char *argv[])
|
|||
GstPlugin *plugin;
|
||||
gchar *so;
|
||||
struct poptOption options[] = {
|
||||
{"gst-inspect-plugin", 'p', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show plugin details", NULL},
|
||||
{"gst-inspect-scheduler", 's', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show scheduler details", NULL},
|
||||
{"gst-inspect-plugin", 'p', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show plugin details", NULL},
|
||||
{"gst-inspect-scheduler", 's', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show scheduler details", NULL},
|
||||
POPT_TABLEEND
|
||||
};
|
||||
|
||||
|
@ -991,7 +992,7 @@ main (int argc, char *argv[])
|
|||
g_print ("Usage: %s\t\t\tList all registered elements\n",argv[0]);
|
||||
g_print (" %s element-name\tShow element details\n",argv[0]);
|
||||
g_print (" %s plugin-name[.so]\tShow information about plugin\n",
|
||||
argv[0]);
|
||||
argv[0]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1003,39 +1004,44 @@ main (int argc, char *argv[])
|
|||
if (factory)
|
||||
return print_element_info (factory);
|
||||
else {
|
||||
GstPluginFeature* feature;
|
||||
GstPluginFeature* feature;
|
||||
|
||||
/* FIXME implement other pretty print function for these */
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_SCHEDULER_FACTORY);
|
||||
if (feature) {
|
||||
/* FIXME implement other pretty print function for these */
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_SCHEDULER_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: a scheduler\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_INDEX
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_INDEX_FACTORY);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_INDEX_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an index\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_AUTOPLUG_FACTORY);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_AUTOPLUG_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an autoplugger\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_TYPE_FACTORY);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_TYPE_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an type\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_URI
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_URI_HANDLER);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_URI_HANDLER);
|
||||
if (feature) {
|
||||
g_print ("%s: an uri handler\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
#include <gst/control/control.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PUT_START_TAG(pfx,tag) \
|
||||
#define PUT_START_TAG(pfx,tag) \
|
||||
G_STMT_START{ \
|
||||
g_print ("%*.*s<%s>\n", pfx, pfx, "", tag); \
|
||||
g_print ("%*.*s<%s>\n", pfx, pfx, "", tag); \
|
||||
}G_STMT_END
|
||||
|
||||
#define PUT_END_TAG(pfx,tag) \
|
||||
#define PUT_END_TAG(pfx,tag) \
|
||||
G_STMT_START{ \
|
||||
g_print ("%*.*s</%s>\n", pfx, pfx, "", tag); \
|
||||
g_print ("%*.*s</%s>\n", pfx, pfx, "", tag); \
|
||||
}G_STMT_END
|
||||
|
||||
#define PUT_ESCAPED(pfx,tag,value) \
|
||||
|
@ -17,14 +17,14 @@ G_STMT_START{ \
|
|||
const gchar *toconv = value; \
|
||||
if (value) { \
|
||||
gchar *v = g_markup_escape_text (toconv, strlen (toconv)); \
|
||||
g_print ("%*.*s<%s>%s</%s>\n", pfx, pfx, "", tag, v, tag); \
|
||||
g_print ("%*.*s<%s>%s</%s>\n", pfx, pfx, "", tag, v, tag); \
|
||||
g_free (v); \
|
||||
} \
|
||||
}G_STMT_END
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#define PUT_STRING(pfx, ...) \
|
||||
#define PUT_STRING(pfx, ...) \
|
||||
G_STMT_START{ \
|
||||
gchar *ps_val = g_strdup_printf(__VA_ARGS__); \
|
||||
g_print ("%*.*s%s\n", pfx, pfx, "", ps_val); \
|
||||
|
@ -33,9 +33,9 @@ G_STMT_START{ \
|
|||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#define PUT_STRING(pfx, str, a...) \
|
||||
#define PUT_STRING(pfx, str, a...) \
|
||||
G_STMT_START{ \
|
||||
g_print ("%*.*s"str"\n", pfx, pfx, "", ##a); \
|
||||
g_print ("%*.*s"str"\n", pfx, pfx, "", ##a); \
|
||||
}G_STMT_END
|
||||
|
||||
#endif
|
||||
|
@ -45,14 +45,15 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
{
|
||||
GstPropsType type;
|
||||
|
||||
type = gst_props_entry_get_type (prop);
|
||||
type = gst_props_entry_get_props_type (prop);
|
||||
|
||||
switch (type) {
|
||||
case GST_PROPS_INT_TYPE:
|
||||
{
|
||||
gint val;
|
||||
gst_props_entry_get_int (prop, &val);
|
||||
PUT_STRING (pfx, "<int name=\"%s\" value=\"%d\"/>", gst_props_entry_get_name (prop), val);
|
||||
PUT_STRING (pfx, "<int name=\"%s\" value=\"%d\"/>",
|
||||
gst_props_entry_get_name (prop), val);
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_INT_RANGE_TYPE:
|
||||
|
@ -60,14 +61,15 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
gint min, max;
|
||||
gst_props_entry_get_int_range (prop, &min, &max);
|
||||
PUT_STRING (pfx, "<range name=\"%s\" min=\"%d\" max=\"%d\"/>",
|
||||
gst_props_entry_get_name (prop), min, max);
|
||||
gst_props_entry_get_name (prop), min, max);
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_FLOAT_TYPE:
|
||||
{
|
||||
gfloat val;
|
||||
gst_props_entry_get_float (prop, &val);
|
||||
PUT_STRING (pfx, "<float name=\"%s\" value=\"%f\"/>", gst_props_entry_get_name (prop), val);
|
||||
PUT_STRING (pfx, "<float name=\"%s\" value=\"%f\"/>",
|
||||
gst_props_entry_get_name (prop), val);
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_FLOAT_RANGE_TYPE:
|
||||
|
@ -75,7 +77,7 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
gfloat min, max;
|
||||
gst_props_entry_get_float_range (prop, &min, &max);
|
||||
PUT_STRING (pfx, "<floatrange name=\"%s\" min=\"%f\" max=\"%f\"/>",
|
||||
gst_props_entry_get_name (prop), min, max);
|
||||
gst_props_entry_get_name (prop), min, max);
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_BOOLEAN_TYPE:
|
||||
|
@ -83,14 +85,15 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
gboolean val;
|
||||
gst_props_entry_get_boolean (prop, &val);
|
||||
PUT_STRING (pfx, "<boolean name=\"%s\" value=\"%s\"/>",
|
||||
gst_props_entry_get_name (prop), val ? "true" : "false");
|
||||
gst_props_entry_get_name (prop), val ? "true" : "false");
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_STRING_TYPE:
|
||||
{
|
||||
const gchar *val;
|
||||
gst_props_entry_get_string (prop, &val);
|
||||
PUT_STRING (pfx, "<string name=\"%s\" value=\"%s\"/>", gst_props_entry_get_name (prop), val);
|
||||
PUT_STRING (pfx, "<string name=\"%s\" value=\"%s\"/>",
|
||||
gst_props_entry_get_name (prop), val);
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_FOURCC_TYPE:
|
||||
|
@ -99,10 +102,11 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
gst_props_entry_get_fourcc_int (prop, &val);
|
||||
PUT_STRING (pfx, "<!--%c%c%c%c-->",
|
||||
(gchar)( val & 0xff),
|
||||
(gchar)((val >> 8) & 0xff),
|
||||
(gchar)((val >> 8) & 0xff),
|
||||
(gchar)((val >> 16) & 0xff),
|
||||
(gchar)((val >> 24) & 0xff));
|
||||
PUT_STRING (pfx, "<fourcc name=\"%s\" hexvalue=\"%08x\"/>", gst_props_entry_get_name (prop), val);
|
||||
(gchar)((val >> 24) & 0xff));
|
||||
PUT_STRING (pfx, "<fourcc name=\"%s\" hexvalue=\"%08x\"/>",
|
||||
gst_props_entry_get_name (prop), val);
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_LIST_TYPE:
|
||||
|
@ -188,7 +192,7 @@ print_formats (const GstFormat *formats, gint pfx)
|
|||
definition = gst_format_get_details (*formats);
|
||||
if (definition)
|
||||
PUT_STRING (pfx, "<format id=\"%d\" nick=\"%s\">%s</format>",
|
||||
*formats, definition->nick, definition->description);
|
||||
*formats, definition->nick, definition->description);
|
||||
else
|
||||
PUT_STRING (pfx, "<format id=\"%d\">unkown</format>",
|
||||
*formats);
|
||||
|
@ -206,7 +210,7 @@ print_query_types (const GstQueryType *types, gint pfx)
|
|||
definition = gst_query_type_get_details (*types);
|
||||
if (definition)
|
||||
PUT_STRING (pfx, "<query-type id=\"%d\" nick=\"%s\">%s</query-type>",
|
||||
*types, definition->nick, definition->description);
|
||||
*types, definition->nick, definition->description);
|
||||
else
|
||||
PUT_STRING (pfx, "<query-type id=\"%d\">unkown</query-type>",
|
||||
*types);
|
||||
|
@ -234,8 +238,8 @@ print_event_masks (const GstEventMask *masks, gint pfx)
|
|||
switch (masks->type) {
|
||||
case GST_EVENT_SEEK:
|
||||
flags = masks->flags;
|
||||
event_flags = gst_seek_type_get_type ();
|
||||
flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
|
||||
event_flags = gst_seek_type_get_type ();
|
||||
flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -251,9 +255,9 @@ print_event_masks (const GstEventMask *masks, gint pfx)
|
|||
if (flags & 1) {
|
||||
value = g_flags_get_first_value (flags_class, 1 << index);
|
||||
|
||||
if (value)
|
||||
if (value)
|
||||
PUT_ESCAPED (pfx + 1, "flag", value->value_nick);
|
||||
else
|
||||
else
|
||||
PUT_ESCAPED (pfx + 1, "flag", "?");
|
||||
}
|
||||
flags >>= 1;
|
||||
|
@ -292,7 +296,7 @@ print_element_properties (GstElement *element, gint pfx)
|
|||
gboolean readable;
|
||||
|
||||
property_specs = g_object_class_list_properties
|
||||
(G_OBJECT_GET_CLASS (element), &num_properties);
|
||||
(G_OBJECT_GET_CLASS (element), &num_properties);
|
||||
|
||||
PUT_START_TAG (pfx, "element-properties");
|
||||
|
||||
|
@ -321,130 +325,130 @@ print_element_properties (GstElement *element, gint pfx)
|
|||
switch (G_VALUE_TYPE (&value)) {
|
||||
case G_TYPE_STRING:
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
case G_TYPE_BOOLEAN:
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
case G_TYPE_ULONG:
|
||||
{
|
||||
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
|
||||
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%lu\" max=\"%lu\"/>",
|
||||
pulong->minimum, pulong->maximum);
|
||||
pulong->minimum, pulong->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_LONG:
|
||||
{
|
||||
GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
|
||||
GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%ld\" max=\"%ld\"/>",
|
||||
plong->minimum, plong->maximum);
|
||||
plong->minimum, plong->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_UINT:
|
||||
{
|
||||
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
|
||||
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%u\" max=\"%u\"/>",
|
||||
puint->minimum, puint->maximum);
|
||||
puint->minimum, puint->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_INT:
|
||||
{
|
||||
GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
|
||||
GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%d\" max=\"%d\"/>",
|
||||
pint->minimum, pint->maximum);
|
||||
pint->minimum, pint->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_UINT64:
|
||||
{
|
||||
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
|
||||
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%"G_GUINT64_FORMAT"\" max=\"%"G_GUINT64_FORMAT"\"/>",
|
||||
puint64->minimum, puint64->maximum);
|
||||
puint64->minimum, puint64->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_INT64:
|
||||
{
|
||||
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
|
||||
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%"G_GINT64_FORMAT"\" max=\"%"G_GINT64_FORMAT"\"/>",
|
||||
pint64->minimum, pint64->maximum);
|
||||
pint64->minimum, pint64->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_FLOAT:
|
||||
{
|
||||
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
|
||||
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%f\" max=\"%f\"/>",
|
||||
pfloat->minimum, pfloat->maximum);
|
||||
pfloat->minimum, pfloat->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_DOUBLE:
|
||||
{
|
||||
GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
|
||||
GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
|
||||
PUT_STRING (pfx + 2, "<range min=\"%g\" max=\"%g\"/>",
|
||||
pdouble->minimum, pdouble->maximum);
|
||||
pdouble->minimum, pdouble->maximum);
|
||||
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (param->value_type == GST_TYPE_CAPS) {
|
||||
GstCaps *caps = g_value_peek_pointer (&value);
|
||||
|
||||
if (!caps)
|
||||
if (!caps)
|
||||
PUT_ESCAPED (pfx + 2, "default", "NULL");
|
||||
else {
|
||||
else {
|
||||
print_caps (caps, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_ENUM (param)) {
|
||||
GEnumValue *values;
|
||||
guint j = 0;
|
||||
gint enum_value;
|
||||
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);
|
||||
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++;
|
||||
}
|
||||
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) {
|
||||
j = 0;
|
||||
while (values[j].value_name) {
|
||||
PUT_STRING (pfx + 3, "<value value=\"%d\" nick=\"%s\"/>",
|
||||
values[j].value, values[j].value_nick);
|
||||
j++;
|
||||
}
|
||||
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;
|
||||
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);
|
||||
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) {
|
||||
j = 0;
|
||||
while (values[j].value_name) {
|
||||
PUT_STRING (pfx + 3, "<flag value=\"%d\" nick=\"%s\"/>",
|
||||
values[j].value, values[j].value_nick);
|
||||
j++;
|
||||
}
|
||||
values[j].value, values[j].value_nick);
|
||||
j++;
|
||||
}
|
||||
PUT_END_TAG (pfx + 2, "flags");
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_OBJECT (param)) {
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_OBJECT (param)) {
|
||||
PUT_ESCAPED (pfx + 2, "object-type",
|
||||
g_type_name(param->value_type));
|
||||
g_type_name(param->value_type));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -532,7 +536,7 @@ print_element_signals (GstElement *element, gint pfx)
|
|||
g_signal_query (signals[i], query);
|
||||
|
||||
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
||||
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION))) {
|
||||
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION))) {
|
||||
n_params = query->n_params;
|
||||
return_type = query->return_type;
|
||||
param_types = query->param_types;
|
||||
|
@ -551,7 +555,7 @@ print_element_signals (GstElement *element, gint pfx)
|
|||
|
||||
PUT_END_TAG (pfx + 1, "signal");
|
||||
|
||||
counted++;
|
||||
counted++;
|
||||
}
|
||||
|
||||
g_free (query);
|
||||
|
@ -589,13 +593,13 @@ print_element_info (GstElementFactory *factory)
|
|||
gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
|
||||
|
||||
PUT_START_TAG (1, "details");
|
||||
PUT_ESCAPED (2, "long-name", factory->details->longname);
|
||||
PUT_ESCAPED (2, "class", factory->details->klass);
|
||||
PUT_ESCAPED (2, "license", factory->details->license);
|
||||
PUT_ESCAPED (2, "description", factory->details->description);
|
||||
PUT_ESCAPED (2, "version", factory->details->version);
|
||||
PUT_ESCAPED (2, "authors", factory->details->author);
|
||||
PUT_ESCAPED (2, "copyright", factory->details->copyright);
|
||||
PUT_ESCAPED (2, "long-name", factory->details->longname);
|
||||
PUT_ESCAPED (2, "class", factory->details->klass);
|
||||
PUT_ESCAPED (2, "license", factory->details->license);
|
||||
PUT_ESCAPED (2, "description", factory->details->description);
|
||||
PUT_ESCAPED (2, "version", factory->details->version);
|
||||
PUT_ESCAPED (2, "authors", factory->details->author);
|
||||
PUT_ESCAPED (2, "copyright", factory->details->copyright);
|
||||
PUT_END_TAG (1, "details");
|
||||
|
||||
output_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);
|
||||
|
@ -608,7 +612,7 @@ print_element_info (GstElementFactory *factory)
|
|||
pads = g_list_next(pads);
|
||||
|
||||
PUT_START_TAG (2, "pad-template");
|
||||
PUT_ESCAPED (3, "name", padtemplate->name_template);
|
||||
PUT_ESCAPED (3, "name", padtemplate->name_template);
|
||||
|
||||
if (padtemplate->direction == GST_PAD_SRC)
|
||||
PUT_ESCAPED (3, "direction", "src");
|
||||
|
@ -624,13 +628,13 @@ print_element_info (GstElementFactory *factory)
|
|||
else if (padtemplate->presence == GST_PAD_REQUEST) {
|
||||
PUT_ESCAPED (3, "presence", "request");
|
||||
PUT_ESCAPED (3, "request-function",
|
||||
GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
|
||||
GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
|
||||
}
|
||||
else
|
||||
PUT_ESCAPED (3, "presence", "unkown");
|
||||
|
||||
if (padtemplate->caps) {
|
||||
print_caps (padtemplate->caps, 3);
|
||||
print_caps (padtemplate->caps, 3);
|
||||
}
|
||||
PUT_END_TAG (2, "pad-template");
|
||||
}
|
||||
|
@ -671,7 +675,7 @@ print_element_info (GstElementFactory *factory)
|
|||
PUT_START_TAG (1, "element-implementation");
|
||||
if (element->loopfunc)
|
||||
PUT_STRING (2, "<loop-based function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME (element->loopfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (element->loopfunc));
|
||||
|
||||
PUT_STRING (2, "<state-change function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME (gstelement_class->change_state));
|
||||
|
@ -713,7 +717,7 @@ print_element_info (GstElementFactory *factory)
|
|||
realpad = GST_PAD_REALIZE (pad);
|
||||
|
||||
PUT_START_TAG (2, "pad");
|
||||
PUT_ESCAPED (3, "name", gst_pad_get_name (pad));
|
||||
PUT_ESCAPED (3, "name", gst_pad_get_name (pad));
|
||||
|
||||
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
|
||||
PUT_ESCAPED (3, "direction", "src");
|
||||
|
@ -727,54 +731,54 @@ print_element_info (GstElementFactory *factory)
|
|||
|
||||
if (pad->padtemplate)
|
||||
PUT_ESCAPED (3, "template",
|
||||
pad->padtemplate->name_template);
|
||||
pad->padtemplate->name_template);
|
||||
|
||||
PUT_START_TAG (3, "implementation");
|
||||
if (realpad->chainfunc)
|
||||
PUT_STRING (4, "<chain-based function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->chainfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->chainfunc));
|
||||
if (realpad->getfunc)
|
||||
PUT_STRING (4, "<get-based function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->getfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->getfunc));
|
||||
if (realpad->formatsfunc != gst_pad_get_formats_default) {
|
||||
PUT_STRING (4, "<formats-function function=\"%s\">",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->formatsfunc));
|
||||
print_formats (gst_pad_get_formats (GST_PAD (realpad)), 5);
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->formatsfunc));
|
||||
print_formats (gst_pad_get_formats (GST_PAD (realpad)), 5);
|
||||
PUT_END_TAG (4, "formats-function");
|
||||
}
|
||||
if (realpad->convertfunc != gst_pad_convert_default)
|
||||
PUT_STRING (4, "<convert-function function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->convertfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->convertfunc));
|
||||
if (realpad->eventfunc != gst_pad_event_default)
|
||||
PUT_STRING (4, "<event-function function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->eventfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->eventfunc));
|
||||
if (realpad->eventmaskfunc != gst_pad_get_event_masks_default) {
|
||||
PUT_STRING (4, "<event-mask-func function=\"%s\">",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->eventmaskfunc));
|
||||
print_event_masks (gst_pad_get_event_masks (GST_PAD (realpad)), 5);
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->eventmaskfunc));
|
||||
print_event_masks (gst_pad_get_event_masks (GST_PAD (realpad)), 5);
|
||||
PUT_END_TAG (4, "event-mask-func");
|
||||
}
|
||||
if (realpad->queryfunc != gst_pad_query_default)
|
||||
PUT_STRING (4, "<query-function function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->queryfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->queryfunc));
|
||||
if (realpad->querytypefunc != gst_pad_get_query_types_default) {
|
||||
PUT_STRING (4, "<query-type-func function=\"%s\">",
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->querytypefunc));
|
||||
print_query_types (gst_pad_get_query_types (GST_PAD (realpad)), 5);
|
||||
GST_DEBUG_FUNCPTR_NAME (realpad->querytypefunc));
|
||||
print_query_types (gst_pad_get_query_types (GST_PAD (realpad)), 5);
|
||||
PUT_END_TAG (4, "query-type-func");
|
||||
}
|
||||
|
||||
if (realpad->intlinkfunc != gst_pad_get_internal_links_default)
|
||||
PUT_STRING (4, "<intlink-function function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->intlinkfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->intlinkfunc));
|
||||
|
||||
if (realpad->bufferpoolfunc)
|
||||
PUT_STRING (4, "<bufferpool-function function=\"%s\"/>",
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->bufferpoolfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME(realpad->bufferpoolfunc));
|
||||
PUT_END_TAG (3, "implementation");
|
||||
|
||||
if (realpad->caps) {
|
||||
print_caps (realpad->caps, 3);
|
||||
print_caps (realpad->caps, 3);
|
||||
}
|
||||
PUT_END_TAG (2, "pad");
|
||||
}
|
||||
|
@ -826,7 +830,7 @@ print_element_list (void)
|
|||
|
||||
factory = GST_ELEMENT_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory) ,factory->details->longname);
|
||||
GST_PLUGIN_FEATURE_NAME (factory) ,factory->details->longname);
|
||||
}
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
else if (GST_IS_AUTOPLUG_FACTORY (feature)) {
|
||||
|
@ -834,7 +838,7 @@ print_element_list (void)
|
|||
|
||||
factory = GST_AUTOPLUG_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
}
|
||||
#endif
|
||||
#ifndef GST_DISABLE_INDEX
|
||||
|
@ -843,7 +847,7 @@ print_element_list (void)
|
|||
|
||||
factory = GST_INDEX_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
}
|
||||
#endif
|
||||
else if (GST_IS_TYPE_FACTORY (feature)) {
|
||||
|
@ -851,33 +855,33 @@ print_element_list (void)
|
|||
|
||||
factory = GST_TYPE_FACTORY (feature);
|
||||
g_print ("%s type: %s: %s\n", plugin->name,
|
||||
factory->mime, factory->exts);
|
||||
factory->mime, factory->exts);
|
||||
|
||||
if (factory->typefindfunc)
|
||||
g_print (" Has typefind function: %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
}
|
||||
else if (GST_IS_SCHEDULER_FACTORY (feature)) {
|
||||
GstSchedulerFactory *factory;
|
||||
|
||||
factory = GST_SCHEDULER_FACTORY (feature);
|
||||
g_print ("%s: %s: %s\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
||||
}
|
||||
#ifndef GST_DISABLE_URI
|
||||
else if (GST_IS_URI_HANDLER (feature)) {
|
||||
GstURIHandler *handler;
|
||||
|
||||
handler = GST_URI_HANDLER (feature);
|
||||
g_print ("%s: %s: \"%s\" (%s) element \"%s\" property \"%s\"\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (handler), handler->uri, handler->longdesc,
|
||||
handler->element, handler->property);
|
||||
g_print ("%s: %s: \"%s\" (%s) element \"%s\" property \"%s\"\n",
|
||||
plugin->name, GST_PLUGIN_FEATURE_NAME (handler), handler->uri,
|
||||
handler->longdesc, handler->element, handler->property);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
g_print ("%s: %s (%s)\n", plugin->name,
|
||||
GST_PLUGIN_FEATURE_NAME (feature),
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
GST_PLUGIN_FEATURE_NAME (feature),
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
}
|
||||
|
||||
features = g_list_next (features);
|
||||
|
@ -915,7 +919,7 @@ print_plugin_info (GstPlugin *plugin)
|
|||
|
||||
factory = GST_ELEMENT_FACTORY (feature);
|
||||
g_print (" %s: %s\n", GST_OBJECT_NAME (factory),
|
||||
factory->details->longname);
|
||||
factory->details->longname);
|
||||
num_elements++;
|
||||
}
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
|
@ -944,7 +948,7 @@ print_plugin_info (GstPlugin *plugin)
|
|||
|
||||
if (factory->typefindfunc)
|
||||
g_print (" Has typefind function: %s\n",
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
||||
num_types++;
|
||||
}
|
||||
else if (GST_IS_SCHEDULER_FACTORY (feature)) {
|
||||
|
@ -956,7 +960,7 @@ print_plugin_info (GstPlugin *plugin)
|
|||
}
|
||||
else {
|
||||
g_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
g_type_name (G_OBJECT_TYPE (feature)));
|
||||
num_other++;
|
||||
}
|
||||
num_features++;
|
||||
|
@ -987,11 +991,11 @@ main (int argc, char *argv[])
|
|||
GstPlugin *plugin;
|
||||
gchar *so;
|
||||
struct poptOption options[] = {
|
||||
{"gst-inspect-plugin", 'p', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show plugin details", NULL},
|
||||
{"gst-inspect-scheduler", 's', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show scheduler details", NULL},
|
||||
POPT_TABLEEND
|
||||
{"gst-inspect-plugin", 'p', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show plugin details", NULL},
|
||||
{"gst-inspect-scheduler", 's', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
||||
"Show scheduler details", NULL},
|
||||
POPT_TABLEEND
|
||||
};
|
||||
|
||||
gst_init_with_popt_table (&argc, &argv, options);
|
||||
|
@ -1007,10 +1011,10 @@ main (int argc, char *argv[])
|
|||
} else {
|
||||
/* first check for help */
|
||||
if (strstr (argv[1], "-help")) {
|
||||
g_print ("Usage: %s\t\t\tList all registered elements\n",argv[0]);
|
||||
g_print (" %s element-name\tShow element details\n",argv[0]);
|
||||
g_print ("Usage: %s\t\t\tList all registered elements\n", argv[0]);
|
||||
g_print (" %s element-name\tShow element details\n", argv[0]);
|
||||
g_print (" %s plugin-name[.so]\tShow information about plugin\n",
|
||||
argv[0]);
|
||||
argv[0]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1022,39 +1026,44 @@ main (int argc, char *argv[])
|
|||
if (factory)
|
||||
return print_element_info (factory);
|
||||
else {
|
||||
GstPluginFeature* feature;
|
||||
GstPluginFeature* feature;
|
||||
|
||||
/* FIXME implement other pretty print function for these */
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_SCHEDULER_FACTORY);
|
||||
if (feature) {
|
||||
/* FIXME implement other pretty print function for these */
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_SCHEDULER_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: a scheduler\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_INDEX
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_INDEX_FACTORY);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_INDEX_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an index\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_AUTOPLUG_FACTORY);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_AUTOPLUG_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an autoplugger\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_TYPE_FACTORY);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_TYPE_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an type\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_URI
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_URI_HANDLER);
|
||||
if (feature) {
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_URI_HANDLER);
|
||||
if (feature) {
|
||||
g_print ("%s: an uri handler\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
@ -1070,7 +1079,6 @@ main (int argc, char *argv[])
|
|||
|
||||
if (plugin) {
|
||||
print_plugin_info (plugin);
|
||||
|
||||
} else {
|
||||
g_print("no such element or plugin '%s'\n", argv[1]);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue