change tdm capture capbility 34/99934/2
authorBoram Park <boram1288.park@samsung.com>
Thu, 24 Nov 2016 10:40:35 +0000 (19:40 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 25 Nov 2016 07:53:11 +0000 (23:53 -0800)
scale & transform seem the default capability. remove it.

tdm backend might support both oneshot and stream dump. And it's possible for
backend to support stream dump only.

Change-Id: I46b534c432dd15117658296d3eb427a9f004f3d9

include/tdm_common.h
tools/tdm_test_server.c

index 1894505..3b9f5fa 100644 (file)
@@ -143,8 +143,8 @@ typedef enum {
 typedef enum {
        TDM_CAPTURE_CAPABILITY_OUTPUT    = (1 << 0), /**< The capture device supports to dump a output */
        TDM_CAPTURE_CAPABILITY_LAYER     = (1 << 1), /**< The capture device supports to dump a layer */
-       TDM_CAPTURE_CAPABILITY_SCALE     = (1 << 4), /**< The capture device supports scale operation */
-       TDM_CAPTURE_CAPABILITY_TRANSFORM = (1 << 5), /**< The capture device supports transform operation */
+       TDM_CAPTURE_CAPABILITY_ONESHOT   = (1 << 4), /**< The capture device supports oneshot dump */
+       TDM_CAPTURE_CAPABILITY_STREAM    = (1 << 5), /**< The capture device supports streamp sump */
 } tdm_capture_capability;
 
 /**
index e7ee525..4ea6d11 100644 (file)
@@ -105,7 +105,7 @@ static struct optstrings optstrs[] = {
        },
        {
                OPT_TST, "c", "catpure a output object or a layer object.\n\t\t'-l' is used to show the result on screen.",
-               "<output_idx>[,<layer_idx>]~<w>x<h>[+<x>+<y>][,<h>x<v>][@<format>][*<transform>]", NULL
+               "<output_idx>[,<layer_idx>]~<w>x<h>[+<x>+<y>][,<h>x<v>][@<format>][*<transform>][^stream]", NULL
        },
        {
                OPT_GEN, "w", "set the property of a object",
@@ -421,6 +421,13 @@ parse_arg_c(tdm_test_server_capture *c, char *arg)
                arg = end + 1;
                capture_info->transform = strtol(arg, &end, 10);
        }
+       if (*end == '^') {
+               arg = end + 1;
+               if (strtol(arg, &end, 10) > 0)
+                       capture_info->type = TDM_CAPTURE_TYPE_STREAM;
+               else
+                       capture_info->type = TDM_CAPTURE_TYPE_ONESHOT;
+       }
 }
 
 static void