summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2009-06-13 20:03:28 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2009-06-13 20:03:28 +0100
commit7bcfaa6946d56a4d635ea3cd7455915435f20d5c (patch)
treed867abad14a99ec9b50adcde2971cf4a0e05ddce
parent1b1dd8e746b071bacf4d2c581e6eeac0f5ce2e68 (diff)
Make examples and tests use GCC_FLAGS
And few the few resulting warnings.
-rw-r--r--examples/Makefile.am6
-rw-r--r--examples/video-player.c17
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/test-rgb-upload.c1
-rw-r--r--tests/test-yuv-upload.c1
5 files changed, 21 insertions, 10 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 6baa80a..caec107 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,6 +1,10 @@
+NULL = #
+
noinst_PROGRAMS = video-player video-sink audio
-INCLUDES = -I$(top_srcdir)/
+INCLUDES = -I$(top_srcdir) \
+ $(GCC_FLAGS) \
+ $(NULL)
video_player_SOURCES = video-player.c
video_player_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
diff --git a/examples/video-player.c b/examples/video-player.c
index 0e008bf..5856c31 100644
--- a/examples/video-player.c
+++ b/examples/video-player.c
@@ -110,11 +110,13 @@ input_cb (ClutterStage *stage,
gpointer user_data)
{
VideoApp *app = (VideoApp*)user_data;
+ gboolean handled = FALSE;
switch (event->type)
{
case CLUTTER_MOTION:
show_controls (app, TRUE);
+ handled = TRUE;
break;
case CLUTTER_BUTTON_PRESS:
@@ -132,12 +134,10 @@ input_cb (ClutterStage *stage,
if (actor == app->control_pause || actor == app->control_play)
{
toggle_pause_state (app);
- return;
}
-
- if (actor == app->control_seek1 ||
- actor == app->control_seek2 ||
- actor == app->control_seekbar)
+ else if (actor == app->control_seek1 ||
+ actor == app->control_seek2 ||
+ actor == app->control_seekbar)
{
gfloat x, y, dist;
gdouble progress;
@@ -147,7 +147,7 @@ input_cb (ClutterStage *stage,
dist = bev->x - x;
- CLAMP (dist, 0, SEEK_W);
+ dist = CLAMP (dist, 0, SEEK_W);
progress = (gdouble) dist / SEEK_W;
@@ -155,6 +155,7 @@ input_cb (ClutterStage *stage,
progress);
}
}
+ handled = TRUE;
break;
case CLUTTER_KEY_PRESS:
@@ -180,10 +181,12 @@ input_cb (ClutterStage *stage,
g_signal_connect (animation, "completed",
G_CALLBACK (reset_animation),
app);
+ handled = TRUE;
break;
default:
toggle_pause_state (app);
+ handled = TRUE;
break;
}
}
@@ -191,7 +194,7 @@ input_cb (ClutterStage *stage,
break;
}
- return FALSE;
+ return handled;
}
static void
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ac9eb48..32e1c9d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,10 +1,12 @@
-NULL =
+NULL = #
noinst_PROGRAMS = test-yuv-upload \
test-rgb-upload \
$(NULL)
-INCLUDES = -I$(top_srcdir)/
+INCLUDES = -I$(top_srcdir) \
+ $(GCC_FLAGS) \
+ $(NULL)
test_yuv_upload_SOURCES = test-yuv-upload.c
test_yuv_upload_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
diff --git a/tests/test-rgb-upload.c b/tests/test-rgb-upload.c
index 0185c7e..77efc00 100644
--- a/tests/test-rgb-upload.c
+++ b/tests/test-rgb-upload.c
@@ -1,5 +1,6 @@
#include <string.h>
+#include <glib/gprintf.h>
#include <clutter-gst/clutter-gst.h>
static gint opt_framerate = 30;
diff --git a/tests/test-yuv-upload.c b/tests/test-yuv-upload.c
index 0edc928..cd7360a 100644
--- a/tests/test-yuv-upload.c
+++ b/tests/test-yuv-upload.c
@@ -1,5 +1,6 @@
#include <string.h>
+#include <glib/gprintf.h>
#include <clutter-gst/clutter-gst.h>
static gint opt_framerate = 30;