[maemo-commits] [maemo-commits] r18726 - in projects/haf/trunk/hildon-welcome: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jun 15 14:19:00 EEST 2009
Author: schulhof
Date: 2009-06-15 14:18:57 +0300 (Mon, 15 Jun 2009)
New Revision: 18726

Modified:
   projects/haf/trunk/hildon-welcome/debian/changelog
   projects/haf/trunk/hildon-welcome/src/main.c
Log:
Sync from pmo and (hopefully) fork-speedup

Modified: projects/haf/trunk/hildon-welcome/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-welcome/debian/changelog	2009-06-15 09:32:13 UTC (rev 18725)
+++ projects/haf/trunk/hildon-welcome/debian/changelog	2009-06-15 11:18:57 UTC (rev 18726)
@@ -1,3 +1,18 @@
+hildon-welcome (0.18-2) unstable; urgency=low
+
+  [ Gabriel Schulhof ]
+  * Fork into the background when poised to play first logo.
+
+ -- Gabriel Schulhof <gabriel.schulhof at nokia.com>  Mon, 15 Jun 2009 14:07:27 +0300
+
+hildon-welcome (0.18-1) unstable; urgency=low
+
+  [ Peter Csaszar ]
+  * Fixes: NB#119664 - Nokia tune is played very loud although the
+    status menu shows that the sounds are quite low
+
+ -- Gabriel Schulhof <gabriel.schulhof at nokia.com>  Mon, 08 Jun 2009 09:09:22 +0200
+
 hildon-welcome (0.17-3) unstable; urgency=low
 
   * Forgot to turn on maemo-launcher-dev dependency

Modified: projects/haf/trunk/hildon-welcome/src/main.c
===================================================================
--- projects/haf/trunk/hildon-welcome/src/main.c	2009-06-15 09:32:13 UTC (rev 18725)
+++ projects/haf/trunk/hildon-welcome/src/main.c	2009-06-15 11:18:57 UTC (rev 18726)
@@ -150,6 +150,21 @@
 }
 
 static void
+maybe_fork()
+{
+  int fork_result = -1;
+  static gboolean already_forked = FALSE;
+
+  if (!already_forked) {
+    if ((fork_result = fork())) return 0;
+    else {
+      g_debug("maybe_fork: Forked into the background with fork_result %d\n", fork_result);
+      already_forked = TRUE;
+    }
+  }
+}
+
+static void
 wait_for_eos(GstElement *pipeline, Display *dpy, int duration, TimeoutParams *play_to)
 {
   GError *err = NULL;
@@ -164,6 +179,7 @@
     switch(GST_MESSAGE_TYPE(message)) {
       case GST_MESSAGE_ASYNC_DONE:
         g_debug("wait_for_eos: Ready to play: duration = %d\n", duration);
+        maybe_fork();
         if ((duration > 500) && !(play_to->timeout_id))
           post_eos_timeout_add(duration, pipeline, NULL, play_to);
         break;
@@ -317,6 +333,8 @@
   ConfFileIterator *itr;
   GstElement *new_pipeline = NULL, *old_pipeline = NULL;
 
+  g_setenv("PULSE_PROP_media.role", "animation", TRUE);
+
   if (!g_thread_supported ()) g_thread_init(NULL);
 
   g_log_set_default_handler(my_log_func, NULL);

More information about the maemo-commits mailing list