diff options
author | Stefan Kost <ensonic@users.sf.net> | 2011-01-12 17:13:07 +0200 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2011-02-07 11:28:23 +0200 |
commit | 4915493932ef5b4767c0772f180fd48413288950 (patch) | |
tree | 1f5439509ef2831b8093bc8e0e5730ace636f8a1 /tests/examples | |
parent | 2b4c85414632fd4538ab135414fb227be46f80bd (diff) | |
download | gstreamer-plugins-bad-4915493932ef5b4767c0772f180fd48413288950.tar.gz |
camerabin-tests: fix lookup of UI files
These are uninstalled examples. Pass $srcdir to cpp to build the correct
location for the UI file.
Diffstat (limited to 'tests/examples')
-rw-r--r-- | tests/examples/camerabin/Makefile.am | 4 | ||||
-rw-r--r-- | tests/examples/camerabin/gst-camera.c | 12 | ||||
-rw-r--r-- | tests/examples/camerabin2/Makefile.am | 2 | ||||
-rw-r--r-- | tests/examples/camerabin2/gst-camera2.c | 2 |
4 files changed, 7 insertions, 13 deletions
diff --git a/tests/examples/camerabin/Makefile.am b/tests/examples/camerabin/Makefile.am index 5898a0ce5..9d74d91d7 100644 --- a/tests/examples/camerabin/Makefile.am +++ b/tests/examples/camerabin/Makefile.am @@ -21,7 +21,7 @@ gst_camera_LDADD = \ noinst_DATA = $(GST_CAMERABIN_UI_FILES) -INCLUDES = -DCAMERA_APPS_UIDIR=\""$(uidir)"\" +INCLUDES = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\" else GST_CAMERABIN_GTK_EXAMPLES = @@ -29,7 +29,7 @@ endif gst_camera_perf_SOURCES = gst-camera-perf.c gst_camera_perf_CFLAGS = $(GST_CFLAGS) -gst_camera_perf_LDADD = $(GST_LIBS) +gst_camera_perf_LDADD = $(GST_LIBS) if HAVE_X11 diff --git a/tests/examples/camerabin/gst-camera.c b/tests/examples/camerabin/gst-camera.c index eded8bb88..57ff706e1 100644 --- a/tests/examples/camerabin/gst-camera.c +++ b/tests/examples/camerabin/gst-camera.c @@ -65,8 +65,7 @@ gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a) #define PREVIEW_TIME_MS (2 * 1000) #define N_BURST_IMAGES 10 -#define DEFAULT_UI_FILE "gst-camera.ui" -#define SHARED_UI_FILE CAMERA_APPS_UIDIR"/"DEFAULT_UI_FILE +#define UI_FILE CAMERA_APPS_UIDIR G_DIR_SEPARATOR_S "gst-camera.ui" /* Names of default elements */ #define CAMERA_APP_VIDEOSRC "v4l2src" @@ -762,7 +761,7 @@ set_metadata (void) /* for more information about image metadata tags, see: * http://webcvs.freedesktop.org/gstreamer/gst-plugins-bad/tests/icles/metadata_editor.c * and for the mapping: - * http://webcvs.freedesktop.org/gstreamer/gst-plugins-bad/ext/metadata/metadata_mapping.htm?view=co + * http://webcvs.freedesktop.org/gstreamer/gst-plugins-bad/ext/metadata/metadata_mapping.htm?view=co */ GstTagSetter *setter = GST_TAG_SETTER (gst_camera_bin); @@ -1622,14 +1621,9 @@ static gboolean ui_create (void) { GError *error = NULL; - const gchar *uifile = DEFAULT_UI_FILE; - - if (!g_file_test (uifile, G_FILE_TEST_EXISTS)) { - uifile = SHARED_UI_FILE; - } builder = gtk_builder_new (); - if (!gtk_builder_add_from_file (builder, uifile, &error)) { + if (!gtk_builder_add_from_file (builder, UI_FILE, &error)) { g_warning ("Couldn't load builder file: %s", error->message); g_error_free (error); goto done; diff --git a/tests/examples/camerabin2/Makefile.am b/tests/examples/camerabin2/Makefile.am index 781f20163..5fa753471 100644 --- a/tests/examples/camerabin2/Makefile.am +++ b/tests/examples/camerabin2/Makefile.am @@ -21,7 +21,7 @@ gst_camera2_LDADD = \ noinst_DATA = $(GST_CAMERABIN_UI_FILES) -INCLUDES = -DCAMERA_APPS_UIDIR=\""$(uidir)"\" +INCLUDES = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\" else GST_CAMERABIN_GTK_EXAMPLES = diff --git a/tests/examples/camerabin2/gst-camera2.c b/tests/examples/camerabin2/gst-camera2.c index 42b6e07a0..14e3be10f 100644 --- a/tests/examples/camerabin2/gst-camera2.c +++ b/tests/examples/camerabin2/gst-camera2.c @@ -37,7 +37,7 @@ #include <gdk/gdkx.h> #include <gdk/gdkkeysyms.h> -#define UI_FILE "gst-camera2.ui" +#define UI_FILE CAMERA_APPS_UIDIR G_DIR_SEPARATOR_S "gst-camera2.ui" static GstElement *camera; static GtkBuilder *builder; |