From: Antonio Ospite <ao2@ao2.it>
Date: Mon, 2 Oct 2017 08:25:56 +0000 (+0200)
Subject: Add a verbose option, it can be useful for debugging
X-Git-Url: https://git.ao2.it/gst-aseq-appsrc.git/commitdiff_plain/235f2de4cffc16ca76b445175aac26f251d7c0f1?ds=inline;hp=73f21dec771b84cc4fa830c1636e1eee5b98e23c

Add a verbose option, it can be useful for debugging
---

diff --git a/gst-aseq-appsrc.c b/gst-aseq-appsrc.c
index 1b2da94..8b939e9 100644
--- a/gst-aseq-appsrc.c
+++ b/gst-aseq-appsrc.c
@@ -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}
   };
 
@@ -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);