mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-04 16:39:39 +00:00
- added usage info
Original commit message from CVS: - added usage info - uses first arg as registry filename - any additional args are plugins to search for (no change but argv base) - cleaned up output with a spare \n
This commit is contained in:
parent
e4f151a2ce
commit
419640438a
1 changed files with 10 additions and 4 deletions
|
@ -29,7 +29,13 @@ int main(int argc,char *argv[]) {
|
||||||
|
|
||||||
// gst_init(&argc,&argv);
|
// gst_init(&argc,&argv);
|
||||||
|
|
||||||
doc = xmlParseFile("registry.xml");
|
if (argc < 2) {
|
||||||
|
fprintf(stderr,"Usage: %s <registry.xml> [element] [element] ...\n",
|
||||||
|
argv[0]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
doc = xmlParseFile(argv[1]);
|
||||||
g_assert(doc != NULL);
|
g_assert(doc != NULL);
|
||||||
|
|
||||||
cur = doc->root;
|
cur = doc->root;
|
||||||
|
@ -93,15 +99,15 @@ int main(int argc,char *argv[]) {
|
||||||
element->details.copyright = getcontents(doc,field);
|
element->details.copyright = getcontents(doc,field);
|
||||||
field = field->next;
|
field = field->next;
|
||||||
}
|
}
|
||||||
g_print("new element '%s'in '%s'\n",element->name,element->plugin->name);
|
g_print("new element '%s' in '%s'\n",element->name,element->plugin->name);
|
||||||
elements = g_slist_prepend(elements,element);
|
elements = g_slist_prepend(elements,element);
|
||||||
}
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=1;i<argc;i++) {
|
for (i=2;i<argc;i++) {
|
||||||
GSList *list;
|
GSList *list;
|
||||||
g_print("searching for element '%s'\n",argv[i]);
|
g_print("\nsearching for element '%s'\n",argv[i]);
|
||||||
list = elements;
|
list = elements;
|
||||||
while (list) {
|
while (list) {
|
||||||
GstRegistryElement *element = (GstRegistryElement *)list->data;
|
GstRegistryElement *element = (GstRegistryElement *)list->data;
|
||||||
|
|
Loading…
Reference in a new issue