diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2016-12-07 21:40:17 +0100 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2016-12-07 21:40:17 +0100 |
commit | eaff2aae1226bb5e65f62cd351b0187eb88356ea (patch) | |
tree | 009e6c034fa996d03318547def842e2e212abf40 /test | |
parent | 5b7bb10e612704862dd72fa337f29bd48d34cac5 (diff) |
test: fix build when USE_VIDEO is off
Diffstat (limited to 'test')
-rw-r--r-- | test/call.c | 2 | ||||
-rw-r--r-- | test/main.c | 2 | ||||
-rw-r--r-- | test/mock/mock_vidcodec.c | 4 | ||||
-rw-r--r-- | test/mock/mock_vidisp.c | 1 | ||||
-rw-r--r-- | test/srcs.mk | 3 |
5 files changed, 11 insertions, 1 deletions
diff --git a/test/call.c b/test/call.c index 4744b8a..9180a27 100644 --- a/test/call.c +++ b/test/call.c @@ -665,6 +665,7 @@ int test_call_dtmf(void) } +#ifdef USE_VIDEO int test_call_video(void) { struct fixture fix, *f = &fix; @@ -710,3 +711,4 @@ int test_call_video(void) return err; } +#endif diff --git a/test/main.c b/test/main.c index 487303e..cbfe686 100644 --- a/test/main.c +++ b/test/main.c @@ -28,7 +28,9 @@ static const struct test tests[] = { TEST(test_call_multiple), TEST(test_call_max), TEST(test_call_dtmf), +#ifdef USE_VIDEO TEST(test_call_video), +#endif TEST(test_cmd), TEST(test_cmd_long), TEST(test_contact), diff --git a/test/mock/mock_vidcodec.c b/test/mock/mock_vidcodec.c index c93f648..037a0b9 100644 --- a/test/mock/mock_vidcodec.c +++ b/test/mock/mock_vidcodec.c @@ -57,6 +57,7 @@ static int mock_encode_update(struct videnc_state **vesp, videnc_packet_h *pkth, void *arg) { struct videnc_state *ves; + (void)fmtp; if (!vesp || !vc || !prm || prm->pktsize < (HDR_SIZE + 1)) return EINVAL; @@ -85,6 +86,7 @@ static int mock_encode(struct videnc_state *ves, bool update, struct mbuf *hdr; uint8_t payload[2] = {0,0}; int err; + (void)update; if (!ves || !frame) return EINVAL; @@ -144,6 +146,8 @@ static int mock_decode(struct viddec_state *vds, struct vidframe *frame, struct vidsz size; struct hdr hdr; int err, i; + (void)marker; + (void)seq; if (!vds || !frame || !intra || !mb) return EINVAL; diff --git a/test/mock/mock_vidisp.c b/test/mock/mock_vidisp.c index da554b0..cf9cba0 100644 --- a/test/mock/mock_vidisp.c +++ b/test/mock/mock_vidisp.c @@ -55,6 +55,7 @@ static int mock_display(struct vidisp_st *st, const char *title, const struct vidframe *frame) { unsigned width, height; + (void)title; if (!st || !frame) return EINVAL; diff --git a/test/srcs.mk b/test/srcs.mk index 7960c58..29cd7b3 100644 --- a/test/srcs.mk +++ b/test/srcs.mk @@ -34,10 +34,11 @@ TEST_SRCS += mock/cert.c endif TEST_SRCS += mock/mock_ausrc.c +ifneq ($(USE_VIDEO),) TEST_SRCS += mock/mock_vidsrc.c TEST_SRCS += mock/mock_vidcodec.c TEST_SRCS += mock/mock_vidisp.c - +endif TEST_SRCS += test.c |