From 577f06cfebf26f40e6adb40ec8be185ca62846d2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 28 Oct 2019 19:02:04 +0100 Subject: [PATCH] Fix and use constants --- examples/video-dsp-play.c | 10 +++++----- src/meson.build | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/examples/video-dsp-play.c b/examples/video-dsp-play.c index e67c33055..e503ef709 100644 --- a/examples/video-dsp-play.c +++ b/examples/video-dsp-play.c @@ -30,9 +30,9 @@ #include -#define WIDTH 640 -#define HEIGHT 480 -#define BPP 3 +#define WIDTH 320 +#define HEIGHT 240 +#define BPP 16 #define MAX_BUFFERS 64 @@ -153,8 +153,8 @@ int main(int argc, char *argv[]) jack_set_process_callback (data.client, process, &data); - data.width = 320; - data.height = 240; + data.width = WIDTH; + data.height = HEIGHT; data.stride = data.width * 4 * sizeof(float); if (SDL_Init(SDL_INIT_VIDEO) < 0) { diff --git a/src/meson.build b/src/meson.build index a2269e7b4..7287ab482 100644 --- a/src/meson.build +++ b/src/meson.build @@ -22,3 +22,12 @@ pipewire_jack = shared_library('jack', dependencies : [pipewire_dep, jack_dep, mathlib], install : false, ) + +if sdl_dep.found() + executable('video-dsp-play', + '../examples/video-dsp-play.c', + c_args : [ '-D_GNU_SOURCE' ], + install: false, + dependencies : [jack_dep, sdl_dep, mathlib], + ) +endif