screencast: prefix macros to avoid conflict with system definitions

In file included from ../src/screencast/wlr_screencast.c:18:
../include/pipewire_screencast.h:7:9: error: 'ALIGN' macro redefined [-Werror,-Wmacro-redefined]
 #define ALIGN 16
         ^
/usr/include/machine/param.h:79:9: note: previous definition is here
 #define ALIGN(p)                _ALIGN(p)
         ^
This commit is contained in:
Jan Beich 2020-12-21 10:40:02 +00:00 committed by Simon Ser
parent 4dbeaf3a06
commit a3e203584a
2 changed files with 4 additions and 4 deletions

View file

@ -3,8 +3,8 @@
#include "screencast_common.h"
#define BUFFERS 1
#define ALIGN 16
#define XDPW_PWR_BUFFERS 1
#define XDPW_PWR_ALIGN 16
void xdpw_pwr_stream_init(struct xdpw_screencast_instance *cast);
int xdpw_pwr_core_connect(struct xdpw_state *state);

View file

@ -115,11 +115,11 @@ static void pwr_handle_stream_param_changed(void *data, uint32_t id,
params[0] = spa_pod_builder_add_object(&b,
SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(BUFFERS, 1, 32),
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(XDPW_PWR_BUFFERS, 1, 32),
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
SPA_PARAM_BUFFERS_size, SPA_POD_Int(cast->simple_frame.size),
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(cast->simple_frame.stride),
SPA_PARAM_BUFFERS_align, SPA_POD_Int(ALIGN));
SPA_PARAM_BUFFERS_align, SPA_POD_Int(XDPW_PWR_ALIGN));
params[1] = spa_pod_builder_add_object(&b,
SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,