mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 06:58:49 +00:00
camerabin-tests: fix lookup of UI files
These are uninstalled examples. Pass $srcdir to cpp to build the correct location for the UI file.
This commit is contained in:
parent
2b4c854146
commit
4915493932
4 changed files with 7 additions and 13 deletions
|
@ -21,7 +21,7 @@ gst_camera_LDADD = \
|
||||||
|
|
||||||
noinst_DATA = $(GST_CAMERABIN_UI_FILES)
|
noinst_DATA = $(GST_CAMERABIN_UI_FILES)
|
||||||
|
|
||||||
INCLUDES = -DCAMERA_APPS_UIDIR=\""$(uidir)"\"
|
INCLUDES = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\"
|
||||||
|
|
||||||
else
|
else
|
||||||
GST_CAMERABIN_GTK_EXAMPLES =
|
GST_CAMERABIN_GTK_EXAMPLES =
|
||||||
|
|
|
@ -65,8 +65,7 @@ gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
|
||||||
|
|
||||||
#define PREVIEW_TIME_MS (2 * 1000)
|
#define PREVIEW_TIME_MS (2 * 1000)
|
||||||
#define N_BURST_IMAGES 10
|
#define N_BURST_IMAGES 10
|
||||||
#define DEFAULT_UI_FILE "gst-camera.ui"
|
#define UI_FILE CAMERA_APPS_UIDIR G_DIR_SEPARATOR_S "gst-camera.ui"
|
||||||
#define SHARED_UI_FILE CAMERA_APPS_UIDIR"/"DEFAULT_UI_FILE
|
|
||||||
|
|
||||||
/* Names of default elements */
|
/* Names of default elements */
|
||||||
#define CAMERA_APP_VIDEOSRC "v4l2src"
|
#define CAMERA_APP_VIDEOSRC "v4l2src"
|
||||||
|
@ -1622,14 +1621,9 @@ static gboolean
|
||||||
ui_create (void)
|
ui_create (void)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
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 ();
|
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_warning ("Couldn't load builder file: %s", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -21,7 +21,7 @@ gst_camera2_LDADD = \
|
||||||
|
|
||||||
noinst_DATA = $(GST_CAMERABIN_UI_FILES)
|
noinst_DATA = $(GST_CAMERABIN_UI_FILES)
|
||||||
|
|
||||||
INCLUDES = -DCAMERA_APPS_UIDIR=\""$(uidir)"\"
|
INCLUDES = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\"
|
||||||
|
|
||||||
else
|
else
|
||||||
GST_CAMERABIN_GTK_EXAMPLES =
|
GST_CAMERABIN_GTK_EXAMPLES =
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <gdk/gdkkeysyms.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 GstElement *camera;
|
||||||
static GtkBuilder *builder;
|
static GtkBuilder *builder;
|
||||||
|
|
Loading…
Reference in a new issue