/**
* @brief Sets a callback function to be invoked for extra preview frames.
* @since_tizen 7.0
+ * @remarks This function should not be called within a invoked @a callback,\n
+ * otherwise #CAMERA_ERROR_INVALID_OPERATION is returned. (Since 9.0)
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @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()
/**
* @brief Unsets the extra preview callback function.
* @since_tizen 7.0
+ * @remarks This function should not be called within a invoked @a callback,\n
+ * otherwise #CAMERA_ERROR_INVALID_OPERATION is returned. (Since 9.0)
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_extra_preview_cb()
*/
* it could not be displayed on the device in case of copied buffer.\n
* and if camera_is_supported_media_packet_preview_cb() returns false,\n
* it's copied buffer case.
+ * @remarks This function should not be called within a invoked @a callback,\n
+ * otherwise #CAMERA_ERROR_INVALID_OPERATION is returned. (Since 9.0)
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre Before 4.0 : The camera state must be set to #CAMERA_STATE_CREATED.\n
* Since 4.0 : The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
/**
* @brief Unsets the preview callback function.
* @since_tizen 2.3
+ * @remarks This function should not be called within a invoked @a callback,\n
+ * otherwise #CAMERA_ERROR_INVALID_OPERATION is returned. (Since 9.0)
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_cb()
*/
* The callback function holds the same buffer that will be drawn on the display device.\n
* So if you change the media packet in a callback, it will be displayed on the device\n
* and the media packet is available until it's destroyed by media_packet_destroy().
+ * @remarks This function should not be called within a invoked @a callback,\n
+ * otherwise #CAMERA_ERROR_INVALID_OPERATION is returned. (Since 9.0)
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera's state should be #CAMERA_STATE_CREATED.
* @see camera_start_preview()
/**
* @brief Unsets the media packet callback function.
* @since_tizen 2.3
+ * @remarks This function should not be called within a invoked @a callback,\n
+ * otherwise #CAMERA_ERROR_INVALID_OPERATION is returned. (Since 9.0)
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_media_packet_preview_cb()
*/
return CAMERA_ERROR_INVALID_PARAMETER;
}
+ CAMERA_CHECK_THREAD_RETURN_VAL(pc->cb_info->preview_cb_info.thread,
+ CAMERA_ERROR_INVALID_OPERATION, "should not be called within a invoked callback");
+
CAM_LOG_INFO("Enter");
_camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
muse_camera_api_e api = MUSE_CAMERA_API_UNSET_PREVIEW_CB;
CAMERA_CHECK_HANDLE_RETURN_VAL(pc, CAMERA_ERROR_INVALID_PARAMETER);
+ CAMERA_CHECK_THREAD_RETURN_VAL(pc->cb_info->preview_cb_info.thread,
+ CAMERA_ERROR_INVALID_OPERATION, "should not be called within a invoked callback");
CAM_LOG_INFO("Enter");
return CAMERA_ERROR_INVALID_PARAMETER;
}
+ CAMERA_CHECK_THREAD_RETURN_VAL(pc->cb_info->preview_cb_info.thread,
+ CAMERA_ERROR_INVALID_OPERATION, "should not be called within a invoked callback");
+
CAM_LOG_INFO("Enter");
_camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
return CAMERA_ERROR_NOT_SUPPORTED;
}
+ CAMERA_CHECK_THREAD_RETURN_VAL(pc->cb_info->preview_cb_info.thread,
+ CAMERA_ERROR_INVALID_OPERATION, "should not be called within a invoked callback");
+
CAM_LOG_INFO("Enter");
_camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
return CAMERA_ERROR_INVALID_PARAMETER;
}
+ CAMERA_CHECK_THREAD_RETURN_VAL(pc->cb_info->preview_cb_info.thread,
+ CAMERA_ERROR_INVALID_OPERATION, "should not be called within a invoked callback");
+
CAM_LOG_INFO("Enter");
_camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
return CAMERA_ERROR_NOT_SUPPORTED;
}
+ CAMERA_CHECK_THREAD_RETURN_VAL(pc->cb_info->preview_cb_info.thread,
+ CAMERA_ERROR_INVALID_OPERATION, "should not be called within a invoked callback");
+
CAM_LOG_INFO("Enter");
_camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);