From 7cc5114ad693e5500384993bd5e92910ba0c63b3 Mon Sep 17 00:00:00 2001 From: jait Date: Mon, 7 Sep 2009 17:47:50 +0000 Subject: [PATCH] changes for fremantle git-svn-id: file:///svnroot/tunertool/trunk@26 4bb5ff34-d565-4b58-9699-12000fa1827a --- autogen.sh | 2 +- debian/changelog | 6 ++ debian/control | 5 +- debian/files | 2 +- debian/postinst | 8 --- debian/rules | 9 +-- debian/substvars | 2 +- src/Makefile.am | 14 ++--- src/gstpitch.c | 5 +- src/settings.c | 49 +++++++--------- src/tuner.c | 169 +++++++++++++++++++++++++++--------------------------- 11 files changed, 130 insertions(+), 141 deletions(-) diff --git a/autogen.sh b/autogen.sh index 9d84a03..988982f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,7 +3,7 @@ # to the right versions, or leave them unset and get the RedHat 7.3 defaults DIE=0 -package=gst-plugin +package=tuner srcfile=src/main.c # autogen.sh helper functions (copied from GStreamer's common/ CVS module) diff --git a/debian/changelog b/debian/changelog index 28b71c2..7386af4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +tuner (0.1.1) unstable; urgency=low + + * Changes for fremantle + + -- Jari Tenhunen Sat, 5 Sep 2009 14:07:53 +0300 + tuner (0.1.0) unstable; urgency=low * added new icons. diff --git a/debian/control b/debian/control index 4d67e6e..f47943e 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: tuner -Section: user/tools +Section: user/multimedia Priority: optional Maintainer: Josep Torra Build-Depends: debhelper (>= 4.0.0), libhildon1-dev | hildon-libs-dev, libgtk2.0-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libosso-dev (>= 1), libgconf2-dev @@ -7,9 +7,8 @@ Standards-Version: 3.6.0 Package: tuner Architecture: any -Pre-Depends: maemo-select-menu-location Depends: ${shlibs:Depends} -Description: Tuner is a helper tool for tuning instruments. +Description: Tuner is a helper tool for tuning musical instruments. XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAAXNSR0IArs4c 6QAAAEhQTFRFiuI0c9IWTpoG/K8+9XkAzlwAcp/PNGWkIEqHrX+odVB7XDVm diff --git a/debian/files b/debian/files index cf9687a..24c2f3f 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -tuner_0.0.4_armel.deb user/extra optional +tuner_0.1.1_armel.deb user/multimedia optional diff --git a/debian/postinst b/debian/postinst index 6a2bab5..60691e4 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,14 +1,6 @@ #! /bin/sh gtk-update-icon-cache -f /usr/share/icons/hicolor -# Now we are ready to let the user move the entry around, but only if -# this is a new install - -oldversion="$2" -if [ -z "$oldversion" ]; then - maemo-select-menu-location tuner.desktop -fi - #DEBHELPER# exit 0 diff --git a/debian/rules b/debian/rules index d9926a0..de20ecb 100755 --- a/debian/rules +++ b/debian/rules @@ -26,20 +26,17 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif -config.status: configure +config.status: dh_testdir + ./autogen.sh # Add here commands to configure the package. CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info --with-maemo -configure: - ./autogen.sh - - build: build-stamp -build-stamp: config.status +build-stamp: config.status dh_testdir # Add here commands to compile the package. diff --git a/debian/substvars b/debian/substvars index 4ab3ba7..31e66a3 100644 --- a/debian/substvars +++ b/debian/substvars @@ -1 +1 @@ -shlibs:Depends=libatk1.0-0 (>= 1.12.2), libc6 (>= 2.5.0-1), libcairo2 (>= 1.4.10), libdbus-1-3 (>= 0.94), libdbus-glib-1-2 (>= 0.74), libglib2.0-0 (>= 2.12.12-1osso3), libgstreamer0.10-0 (>= 0.10.9), libgtk2.0-0 (>= 2:2.10.12-0osso15), libhildon1 (>= 1.0.11), libosso1 (>= 2.13), libpango1.0-0 (>= 1.16.4), libxml2 +shlibs:Depends=libatk1.0-0 (>= 1.24.0), libc6 (>= 2.5.0-1), libcairo2, libdbus-1-3 (>= 1.1.4), libdbus-glib-1-2 (>= 0.76), libfontconfig1 (>= 2.4.1), libfreetype6 (>= 2.3.5), libgcc1 (>= 1:4.2.1), libgconf2-6 (>= 2.13.5), libglib2.0-0 (>= 2.14.6-1osso1), libgstreamer0.10-0 (>= 0.10.22), libgtk2.0-0 (>= 2:2.12.9-0osso1), libhildon1, libosso1 (>= 2.19), libpango1.0-0, libpixman-1-0 (>= 0.10.0), libpng12-0 (>= 1.2.13-4), libx11-6, libxml2, libxrender1, zlib1g (>= 1:1.2.1) diff --git a/src/Makefile.am b/src/Makefile.am index ba0cb8e..035a56a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,16 +27,16 @@ noinst_HEADERS = gstpitch.h gsttonesrc.h kiss_fft.h _kiss_fft_guts.h settings.h EXTRA_DIST = tuner26.png tuner40.png tuner64.png if HAVE_GTK -noinst_PROGRAMS = demo-audiotest demo-tuner tuner +noinst_PROGRAMS = tuner endif -demo_audiotest_SOURCES = demo-audiotest.c -demo_audiotest_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) -demo_audiotest_LDFLAGS = $(GST_LIBS) $(GTK_LIBS) +#demo_audiotest_SOURCES = demo-audiotest.c +#demo_audiotest_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) +#demo_audiotest_LDFLAGS = $(GST_LIBS) $(GTK_LIBS) -demo_tuner_SOURCES = demo-tuner.c -demo_tuner_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) -demo_tuner_LDFLAGS = $(GST_LIBS) $(GTK_LIBS) +#demo_tuner_SOURCES = demo-tuner.c +#demo_tuner_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) +#demo_tuner_LDFLAGS = $(GST_LIBS) $(GTK_LIBS) tuner_SOURCES = tuner.c settings.c tuner_DEPENDENCIES = $(top_builddir)/src/libgstpitch.la $(top_builddir)/src/libgsttonesrc.la diff --git a/src/gstpitch.c b/src/gstpitch.c index 2cce8d3..7a2acc4 100644 --- a/src/gstpitch.c +++ b/src/gstpitch.c @@ -30,7 +30,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_pitch_debug); #define GST_CAT_DEFAULT gst_pitch_debug -#define RATE 8000 +#define RATE 32000 +#define RATESTR "32000" #define WANTED RATE * 2 /* Filter signals and args */ @@ -49,7 +50,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-int, " - "rate = (int) 8000, " + "rate = (int) " RATESTR ", " "channels = (int) 1, " "endianness = (int) BYTE_ORDER, " "width = (int) 16, " "depth = (int) 16, " "signed = (boolean) true") diff --git a/src/settings.c b/src/settings.c index 655626d..8507040 100644 --- a/src/settings.c +++ b/src/settings.c @@ -1,6 +1,6 @@ /* vim: set sts=2 sw=2 et: */ /* - * Copyright (C) 2008 Jari Tenhunen + * Copyright (C) 2008-2009 Jari Tenhunen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -23,11 +23,10 @@ #endif #include -#if HILDON == 1 #include #include #include -#endif +#include #include "settings.h" @@ -131,7 +130,6 @@ settings_init (GConfClientNotifyFunc func, gpointer user_data) return TRUE; } -#if HILDON == 1 static void fix_hildon_number_editor (GtkWidget * widget, gpointer data) { @@ -159,11 +157,8 @@ settings_dialog_show (GtkWindow * parent) { GtkWidget *dialog; GtkWidget *vbox; - GtkWidget *caption; - GtkSizeGroup *group; GtkWidget *editor = NULL; GtkWidget *control; - GtkComboBox *combo; gint res; dialog = gtk_dialog_new_with_buttons("Settings", @@ -171,7 +166,7 @@ settings_dialog_show (GtkWindow * parent) GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, - "OK", GTK_RESPONSE_OK, + "Save", GTK_RESPONSE_OK, "Cancel", GTK_RESPONSE_CANCEL, NULL, NULL); @@ -182,15 +177,17 @@ settings_dialog_show (GtkWindow * parent) gtk_container_set_border_width (GTK_CONTAINER (vbox), HILDON_MARGIN_DEFAULT); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox); - group = GTK_SIZE_GROUP (gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL)); - - combo = GTK_COMBO_BOX (gtk_combo_box_new_text ()); - gtk_combo_box_append_text (combo, "Simple FFT"); - gtk_combo_box_append_text (combo, "Harmonic Product Spectrum"); - gtk_combo_box_set_active (combo, settings_get_algorithm (DEFAULT_ALGORITHM)); - caption = hildon_caption_new (group, "Pitch detection algorithm:", - GTK_WIDGET (combo), NULL, HILDON_CAPTION_OPTIONAL); - gtk_box_pack_start (GTK_BOX (vbox), caption, FALSE, FALSE, 0); + HildonPickerButton *picker = HILDON_PICKER_BUTTON (hildon_picker_button_new ( + HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_HALFSCREEN_WIDTH, + HILDON_BUTTON_ARRANGEMENT_VERTICAL)); + hildon_button_set_title (HILDON_BUTTON (picker), "Pitch detection algorithm"); + HildonTouchSelector *selector = HILDON_TOUCH_SELECTOR (hildon_touch_selector_new_text()); + hildon_picker_button_set_selector (picker, selector); + hildon_touch_selector_append_text (selector, "Simple FFT"); + hildon_touch_selector_append_text (selector, "Harmonic Product Spectrum"); + hildon_picker_button_set_active (picker, settings_get_algorithm (DEFAULT_ALGORITHM)); + + gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (picker), FALSE, FALSE, 0); #if 0 editor = calibration_editor_new (CALIB_MIN, CALIB_MAX); hildon_number_editor_set_value (HILDON_NUMBER_EDITOR (editor), CALIB_DEFAULT); @@ -199,29 +196,27 @@ settings_dialog_show (GtkWindow * parent) gtk_box_pack_start (GTK_BOX (vbox), caption, FALSE, FALSE, 0); #endif - control = gtk_check_button_new (); - caption = hildon_caption_new (group, "Keep display on:", - control, NULL, HILDON_CAPTION_OPTIONAL); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (control), + control = hildon_check_button_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_HALFSCREEN_WIDTH | HILDON_BUTTON_ARRANGEMENT_VERTICAL); + gtk_button_set_label (GTK_BUTTON (control), "Keep display on"); + hildon_check_button_set_active (HILDON_CHECK_BUTTON (control), settings_get_display_keepalive (DEFAULT_DISPLAY_KEEPALIVE)); - gtk_box_pack_start (GTK_BOX (vbox), caption, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), control, FALSE, FALSE, 0); gtk_widget_show_all (dialog); res = gtk_dialog_run (GTK_DIALOG (dialog)); if (res == GTK_RESPONSE_OK) { /* save settings */ - g_debug ("algorithm: %d", gtk_combo_box_get_active (combo)); - settings_set_algorithm (gtk_combo_box_get_active (combo)); + g_debug ("algorithm: %d", hildon_picker_button_get_active (picker)); + settings_set_algorithm (hildon_picker_button_get_active (picker)); if (editor) { g_debug ("calib: %d", hildon_number_editor_get_value (HILDON_NUMBER_EDITOR (editor))); settings_set_calibration (hildon_number_editor_get_value (HILDON_NUMBER_EDITOR (editor))); } - g_debug ("keepalive: %d", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (control))); - settings_set_display_keepalive (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (control))); + g_debug ("keepalive: %d", hildon_check_button_get_active (HILDON_CHECK_BUTTON (control))); + settings_set_display_keepalive (hildon_check_button_get_active (HILDON_CHECK_BUTTON (control))); } gtk_widget_destroy (dialog); } -#endif diff --git a/src/tuner.c b/src/tuner.c index 4679b7c..b7dce3a 100644 --- a/src/tuner.c +++ b/src/tuner.c @@ -26,16 +26,9 @@ #define TUNER_VERSION "0.4" #ifdef HILDON -# if HILDON==1 -# include -# include -# include -# elif defined(MAEMO1) -# include -# include -# else -# include -# endif +#include +#include +#include #include @@ -45,8 +38,8 @@ #endif /* ifdef HILDON */ #ifdef MAEMO -# define DEFAULT_AUDIOSRC "dsppcmsrc" -# define DEFAULT_AUDIOSINK "dsppcmsink" +# define DEFAULT_AUDIOSRC "pulsesrc" +# define DEFAULT_AUDIOSINK "pulsesink" #else # define DEFAULT_AUDIOSRC "alsasrc" # define DEFAULT_AUDIOSINK "alsasink" @@ -87,6 +80,8 @@ struct app_data GstElement *tonesrc; GstElement *pitch; guint stop_timer_id; + guint vol_timer_id; + gdouble target_vol; gboolean display_keepalive; #ifdef MAEMO @@ -211,6 +206,8 @@ static Note equal_tempered_scale[] = { static GdkColor ledOnColor = { 0, 0 * 255, 180 * 255, 95 * 255 }; static GdkColor ledOnColor2 = { 0, 180 * 255, 180 * 255, 0 * 255 }; static GdkColor ledOffColor = { 0, 80 * 255, 80 * 255, 80 * 255 }; +static GdkColor whiteColor = { 0, 65535, 65535, 65535 }; +static GdkColor blackColor = { 0, 0, 0, 0 }; static void recalculate_scale (double a4) @@ -370,7 +367,8 @@ message_handler (GstBus * bus, GstMessage * message, gpointer data) gint frequency; frequency = g_value_get_int (gst_structure_get_value (s, "frequency")); - update_frequency (data, frequency); + if (frequency != 0) + update_frequency (data, frequency); } } /* we handled the message we want, and ignored the ones we didn't want. @@ -418,8 +416,11 @@ expose_event (GtkWidget * widget, GdkEventExpose * event, gpointer user_data) if (!gc) { gc = gdk_gc_new (appdata->drawingarea2->window); } - gdk_gc_set_rgb_fg_color (gc, &appdata->drawingarea2->style->fg[0]); + gdk_gc_set_rgb_fg_color (gc, &whiteColor); + gdk_draw_rectangle (appdata->drawingarea2->window, gc, TRUE, 0, 0, + NUM_WKEYS * WKEY_WIDTH, appdata->drawingarea2->allocation.height - 1); + gdk_gc_set_rgb_fg_color (gc, &blackColor); gdk_draw_rectangle (appdata->drawingarea2->window, gc, FALSE, 0, 0, NUM_WKEYS * WKEY_WIDTH, appdata->drawingarea2->allocation.height - 1); @@ -484,6 +485,16 @@ stop_pipelines (gpointer user_data) return FALSE; } +static gboolean +fake_frequency (gpointer user_data) +{ + AppData * appdata = (AppData *) user_data; + + update_frequency (appdata, 440); + + return TRUE; +} + #ifdef MAEMO static void osso_hw_state_cb (osso_hw_state_t *state, gpointer user_data) @@ -632,9 +643,55 @@ settings_activate (GtkWidget * widget, GtkWidget * main_win) } static void -close_activate (GtkWidget * widget, gpointer data) +about_activate (GtkWidget * widget, GtkWindow * main_win) { - gtk_main_quit (); + GtkWidget *vbox; + GtkWidget *label; + GtkWidget *dialog; + + dialog = gtk_dialog_new_with_buttons("About tuner", main_win, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT | + GTK_DIALOG_NO_SEPARATOR, + NULL, NULL); + + g_signal_connect (G_OBJECT (dialog), "delete_event", G_CALLBACK (gtk_widget_destroy), NULL); + + vbox = gtk_vbox_new (FALSE, HILDON_MARGIN_DEFAULT); + gtk_container_set_border_width (GTK_CONTAINER (vbox), HILDON_MARGIN_DEFAULT); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox); + label = gtk_label_new ("Tuner Tool is developed by Josep Torra and Jari Tenhunen.\n" + "http://n770galaxy.blogspot.com/\n"); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 5); + + gtk_widget_show_all (dialog); + gtk_dialog_run (GTK_DIALOG (dialog)); + + gtk_widget_destroy (dialog); +} + +static HildonAppMenu * +create_menu (GtkWidget *parent) +{ + HildonSizeType button_size = HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH; + HildonAppMenu *menu = HILDON_APP_MENU (hildon_app_menu_new ()); + GtkButton *button; + + button = GTK_BUTTON (hildon_gtk_button_new (button_size)); + gtk_button_set_label (button, "Settings"); + g_signal_connect_after (G_OBJECT (button), "clicked", + G_CALLBACK (settings_activate), parent); + hildon_app_menu_append (menu, button); + + button = GTK_BUTTON (hildon_gtk_button_new (button_size)); + gtk_button_set_label (button, "About"); + g_signal_connect_after (G_OBJECT (button), "clicked", + G_CALLBACK (about_activate), parent); + hildon_app_menu_append (menu, button); + + gtk_widget_show_all (GTK_WIDGET (menu)); + + return menu; } int @@ -642,13 +699,7 @@ main (int argc, char *argv[]) { AppData * appdata = NULL; #ifdef HILDON -#if defined(MAEMO1) - HildonApp *app = NULL; - HildonAppView *view = NULL; -#else HildonProgram *app = NULL; - HildonWindow *view = NULL; -#endif osso_hw_state_t hw_state_mask = { TRUE, FALSE, FALSE, TRUE, 0 }; #endif gint calib; @@ -664,8 +715,7 @@ main (int argc, char *argv[]) GtkWidget *alignment; GtkWidget *calibrate; GtkWidget *sep; - GtkWidget *menu; - GtkWidget *menuitem; + HildonAppMenu *menu; #ifndef HILDON GdkPixbuf *icon = NULL; @@ -685,16 +735,8 @@ main (int argc, char *argv[]) /* Init the gtk - must be called before any hildon stuff */ gtk_init (&argc, &argv); -#ifdef HILDON -#if defined(MAEMO1) - /* Create the hildon application and setup the title */ - app = HILDON_APP (hildon_app_new ()); - hildon_app_set_title (app, "Tuner Tool"); - hildon_app_set_two_part_title (app, TRUE); -#else app = HILDON_PROGRAM (hildon_program_get_instance ()); g_set_application_name ("Tuner Tool"); -#endif appdata->app = app; @@ -718,47 +760,18 @@ main (int argc, char *argv[]) mainBox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (mainBox), 0); -#if defined(MAEMO1) - view = HILDON_APPVIEW (hildon_appview_new ("Tuner")); - hildon_appview_set_fullscreen_key_allowed (view, TRUE); - mainWin = GTK_WIDGET (app); -#else - view = HILDON_WINDOW (hildon_window_new ()); - mainWin = GTK_WIDGET (view); + mainWin = hildon_stackable_window_new (); g_signal_connect (G_OBJECT (app), "notify::is-topmost", G_CALLBACK (topmost_notify), appdata); - menu = gtk_menu_new (); - hildon_window_set_menu (HILDON_WINDOW (view), GTK_MENU (menu)); - - menuitem = gtk_menu_item_new_with_label ("Settings..."); - gtk_menu_append (GTK_MENU (menu), menuitem); - g_signal_connect (G_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (settings_activate), mainWin); - - menuitem = gtk_menu_item_new_with_label ("Close"); - gtk_menu_append (GTK_MENU (menu), menuitem); - g_signal_connect (G_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (close_activate), mainWin); - - gtk_widget_show_all (menu); - -#endif -#else - mainWin = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (mainWin), "Tuner " TUNER_VERSION); - icon = gdk_pixbuf_new_from_file ("tuner64.png", &error); - if (icon != NULL) { - g_print ("Setting icon\n"); - gtk_window_set_icon (GTK_WINDOW (mainWin), icon); - } - mainBox = gtk_vbox_new (FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (mainBox), 0); -#endif + menu = create_menu (mainWin); + hildon_program_set_common_app_menu (app, menu); /* Bin for tuner functionality */ appdata->bin1 = gst_pipeline_new ("bin1"); src1 = gst_element_factory_make (DEFAULT_AUDIOSRC, "src1"); + g_object_set (G_OBJECT (src1), "device", "source.voice.raw", NULL); + appdata->pitch = gst_element_factory_make ("pitch", "pitch"); g_object_set (G_OBJECT (appdata->pitch), "message", TRUE, "minfreq", 10, @@ -838,14 +851,8 @@ main (int argc, char *argv[]) /* Separator */ sep = gtk_hseparator_new (); - - /* Credits */ gtk_box_pack_start (GTK_BOX (mainBox), sep, FALSE, FALSE, 5); - label = gtk_label_new ("Tuner Tool developed by Josep Torra.\n" - "http://n770galaxy.blogspot.com/"); - gtk_box_pack_start (GTK_BOX (mainBox), label, FALSE, FALSE, 5); - /* Piano keyboard */ alignment = gtk_alignment_new (0.5, 0.5, 0, 0); appdata->drawingarea2 = gtk_drawing_area_new (); @@ -867,30 +874,22 @@ main (int argc, char *argv[]) } else { gtk_widget_set_events (appdata->drawingarea2, GDK_EXPOSURE_MASK); } -#ifdef HILDON - gtk_container_add (GTK_CONTAINER (view), mainBox); -#if defined(MAEMO1) - hildon_app_set_appview (app, view); - gtk_widget_show_all (GTK_WIDGET (app)); -#else - hildon_program_add_window (app, view); - gtk_widget_show_all (GTK_WIDGET (view)); -#endif -#else + gtk_container_add (GTK_CONTAINER (mainWin), mainBox); + hildon_program_add_window (app, HILDON_WINDOW (mainWin)); gtk_widget_show_all (GTK_WIDGET (mainWin)); -#endif -#if HILDON == 1 appdata->display_keepalive = settings_get_display_keepalive (DEFAULT_DISPLAY_KEEPALIVE); if (appdata->display_keepalive) display_keepalive (appdata); -#endif set_pipeline_states (appdata, GST_STATE_PLAYING); + //g_timeout_add (2000, (GSourceFunc) fake_frequency, appdata); + gtk_main (); + set_pipeline_states (appdata, GST_STATE_NULL); gst_object_unref (appdata->bin1); -- 1.7.9.5