summaryrefslogtreecommitdiff
path: root/src/options-launch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/options-launch.c')
-rw-r--r--src/options-launch.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/options-launch.c b/src/options-launch.c
index fad40fe..16e855d 100644
--- a/src/options-launch.c
+++ b/src/options-launch.c
@@ -61,6 +61,21 @@ static void options_defaults(options_t* opt)
opt->pipeline_ = NULL;
}
+static GQuark options_error_quark()
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string("sydra_options_error");
+
+ return quark;
+}
+
+static gboolean options_parse_remaining(const gchar *option_name, const gchar *value, gpointer data, GError **error)
+{
+ g_set_error(error, options_error_quark(), G_OPTION_ERROR_FAILED, "unkown option '%s'", value);
+ return FALSE;
+}
+
static int options_parse_post(options_t* opt);
int options_parse(options_t* opt, int argc, char* argv[])
@@ -97,6 +112,7 @@ int options_parse(options_t* opt, int argc, char* argv[])
"set the application name (will be used by xvimagesink for window title)", "NAME" },
{ "pipeline", 'p', 0, G_OPTION_ARG_STRING, &opt->pipeline_,
"the gst-launch style pipeline description", "PIPELINE DESCRIPTION" },
+ { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_CALLBACK, options_parse_remaining, NULL, NULL},
{ NULL }
};
GOptionContext *ctx = g_option_context_new("- spreadspace streaming hydra ");