X-Git-Url: https://git.ao2.it/gst-aseq-appsrc.git/blobdiff_plain/d579e6473dc66a60b98ac3ebbbdccaca22b033ee..235f2de4cffc16ca76b445175aac26f251d7c0f1:/gst-aseq-appsrc.c diff --git a/gst-aseq-appsrc.c b/gst-aseq-appsrc.c index b6d38d0..8b939e9 100644 --- a/gst-aseq-appsrc.c +++ b/gst-aseq-appsrc.c @@ -38,8 +38,8 @@ #define DEFAULT_TICK_PERIOD_MS 10 #define DEFAULT_POLL_TIMEOUT_MS (DEFAULT_TICK_PERIOD_MS / 2) -GST_DEBUG_CATEGORY (mysrc_debug); -#define GST_CAT_DEFAULT mysrc_debug +GST_DEBUG_CATEGORY (mysource_debug); +#define GST_CAT_DEFAULT mysource_debug typedef struct _App App; @@ -62,7 +62,7 @@ struct _App guint64 tick; }; -App s_app; +static App s_app; static int init_seq (App * app) @@ -392,9 +392,12 @@ main (int argc, char *argv[]) GOptionContext *ctx; GError *err = NULL; gchar *ports = NULL; + gboolean verbose = FALSE; GOptionEntry options[] = { {"ports", 'p', 0, G_OPTION_ARG_STRING, &ports, "Comma separated list of sequencer ports", "client:port,..."}, + {"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, + "Output status information and property notifications", NULL}, {NULL} }; @@ -412,7 +415,7 @@ main (int argc, char *argv[]) gst_init (&argc, &argv); - GST_DEBUG_CATEGORY_INIT (mysrc_debug, "mysrc", 0, + GST_DEBUG_CATEGORY_INIT (mysource_debug, "mysource", 0, "ALSA MIDI sequencer appsrc pipeline"); ret = app_init (app, ports); @@ -433,6 +436,9 @@ main (int argc, char *argv[]) ("appsrc name=mysource ! fluiddec ! audioconvert ! autoaudiosink", NULL); g_assert (app->pipeline); + if (verbose) + g_signal_connect (app->pipeline, "deep-notify", G_CALLBACK (gst_object_default_deep_notify), NULL); + bus = gst_pipeline_get_bus (GST_PIPELINE (app->pipeline)); g_assert (bus);