[ITC][camera][ACR-1715]Change parameter of some API 94/280194/4
authorAnkit Srivastava <ankit.sri1@samsung.com>
Thu, 25 Aug 2022 06:31:26 +0000 (12:01 +0530)
committerAnkit Srivastava <ankit.sri1@samsung.com>
Tue, 30 Aug 2022 09:11:32 +0000 (09:11 +0000)
Change-Id: I03094c29c68c3b75383e5a11ded6fa6a8bd23790
Signed-off-by: Ankit Srivastava <ankit.sri1@samsung.com>
src/itc/camera/ITs-camera.c

index 1ffd85cc198e22f50911794cdb3949662df60748..c6c5b43b211dc4fc038fc1c94bbabcfd97845d65 100644 (file)
@@ -548,8 +548,7 @@ static bool CameraAttrSupportedPreviewResolutionCB(int width, int height, void *
 * @return                      false: skip next value, true: check next value
 */
 
-static bool CameraAttrSupportedDeviceCB(camera_device_type_e type, camera_device_e device,
-       const char *name, const char *id, int extra_preview_stream_num, void *user_data)
+static bool CameraAttrSupportedDeviceCB(camera_device_s *device, void *user_data)
 {
 #if DEBUG
        FPRINTF("[Line : %d][%s] reached camera supported device callback, supported type = %d\\n", __LINE__, API_NAMESPACE, type);
@@ -559,9 +558,9 @@ static bool CameraAttrSupportedDeviceCB(camera_device_type_e type, camera_device
        {
                FPRINTF("[Line : %d][%s] user data is null \\n", __LINE__, API_NAMESPACE);
        }
-       if (type == CAMERA_DEVICE_TYPE_NETWORK) {
+       if (device->type == CAMERA_DEVICE_TYPE_NETWORK) {
                g_bNetworkCameraSupported = true;
-               g_eNetworkCameraDev = device;
+               g_eNetworkCameraDev = device->index;
                return false;
        }
 
@@ -574,8 +573,7 @@ static bool CameraAttrSupportedDeviceCB(camera_device_type_e type, camera_device
 * @parameter           camera_device_type_e type, camera_device_e device, const char *name, const char *id, int extra_preview_stream_num, bool is_connected, void *user_data : user data to be passed
 * @return              NA
 */
-static void CameraAttrDeviceConnectionChangedCB(camera_device_type_e type, camera_device_e device,
-       const char *name, const char *id, int extra_preview_stream_num, bool is_connected, void *user_data)
+static void CameraAttrDeviceConnectionChangedCB(camera_device_s *device, bool is_connected, void *user_data)
 {
 #if DEBUG
        FPRINTF("[Line : %d][%s] reached camera device connection changed callback, supported type = %d, supported device = %d\\n", __LINE__, API_NAMESPACE, type, device);
@@ -585,7 +583,7 @@ static void CameraAttrDeviceConnectionChangedCB(camera_device_type_e type, camer
        {
                FPRINTF("[Line : %d][%s] user data is null \\n", __LINE__, API_NAMESPACE);
        }
-       FPRINTF("[Line : %d][%s] device [%d], name[%s], id[%s], is_connected[%d], extra stream num[%d]\n", __LINE__, API_NAMESPACE,device, name, id, is_connected, extra_preview_stream_num);
+       FPRINTF("[Line : %d][%s] device [%d], name[%s], id[%s], is_connected[%d], extra stream num[%d]\n", __LINE__, API_NAMESPACE, device->type, device->name, device->id, is_connected, device->extra_stream_num);
        return;
 }