break;
}
}
- props->properties = g_slist_insert_sorted (props->properties, entry, props_compare_func);
+ props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func);
tag = factory[i++];
}
GstProps*
gst_props_merge (GstProps *props, GstProps *tomerge)
{
- GSList *merge_props;
+ GList *merge_props;
g_return_val_if_fail (props != NULL, NULL);
g_return_val_if_fail (tomerge != NULL, NULL);
while (merge_props) {
GstPropsEntry *entry = (GstPropsEntry *)merge_props->data;
- props->properties = g_slist_insert_sorted (props->properties, entry, props_compare_func);
+ props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func);
- merge_props = g_slist_next (merge_props);
+ merge_props = g_list_next (merge_props);
}
return props;
gboolean
gst_props_check_compatibility (GstProps *fromprops, GstProps *toprops)
{
- GSList *sourcelist;
- GSList *sinklist;
+ GList *sourcelist;
+ GList *sinklist;
gint missing = 0;
gint more = 0;
gboolean compatible = TRUE;
while (entry1->propid < entry2->propid) {
GST_DEBUG (0,"source is more specific in \"%s\"\n", g_quark_to_string (entry1->propid));
more++;
- sourcelist = g_slist_next (sourcelist);
+ sourcelist = g_list_next (sourcelist);
if (sourcelist) entry1 = (GstPropsEntry *)sourcelist->data;
else goto end;
}
while (entry1->propid > entry2->propid) {
GST_DEBUG (0,"source has missing property \"%s\"\n", g_quark_to_string (entry2->propid));
missing++;
- sinklist = g_slist_next (sinklist);
+ sinklist = g_list_next (sinklist);
if (sinklist) entry2 = (GstPropsEntry *)sinklist->data;
else goto end;
}
compatible &= gst_props_entry_check_compatibility (entry1, entry2);
- sourcelist = g_slist_next (sourcelist);
- sinklist = g_slist_next (sinklist);
+ sourcelist = g_list_next (sourcelist);
+ sinklist = g_list_next (sinklist);
}
if (sinklist) {
GstPropsEntry *entry2;
xmlNodePtr
gst_props_save_thyself (GstProps *props, xmlNodePtr parent)
{
- GSList *proplist;
+ GList *proplist;
xmlNodePtr subtree;
g_return_val_if_fail (props != NULL, NULL);
gst_props_save_thyself_func (entry, parent);
}
- proplist = g_slist_next (proplist);
+ proplist = g_list_next (proplist);
}
return parent;
subfield = subfield->next;
}
entry->data.list_data.entries = g_list_reverse (entry->data.list_data.entries);
- props->properties = g_slist_insert_sorted (props->properties, entry, props_compare_func);
+ props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func);
}
else {
GstPropsEntry *entry;
entry = gst_props_load_thyself_func (field);
- props->properties = g_slist_insert_sorted (props->properties, entry, props_compare_func);
+ props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func);
}
field = field->next;
}
}
void print_props(GstProps *properties,gchar *pfx) {
- GSList *props;
+ GList *props;
GstPropsEntry *prop;
props = properties->properties;
while (props) {
prop = (GstPropsEntry*)(props->data);
- props = g_slist_next(props);
-
- if (prop->propstype == GST_PROPS_END_ID_NUM) continue;
+ props = g_list_next(props);
print_prop(prop,TRUE,pfx);
}
gst_init(&argc,&argv);
factory = gst_elementfactory_find(argv[1]);
+ if (!factory) {
+ g_print ("no elementfactory for element '%s' exists\n", argv[1]);
+ return -1;
+ }
+
element = gst_elementfactory_create(factory,argv[1]);
gstelement_class = GST_ELEMENT_CLASS (GTK_OBJECT (element)->klass);
printf(" Capabilities:\n");
caps = padtemplate->caps;
while (caps) {
+ GstType *type;
+
cap = (GstCaps*)(caps->data);
caps = g_list_next(caps);
+
printf(" '%s':\n",cap->name);
- print_props(cap->properties," ");
+
+ type = gst_type_find_by_id (cap->id);
+ if (type)
+ printf(" MIME type: '%s':\n",type->mime);
+ else
+ printf(" MIME type: 'unknown/unknown':\n");
+
+ if (cap->properties)
+ print_props(cap->properties," ");
}
}
cap = (GstCaps*)(caps->data);
caps = g_list_next(caps);
printf(" '%s':\n",cap->name);
- print_props(cap->properties," ");
+ if (cap->properties)
+ print_props(cap->properties," ");
}
}
}
printf("\n");
}
+ if (num_args == 0) g_print (" none");
printf("\n");
return 0;