Add new internal APIs for extra preview stream format
[platform/core/api/camera.git] / include / camera_internal.h
index 27e2b37..ef092a1 100644 (file)
@@ -97,6 +97,7 @@ typedef struct _camera_device_s {
        camera_device_e index;
        char name[DEVICE_NAME_MAX_LENGTH];
        char id[DEVICE_ID_MAX_LENGTH];
+       int extra_stream_num;
 } camera_device_s;
 
 typedef struct _camera_device_list_s {
@@ -379,6 +380,52 @@ int camera_unset_extra_preview_cb(camera_h camera);
 
 /**
  * @internal
+ * @brief Sets the extra preview stream format.
+ * @since_tizen 6.5
+ * @param[in] camera       The handle to the camera
+ * @param[in] stream_id    The id of extra preview stream
+ * @param[in] pixel_format The pixel format of extra preview stream
+ * @param[in] width        The width of extra preview stream
+ * @param[in] height       The height of extra preview stream
+ * @param[in] fps          The fps of extra preview stream
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
+ * @see camera_start_preview()
+ * @see camera_set_extra_preview_cb()
+ * @see camera_unset_extra_preview_cb()
+ * @see camera_get_extra_preview_stream_format()
+ */
+int camera_set_extra_preview_stream_format(camera_h camera, int stream_id, camera_pixel_format_e pixel_format, int width, int height, int fps);
+
+/**
+ * @internal
+ * @brief Gets the extra preview stream format.
+ * @since_tizen 6.5
+ * @param[in] camera        The handle to the camera
+ * @param[in] stream_id     The id of extra preview stream
+ * @param[out] pixel_format The pixel format of extra preview stream
+ * @param[out] width        The width of extra preview stream
+ * @param[out] height       The height of extra preview stream
+ * @param[out] fps          The fps of extra preview stream
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
+ * @see camera_start_preview()
+ * @see camera_set_extra_preview_cb()
+ * @see camera_unset_extra_preview_cb()
+ * @see camera_set_extra_preview_stream_format()
+ */
+int camera_get_extra_preview_stream_format(camera_h camera, int stream_id, camera_pixel_format_e *pixel_format, int *width, int *height, int *fps);
+
+/**
+ * @internal
  * @brief Sets the manual focus level.
  * @since_tizen 6.5
  * @remarks The auto focusing will be stopped when camera_attr_set_focus_level() is called.