From 8a554946f87e1a22d391bd8dee2e9876ed3cb47e Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 9 Feb 2021 10:23:23 +0100 Subject: [PATCH] Libug testers: disable strips options --- test_libug_receiver.c | 6 +++++- test_libug_sender.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test_libug_receiver.c b/test_libug_receiver.c index 9c9e17cdd..a0e4eae80 100644 --- a/test_libug_receiver.c +++ b/test_libug_receiver.c @@ -33,13 +33,14 @@ static void usage(const char *progname) { printf("\t-h - show this help\n"); printf("\t-d - display (default vrg)\n"); printf("\t-c I420|RGBA - force decompress to codec\n"); + printf("\t-n - disable strips\n"); } int main(int argc, char *argv[]) { struct ug_receiver_parameters init_params = { 0 }; int ch = 0; - while ((ch = getopt(argc, argv, "c:d:h")) != -1) { + while ((ch = getopt(argc, argv, "c:d:hn")) != -1) { switch (ch) { case 'c': assert(strcmp(optarg, "RGBA") == 0 || strcmp(optarg, "I420") == 0); @@ -51,6 +52,9 @@ int main(int argc, char *argv[]) { case 'h': usage(argv[0]); return 0; + case 'n': + init_params.disable_strips = 1; + break; default: usage(argv[0]); return 1; diff --git a/test_libug_sender.c b/test_libug_sender.c index 02dc3ba94..bbdd4eee4 100644 --- a/test_libug_sender.c +++ b/test_libug_sender.c @@ -22,6 +22,7 @@ static void usage(const char *progname) { printf("options:\n"); printf("\t-h - show this help\n"); printf("\t-j - use JPEG\n"); + printf("\t-n - disable strips\n"); } static void fill(unsigned char *data, int width, int height, libug_pixfmt_t pixfmt) { @@ -42,9 +43,10 @@ int main(int argc, char *argv[]) { init_params.compression = UG_UNCOMPRESSED; init_params.rprc = render_packet_received_callback; init_params.rprc_udata = NULL; // not used by render_packet_received_callback() + bool disable_strips = false; int ch = 0; - while ((ch = getopt(argc, argv, "hj")) != -1) { + while ((ch = getopt(argc, argv, "hjn")) != -1) { switch (ch) { case 'h': usage(argv[0]); @@ -52,6 +54,9 @@ int main(int argc, char *argv[]) { case 'j': init_params.compression = UG_JPEG; break; + case 'n': + init_params.disable_strips = 1; + break; default: usage(argv[0]); return -2;