mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 12:15:19 +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:
|
||||
|
@ -313,16 +313,18 @@ print_element_properties (GstElement *element)
|
|||
{
|
||||
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));
|
||||
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));
|
||||
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:
|
||||
|
@ -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);
|
||||
|
@ -765,7 +768,6 @@ print_element_info (GstElementFactory *factory)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* for compound elements */
|
||||
if (GST_IS_BIN (element)) {
|
||||
g_print ("\nChildren:\n");
|
||||
|
@ -852,9 +854,9 @@ print_element_list (void)
|
|||
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 {
|
||||
|
@ -962,7 +964,6 @@ print_plugin_info (GstPlugin *plugin)
|
|||
g_print ("\n");
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
|
@ -1006,32 +1007,37 @@ main (int argc, char *argv[])
|
|||
GstPluginFeature* feature;
|
||||
|
||||
/* FIXME implement other pretty print function for these */
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_SCHEDULER_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_SCHEDULER_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: a scheduler\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_INDEX
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_INDEX_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_INDEX_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an index\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_AUTOPLUG_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_AUTOPLUG_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an autoplugger\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_TYPE_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_TYPE_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an type\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_URI
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_URI_HANDLER);
|
||||
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;
|
||||
|
|
|
@ -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:
|
||||
|
@ -67,7 +68,8 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
{
|
||||
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:
|
||||
|
@ -90,7 +92,8 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
{
|
||||
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:
|
||||
|
@ -102,7 +105,8 @@ print_prop (GstPropsEntry *prop, gint pfx)
|
|||
(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);
|
||||
PUT_STRING (pfx, "<fourcc name=\"%s\" hexvalue=\"%08x\"/>",
|
||||
gst_props_entry_get_name (prop), val);
|
||||
break;
|
||||
}
|
||||
case GST_PROPS_LIST_TYPE:
|
||||
|
@ -869,9 +873,9 @@ print_element_list (void)
|
|||
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 {
|
||||
|
@ -1025,32 +1029,37 @@ main (int argc, char *argv[])
|
|||
GstPluginFeature* feature;
|
||||
|
||||
/* FIXME implement other pretty print function for these */
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_SCHEDULER_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_SCHEDULER_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: a scheduler\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_INDEX
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_INDEX_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_INDEX_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an index\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifndef GST_DISABLE_AUTOPLUG
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_AUTOPLUG_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_AUTOPLUG_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an autoplugger\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_TYPE_FACTORY);
|
||||
feature = gst_registry_pool_find_feature (argv[1],
|
||||
GST_TYPE_TYPE_FACTORY);
|
||||
if (feature) {
|
||||
g_print ("%s: an type\n", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
#ifndef GST_DISABLE_URI
|
||||
feature = gst_registry_pool_find_feature (argv[1], GST_TYPE_URI_HANDLER);
|
||||
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;
|
||||
|
@ -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