mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
docs/manual/: Fix typos and minor errors in sample code (#341856).
Original commit message from CVS: * docs/manual/basics-bins.xml: * docs/manual/basics-init.xml: Fix typos and minor errors in sample code (#341856).
This commit is contained in:
parent
090f3f4adc
commit
aeca9dda7b
3 changed files with 23 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-05-16 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* docs/manual/basics-bins.xml:
|
||||
* docs/manual/basics-init.xml:
|
||||
Fix typos and minor errors in sample code (#341856).
|
||||
|
||||
2006-05-16 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* docs/design/part-qos.txt:
|
||||
|
|
|
@ -113,7 +113,7 @@ main (int argc,
|
|||
</para>
|
||||
<programlisting>
|
||||
int
|
||||
main (int argc
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
GstElement *player;
|
||||
|
|
|
@ -30,13 +30,22 @@ int
|
|||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
guint major, minor, micro;
|
||||
const gchar *nano_str;
|
||||
guint major, minor, micro, nano;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
gst_version (&major, &minor, &micro);
|
||||
printf ("This program is linked against GStreamer %d.%d.%d\n",
|
||||
major, minor, micro);
|
||||
gst_version (&major, &minor, &micro, &nano);
|
||||
|
||||
if (nano == 1)
|
||||
nano_str = "(CVS)";
|
||||
else if (nano == 2)
|
||||
nano_str = "(Prerelease)";
|
||||
else
|
||||
nano_str = "";
|
||||
|
||||
printf ("This program is linked against GStreamer %d.%d.%d %s\n",
|
||||
major, minor, micro, nano_str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -80,15 +89,15 @@ main (int argc,
|
|||
GOptionContext *ctx;
|
||||
GError *err = NULL;
|
||||
GOptionEntry entries[] = {
|
||||
{ "silent", 's', 0, G_OPTION_ARG_NONE, &silent, 0,
|
||||
{ "silent", 's', 0, G_OPTION_ARG_NONE, &silent,
|
||||
"do not output status information", NULL },
|
||||
{ "output", 'o', 0, G_OPTION_ARG_STRING, &savefile, 0,
|
||||
{ "output", 'o', 0, G_OPTION_ARG_STRING, &savefile,
|
||||
"save xml representation of pipeline to FILE and exit", "FILE" },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
ctx = g_option_context_new ("- Your application");
|
||||
g_option_context_add_main_entries (ctx, entries, GETTEXT_PACKAGE);
|
||||
g_option_context_add_main_entries (ctx, entries, NULL);
|
||||
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
||||
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
|
||||
g_print ("Failed to initialize: %s\n", err->message);
|
||||
|
|
Loading…
Reference in a new issue