gst-launch: add -p option to disable play handler.
authorStefan Kost <ensonic@users.sf.net>
Wed, 28 Apr 2010 14:15:41 +0000 (17:15 +0300)
committerStefan Kost <ensonic@users.sf.net>
Fri, 30 Apr 2010 07:03:38 +0000 (10:03 +0300)
Same logic as for the fault handler. This is useful for some debug/tracing tools
that need to grab SIGUSR1 and SIGUSR2 them self.

tools/gst-launch.1.in
tools/gst-launch.c

index 8c7e8a4..f1be89a 100644 (file)
@@ -45,6 +45,9 @@ Save XML representation of pipeline to FILE and exit
 .B  \-f, \-\-no_fault
 Do not install a fault handler
 .TP 8
+.B  \-p, \-\-no_play
+Do not install a playback handler (SIGUSR1/2)
+.TP 8
 .B  \-T, \-\-trace
 Print memory allocation traces. The feature must be enabled at compile time to
 work.
index a8003fb..91270d8 100644 (file)
@@ -669,6 +669,7 @@ main (int argc, char *argv[])
   /* options */
   gboolean verbose = FALSE;
   gboolean no_fault = FALSE;
+  gboolean no_play = FALSE;
   gboolean trace = FALSE;
   gboolean eos_on_shutdown = FALSE;
   gchar *savefile = NULL;
@@ -691,6 +692,8 @@ main (int argc, char *argv[])
 #endif
     {"no-fault", 'f', 0, G_OPTION_ARG_NONE, &no_fault,
         N_("Do not install a fault handler"), NULL},
+    {"no-play", 'p', 0, G_OPTION_ARG_NONE, &no_play,
+        N_("Do not install a play handler"), NULL},
     {"trace", 'T', 0, G_OPTION_ARG_NONE, &trace,
         N_("Print alloc trace (if enabled at compile time)"), NULL},
     {"eos-on-shutdown", 'e', 0, G_OPTION_ARG_NONE, &eos_on_shutdown,
@@ -740,7 +743,9 @@ main (int argc, char *argv[])
     fault_setup ();
 
   sigint_setup ();
-  play_signal_setup ();
+
+  if (!no_play)
+    play_signal_setup ();
 #endif
 
   if (trace) {