g_option_context_add_main_entries (ctx, options, NULL);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#ifdef G_OS_WIN32
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
g_clear_error (&err);
g_option_context_free (ctx);
int
main (int argc, char *argv[])
{
+ int ret;
+
+#ifdef G_OS_WIN32
+ argv = g_win32_get_command_line ();
+#endif
+
#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
- return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
+ ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
#else
- return real_main (argc, argv);
+ ret = real_main (argc, argv);
+#endif
+
+#ifdef G_OS_WIN32
+ g_strfreev (argv);
#endif
+
+ return ret;
}
"[DEVICE_CLASSES[:FILTER_CAPS]] …");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#ifdef G_OS_WIN32
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
g_option_context_free (ctx);
g_clear_error (&err);
int
main (int argc, char *argv[])
{
+ int ret;
+
+#ifdef G_OS_WIN32
+ argv = g_win32_get_command_line ();
+#endif
+
#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
- return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
+ ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
#else
- return real_main (argc, argv);
+ ret = real_main (argc, argv);
+#endif
+
+#ifdef G_OS_WIN32
+ g_strfreev (argv);
#endif
+
+ return ret;
}
g_option_context_add_main_entries (ctx, options, NULL);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#ifdef G_OS_WIN32
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
g_print ("Error initializing: %s\n", err->message);
g_option_context_free (ctx);
g_clear_error (&err);
int
main (int argc, char *argv[])
{
+ int ret;
+
+#ifdef G_OS_WIN32
+ argv = g_win32_get_command_line ();
+#endif
+
#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
- return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
+ ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
#else
- return real_main (argc, argv);
+ ret = real_main (argc, argv);
+#endif
+
+#ifdef G_OS_WIN32
+ g_strfreev (argv);
#endif
+
+ return ret;
}
ctx = g_option_context_new ("FILE1|URI1 [FILE2|URI2] [FILE3|URI3] ...");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#ifdef G_OS_WIN32
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
gst_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
g_option_context_free (ctx);
g_clear_error (&err);
int
main (int argc, char *argv[])
{
+ int ret;
+
+#ifdef G_OS_WIN32
+ argv = g_win32_get_command_line ();
+#endif
+
#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
- return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
+ ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
#else
- return real_main (argc, argv);
+ ret = real_main (argc, argv);
+#endif
+
+#ifdef G_OS_WIN32
+ g_strfreev (argv);
#endif
+
+ return ret;
}
ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#if defined(G_OS_WIN32) && !defined(GST_CHECK_MAIN)
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
g_printerr ("Error initializing: %s\n", err->message);
g_clear_error (&err);
g_option_context_free (ctx);
int
main (int argc, char *argv[])
{
+ int ret;
+
+ /* gstinspect.c calls this function */
+#if defined(G_OS_WIN32) && !defined(GST_CHECK_MAIN)
+ argv = g_win32_get_command_line ();
+#endif
+
#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
- return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
+ ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
#else
- return real_main (argc, argv);
+ ret = real_main (argc, argv);
+#endif
+
+#if defined(G_OS_WIN32) && !defined(GST_CHECK_MAIN)
+ g_strfreev (argv);
#endif
+
+ return ret;
}
ctx = g_option_context_new ("PIPELINE-DESCRIPTION");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#ifdef G_OS_WIN32
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
if (err)
gst_printerr ("Error initializing: %s\n", GST_STR_NULL (err->message));
else
int
main (int argc, char *argv[])
{
+ int ret;
+
+#ifdef G_OS_WIN32
+ argv = g_win32_get_command_line ();
+#endif
+
#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
- return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
+ ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
#else
- return real_main (argc, argv);
+ ret = real_main (argc, argv);
+#endif
+
+#ifdef G_OS_WIN32
+ g_strfreev (argv);
#endif
+
+ return ret;
}
g_set_prgname ("gst-stats-" GST_API_VERSION);
+#ifdef G_OS_WIN32
+ argv = g_win32_get_command_line ();
+#endif
+
ctx = g_option_context_new ("FILE");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#ifdef G_OS_WIN32
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
exit (1);
}
done ();
g_strfreev (filenames);
+
+#ifdef G_OS_WIN23
+ g_strfreev (argv);
+#endif
+
return 0;
}
ctx = g_option_context_new ("FILES");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+#ifdef G_OS_WIN32
+ if (!g_option_context_parse_strv (ctx, &argv, &err))
+#else
+ if (!g_option_context_parse (ctx, &argc, &argv, &err))
+#endif
+ {
g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
g_clear_error (&err);
g_option_context_free (ctx);
int
main (int argc, char *argv[])
{
+ int ret;
+
+#ifdef G_OS_WIN32
+ argv = g_win32_get_command_line ();
+#endif
+
#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
- return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
+ ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
#else
- return real_main (argc, argv);
+ ret = real_main (argc, argv);
+#endif
+
+#ifdef G_OS_WIN32
+ g_strfreev (argv);
#endif
+
+ return ret;
}