Change default value of MV_3D_DEPTH_MODE in json to '1', 25/284225/2
authorTae-Young Chung <ty83.chung@samsung.com>
Mon, 14 Nov 2022 02:58:20 +0000 (11:58 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Tue, 15 Nov 2022 00:04:46 +0000 (00:04 +0000)
and add error return when the mode is MV_3D_DEPTH_MODE_NONE

[Issue type] update and bug fix

Change-Id: I23d73be70123c07ae7d2bd931207e9f4e90ff5b3
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
media-vision-config.json
mv_3d/3d/src/Mv3d.cpp

index 136ab1b..abd55a3 100644 (file)
         {
             "name"  : "MV_3D_DEPTH_MODE",
             "type"  : "integer",
-            "value" : 0
+            "value" : 1
         },
         {
             "name"  : "MV_3D_DEPTH_WIDTH",
index 6cd83b7..4bbee8c 100644 (file)
@@ -156,6 +156,11 @@ namespace mv3d
 
        int Mv3d::Prepare()
        {
+               if (mMode == MV_3D_DEPTH_MODE_NONE) {
+                       LOGE("Invalid Operation. Set proper MV_3D_DEPTH_MODE");
+                       return  MEDIA_VISION_ERROR_INVALID_OPERATION;
+               }
+
                if (!mDfsAdaptor) {
                        LOGE("Invalid Opertation. Do Configure first.");
                        return MEDIA_VISION_ERROR_INVALID_OPERATION;