r2650 - in trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
njp at sita.openmoko.org
njp at sita.openmoko.org
Mon Aug 6 17:02:57 CEST 2007
Author: njp
Date: 2007-08-06 17:02:56 +0200 (Mon, 06 Aug 2007)
New Revision: 2650
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-06 Neil J. Patel <njp at o-hand.com>
* src/moko-notify.c: (moko_notify_start_ringtone):
Try and use the simple commandline gst parser.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2007-08-06 14:41:01 UTC (rev 2649)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2007-08-06 15:02:56 UTC (rev 2650)
@@ -1,5 +1,10 @@
2007-08-06 Neil J. Patel <njp at o-hand.com>
+ * src/moko-notify.c: (moko_notify_start_ringtone):
+ Try and use the simple commandline gst parser.
+
+2007-08-06 Neil J. Patel <njp at o-hand.com>
+
* data/Makefile.am:
Added a default ringtone (until sound themes are finished).
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c 2007-08-06 14:41:01 UTC (rev 2649)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c 2007-08-06 15:02:56 UTC (rev 2650)
@@ -70,10 +70,29 @@
{
MokoNotifyPrivate *priv;
GstElement *bin, *filesrc, *decoder, *aconvert, *aresample, *asink;
+ gchar *pipeline;
+ GError *err = NULL;
g_return_if_fail (MOKO_IS_NOTIFY (notify));
priv = notify->priv;
+ pipeline = g_strdup_printf ("filesrc location=%s ! decodebin ! audioconvert !audioresample ! alsasink", PKGDATADIR DEFAULT_RINGTONE);
+ g_print ("%s\n", PKGDATADIR DEFAULT_RINGTONE);
+ bin = gst_parse_launch (pipeline, &err);
+ if (err)
+ {
+ g_error ("err->message");
+ priv->bin = NULL;
+ g_free (pipeline);
+ return;
+ }
+ priv->bin = bin;
+
+ /* Start playing */
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+ g_free (pipeline);
+ return;
+
/* Create a bin to hold elements */
bin = gst_pipeline_new ("pipeline");
g_assert (bin);
@@ -84,7 +103,7 @@
g_object_set (G_OBJECT (filesrc),
"location", PKGDATADIR DEFAULT_RINGTONE,
NULL);
- g_signal_connect (G_OBJECT (filesrc), "eos",
+ g_signal_connect (G_OBJECT (bin), "eos",
G_CALLBACK (on_filesrc_eos), (gpointer)notify);
/* Decoder */
More information about the commitlog
mailing list