Change default value of MV_3D_DEPTH_MODE in json to '1', 74/284274/1
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:17:07 +0000 (00:17 +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>
(cherry picked from commit 323deebb2bf8413e952e4f8b5faf9ce3ce020093)

media-vision-config.json
mv_3d/3d/src/Mv3d.cpp

index 136ab1b71ac06b4beee27444639d7850afe630b0..abd55a352053753fcd6cce1320689bdec5c5de73 100644 (file)
         {
             "name"  : "MV_3D_DEPTH_MODE",
             "type"  : "integer",
-            "value" : 0
+            "value" : 1
         },
         {
             "name"  : "MV_3D_DEPTH_WIDTH",
index 6cd83b70197380f55913cc21198cc8c8fe8f4af5..4bbee8ced87cd5f9f6556c46cd64f9f3d70abcb3 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;