[CTC][camera][NonACR] Add H.264 format to supported format list 57/316957/5
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 2 Sep 2024 02:16:19 +0000 (11:16 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 2 Sep 2024 08:38:23 +0000 (17:38 +0900)
- H.264 format is also included in compliance specification.
  https://docs.tizen.org/platform/compliance/compliance-specification/

Change-Id: I0977f852ede70110db20688220f85629e60da4fb
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
src/ctc/camera/CTs-camera-common.c
src/ctc/camera/CTs-camera.c

index 11547415ded51cbe97fe1587e3dda148f1c66e31..c0a23cef11ff1fba250d1b790d21edd69d2a1cc3 100755 (executable)
@@ -46,7 +46,12 @@ char* CameraPixelFormat(int format)
        case CAMERA_PIXEL_FORMAT_RGB888:        szPixFormat = "RGB888 pixel format";                            break;
        case CAMERA_PIXEL_FORMAT_RGBA:          szPixFormat = "RGBA pixel format";                                      break;
        case CAMERA_PIXEL_FORMAT_ARGB:          szPixFormat = "ARGB pixel format";                                      break;
-       case CAMERA_PIXEL_FORMAT_JPEG:          szPixFormat = "Encoded pixel format";                           break;
+       case CAMERA_PIXEL_FORMAT_JPEG:          szPixFormat = "Encoded - JPEG";                                         break;
+       case CAMERA_PIXEL_FORMAT_H264:          szPixFormat = "Encoded - H.264";                                        break;
+       case CAMERA_PIXEL_FORMAT_INVZ:          szPixFormat = "Depth - INVZ";                                           break;
+       case CAMERA_PIXEL_FORMAT_MJPEG:         szPixFormat = "Encoded - MJPEG";                                        break;
+       case CAMERA_PIXEL_FORMAT_VP8:           szPixFormat = "Encoded - VP8";                                          break;
+       case CAMERA_PIXEL_FORMAT_VP9:           szPixFormat = "Encoded - VP9";                                          break;
        }
 
        return szPixFormat;
@@ -62,7 +67,7 @@ char* CameraPixelFormat(int format)
 char* CameraGetError(int nRet)
 {
        char *pszErrorMsg = NULL;
-       
+
        switch ( nRet )
        {
        case CAMERA_ERROR_NONE:                                         pszErrorMsg = "CAMERA_ERROR_NONE";                                      break;
index 498d03dbf3f9db3a2e96e469af325cce5a63601f..bdba334291fa565226951dfddf88aef8ef315bc1 100755 (executable)
@@ -70,7 +70,8 @@ int szSupportedFormats[] = {CAMERA_PIXEL_FORMAT_RGB565,
                                                        CAMERA_PIXEL_FORMAT_I420,
                                                        CAMERA_PIXEL_FORMAT_JPEG,
                                                        CAMERA_PIXEL_FORMAT_NV12,
-                                                       CAMERA_PIXEL_FORMAT_UYVY};
+                                                       CAMERA_PIXEL_FORMAT_UYVY,
+                                                       CAMERA_PIXEL_FORMAT_H264};
 
 /**
 * @function            CameraPreviewFormatCallback
@@ -92,7 +93,7 @@ static bool CameraPreviewFormatCallback(camera_pixel_format_e format, void *user
        }
        return true;
 }
+
 /** @addtogroup        ctc-camera-testcases
 * @brief               Integration testcases for module camera
 * @ingroup             ctc-camera
@@ -119,11 +120,11 @@ static bool CameraPreviewFormatCallback(camera_pixel_format_e format, void *user
 int CTc_camera_supported_preview_pixel_format(void)
 {
        START_TEST;
-       
+
        g_nSupportedFormats = 0;
        bool bCameraSupported;
        IS_FEATURE_SUPPORTED(CAMERA_FEAUTRE, bCameraSupported, API_NAMESPACE);
-       
+
        if ( bCameraSupported )
        {
                /** Compliance specification states that if camera is supported then atleast one of :
@@ -139,22 +140,22 @@ int CTc_camera_supported_preview_pixel_format(void)
                int nRet = CAMERA_ERROR_NONE;
                nRet = camera_create(CAMERA_DEVICE_CAMERA0, &hCamera);
                PRINT_RESULT(CAMERA_ERROR_NONE, nRet, "camera_create", CameraGetError(nRet));
-               
+
                nRet = camera_foreach_supported_preview_format(hCamera, CameraPreviewFormatCallback, NULL);
                PRINT_RESULT_CLEANUP(CAMERA_ERROR_NONE, nRet, "camera_foreach_supported_preview_format", CameraGetError(nRet), camera_destroy(hCamera));
-               
+
                if ( g_nSupportedFormats == 0 )
                {
                        FPRINTF("[Line : %d][%s] No supported pixel format among the mentioned ones\\n", __LINE__, API_NAMESPACE);
                        camera_destroy(hCamera);
                        return 1;
                }
-               
+
                FPRINTF("[Line : %d][%s] %d pixel formats supported among the mentioned ones\\n", __LINE__, API_NAMESPACE, g_nSupportedFormats);
                camera_destroy(hCamera);
-       }       
+       }
        return 0;
 }
 
 /** @} */ //end of ctc-camera-testcases
-/** @} */ //end of ctc-camera
\ No newline at end of file
+/** @} */ //end of ctc-camera