RECORDER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< The access to the resources can not be granted */
RECORDER_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The feature is not supported */
RECORDER_ERROR_RESOURCE_CONFLICT = RECORDER_ERROR_CLASS | 0x0c, /**< Blocked by resource conflict (Since 3.0) */
+ RECORDER_ERROR_SERVICE_DISCONNECTED = RECORDER_ERROR_CLASS | 0x0d, /**< Socket connection lost (Since 3.0) */
} recorder_error_e;
/**
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state should be #RECORDER_STATE_CREATED by recorder_create_videorecorder(), recorder_create_audiorecorder() or recorder_unprepare().
* @post The recorder state will be #RECORDER_STATE_READY.
* @post If recorder handle is created by recorder_create_videorecorder(), the camera state will be changed to #CAMERA_STATE_PREVIEW.
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state should be #RECORDER_STATE_READY set by recorder_prepare(), recorder_cancel() or recorder_commit().
* @post The recorder state will be #RECORDER_STATE_CREATED.
* @post If the recorder handle is created by recorder_create_videorecorder(), camera state will be changed to #CAMERA_STATE_CREATED.
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_READY by recorder_prepare() or #RECORDER_STATE_PAUSED by recorder_pause(). \n
* The filename should be set by recorder_set_filename().
* @post The recorder state will be #RECORDER_STATE_RECORDING.
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_RECORDING.
* @post The recorder state will be #RECORDER_STATE_PAUSED.
* @see recorder_pause()
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_RECORDING set by recorder_start() or #RECORDER_STATE_PAUSED by recorder_pause().
* @post The recorder state will be #RECORDER_STATE_READY.
* @see recorder_pause()
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_RECORDING set by recorder_start() or #RECORDER_STATE_PAUSED by recorder_pause().
* @post The recorder state will be #RECORDER_STATE_READY.
* @see recorder_pause()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
*/
int recorder_get_state(recorder_h recorder, recorder_state_e *state);
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_RECORDING or #RECORDER_STATE_PAUSED.
*/
int recorder_get_audio_level(recorder_h recorder, double *dB);
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_get_filename()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_filename()
*/
int recorder_get_filename(recorder_h recorder, char **path);
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1)
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
* Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
* @see recorder_get_file_format()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_file_format()
* @see recorder_foreach_supported_file_format()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post recorder_supported_file_format_cb() will be invoked.
* @see recorder_get_file_format()
* @see recorder_set_file_format()
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1)
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_get_audio_encoder()
* @see recorder_foreach_supported_audio_encoder()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_audio_encoder()
* @see recorder_foreach_supported_audio_encoder()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post recorder_supported_audio_encoder_cb() will be invoked.
* @see recorder_set_audio_encoder()
* @see recorder_get_audio_encoder()
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_start()
* @see recorder_get_video_resolution()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_video_resolution()
* @see recorder_foreach_supported_video_resolution()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution.
* @see recorder_set_video_resolution()
* @see recorder_get_video_resolution()
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_get_video_encoder()
* @see recorder_foreach_supported_video_encoder()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_video_encoder()
* @see recorder_foreach_supported_video_encoder()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post recorder_supported_video_encoder_cb() will be invoked.
* @see recorder_set_video_encoder()
* @see recorder_get_video_encoder()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post recorder_state_changed_cb() will be invoked.
* @see recorder_unset_state_changed_cb()
* @see recorder_state_changed_cb()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_state_changed_cb()
*/
int recorder_unset_state_changed_cb(recorder_h recorder);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_unset_interrupted_cb()
* @see recorder_interrupted_cb()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_interrupted_cb()
*/
int recorder_unset_interrupted_cb(recorder_h recorder);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED.
* @see recorder_unset_audio_stream_cb()
* @see recorder_audio_stream_cb()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_audio_stream_cb()
*/
int recorder_unset_audio_stream_cb(recorder_h recorder);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post recorder_recording_status_cb() will be invoked.
* @see recorder_unset_recording_status_cb()
* @see recorder_recording_status_cb()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_recording_status_cb()
*/
int recorder_unset_recording_status_cb(recorder_h recorder);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post recorder_recording_limit_reached_cb() will be invoked.
* @see recorder_unset_recording_limit_reached_cb()
* @see recorder_attr_set_size_limit()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_recording_limit_reached_cb()
*/
int recorder_unset_recording_limit_reached_cb(recorder_h recorder);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function will invoke recorder_error_cb() when an asynchronous operation error occur.
* @see recorder_unset_error_cb()
* @see recorder_error_cb()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_set_error_cb()
*/
int recorder_unset_error_cb(recorder_h recorder);
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_attr_get_size_limit()
* @see recorder_attr_set_time_limit()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_size_limit()
* @see recorder_attr_get_time_limit()
*/
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_attr_get_time_limit()
* @see recorder_attr_set_size_limit()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_time_limit()
* @see recorder_attr_get_size_limit()
*/
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
* Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
* @see recorder_attr_get_audio_device()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_audio_device()
*/
int recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_device_e *device);
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
* Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
* @see recorder_attr_get_audio_samplerate()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_audio_samplerate()
*/
int recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerate);
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_attr_get_audio_encoder_bitrate()
*/
* @retval #RECORDER_ERROR_INVALID_STATE Invalid state
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_attr_get_video_encoder_bitrate()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_audio_encoder_bitrate()
*/
int recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitrate);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_audio_encoder_bitrate()
*/
int recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitrate);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_is_muted()
*/
int recorder_attr_set_mute(recorder_h recorder, bool enable);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
* @see recorder_attr_get_recording_motion_rate()
*/
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_recording_motion_rate()
*/
int recorder_attr_get_recording_motion_rate(recorder_h recorder , double *rate);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
* Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
* @see recorder_attr_get_audio_channel()
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_audio_channel()
*/
int recorder_attr_get_audio_channel(recorder_h recorder, int *channel_count);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_get_orientation_tag()
*/
int recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotation_e orientation);
* @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see recorder_attr_set_orientation_tag()
*/
int recorder_attr_get_orientation_tag(recorder_h recorder, recorder_rotation_e *orientation);
int str_pos = 0;
int prev_pos = 0;
char *recv_msg = NULL;
+ char *error_msg = NULL;
char **parse_str = NULL;
recorder_cb_info_s *cb_info = (recorder_cb_info_s *)data;
+ recorder_message_s *rec_msg = NULL;
if (cb_info == NULL) {
LOGE("cb_info NULL");
while (g_atomic_int_get(&cb_info->msg_recv_running)) {
ret = muse_core_ipc_recv_msg(cb_info->fd, recv_msg);
- if (ret <= 0)
+ if (ret <= 0) {
+ cb_info->is_server_connected = FALSE;
+ LOGE("receive msg failed - server disconnected");
break;
+ }
+
recv_msg[ret] = '\0';
str_pos = 0;
g_mutex_unlock(&cb_info->api_mutex[api]);
} else if (api_class == MUSE_RECORDER_API_CLASS_THREAD_SUB ||
api == MUSE_RECORDER_CB_EVENT) {
- recorder_message_s *rec_msg = g_new0(recorder_message_s, 1);
+ rec_msg = g_new0(recorder_message_s, 1);
if (rec_msg == NULL) {
LOGE("failed to alloc rec_msg");
continue;
g_queue_push_tail(cb_info->msg_queue, (gpointer)rec_msg);
g_cond_signal(&cb_info->msg_handler_cond);
g_mutex_unlock(&cb_info->msg_handler_mutex);
+
+ rec_msg = NULL;
} else {
LOGW("unknown recorder api %d and api_class %d", api, api_class);
}
}
}
- LOGD("client cb exit");
+ LOGD("client cb exit - server connected %d", cb_info->is_server_connected);
+
+ if (!cb_info->is_server_connected) {
+ /* send error msg for server disconnection */
+ error_msg = muse_core_msg_json_factory_new(MUSE_RECORDER_CB_EVENT,
+ MUSE_TYPE_INT, PARAM_EVENT, MUSE_RECORDER_EVENT_TYPE_ERROR,
+ MUSE_TYPE_INT, PARAM_EVENT_CLASS, MUSE_RECORDER_EVENT_CLASS_THREAD_MAIN,
+ MUSE_TYPE_INT, "error", RECORDER_ERROR_SERVICE_DISCONNECTED,
+ MUSE_TYPE_INT, "current_state", RECORDER_STATE_NONE,
+ NULL);
+ if (!error_msg) {
+ LOGE("error_msg failed");
+ goto CB_HANDLER_EXIT;
+ }
+
+ rec_msg = g_new0(recorder_message_s, 1);
+ if (rec_msg == NULL) {
+ LOGE("failed to alloc rec_msg");
+ goto CB_HANDLER_EXIT;
+ }
+
+ rec_msg->api = MUSE_RECORDER_CB_EVENT;
+ memcpy(rec_msg->recv_msg, error_msg, sizeof(rec_msg->recv_msg));
+
+ /*LOGD("add recorder message to queue : api %d", api);*/
+
+ g_mutex_lock(&cb_info->msg_handler_mutex);
+ g_queue_push_tail(cb_info->msg_queue, (gpointer)rec_msg);
+ g_cond_signal(&cb_info->msg_handler_cond);
+ g_mutex_unlock(&cb_info->msg_handler_mutex);
+
+ rec_msg = NULL;
+
+ LOGE("add error msg for service disconnection done");
+ }
CB_HANDLER_EXIT:
+ if (error_msg) {
+ muse_core_msg_json_factory_free(error_msg);
+ error_msg = NULL;
+ }
+
if (parse_str) {
for (i = 0 ; i < RECORDER_PARSE_STRING_SIZE ; i++) {
if (parse_str[i]) {
goto ErrorExit;
}
+ cb_info->is_server_connected = TRUE;
+
return cb_info;
ErrorExit:
/*LOGD("Enter api : %d", api);*/
+ if (!cb_info->is_server_connected) {
+ LOGE("server is disconnected");
+ return RECORDER_ERROR_SERVICE_DISCONNECTED;
+ }
+
g_mutex_lock(&(cb_info->api_mutex[api]));
if (cb_info->api_activating[api] == 0) {
static int _recorder_msg_send(int api, recorder_cb_info_s *cb_info, int *ret)
{
+ int send_ret = 0;
char *msg = NULL;
if (!cb_info || !ret) {
/*LOGD("send msg %s", msg);*/
- if (muse_core_ipc_send_msg(cb_info->fd, msg) < 0) {
+ if (cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(cb_info->fd, msg);
+
+ if (send_ret < 0) {
LOGE("message send failed");
*ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
static int _recorder_msg_send_param1(int api, recorder_cb_info_s *cb_info, int *ret, recorder_msg_param *param)
{
+ int send_ret = 0;
char *msg = NULL;
if (!cb_info || !ret || !param) {
/*LOGD("send msg %s", msg);*/
- if (muse_core_ipc_send_msg(cb_info->fd, msg) < 0) {
+ if (cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(cb_info->fd, msg);
+
+ if (send_ret < 0) {
LOGE("message send failed");
*ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
LOGD("ENTER");
- _recorder_msg_send(api, pc->cb_info, &ret);
+ if (pc->cb_info->is_server_connected)
+ _recorder_msg_send(api, pc->cb_info, &ret);
+ else
+ LOGW("server disconnected. release resource without send message.");
if (ret == RECORDER_ERROR_NONE) {
_recorder_remove_idle_event_all(pc->cb_info);
int recorder_set_video_resolution(recorder_h recorder, int width, int height)
{
int ret = RECORDER_ERROR_NONE;
+ int send_ret = 0;
char *send_msg = NULL;
muse_recorder_api_e api = MUSE_RECORDER_API_SET_VIDEO_RESOLUTION;
recorder_cli_s *pc = (recorder_cli_s *)recorder;
MUSE_TYPE_INT, "height", height,
NULL);
if (send_msg) {
- if (muse_core_ipc_send_msg(pc->cb_info->fd, send_msg) <= 0) {
+ if (pc->cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(pc->cb_info->fd, send_msg);
+
+ if (send_ret < 0) {
LOGE("message send failed");
ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
int stream_index = 0;
char *stream_type = NULL;
char *send_msg = NULL;
+ int send_ret = 0;
if (!pc || !pc->cb_info || stream_info == NULL) {
LOGE("NULL handle");
MUSE_TYPE_INT, "stream_index", stream_index,
NULL);
if (send_msg) {
- if (muse_core_ipc_send_msg(pc->cb_info->fd, send_msg) <= 0) {
+ if (pc->cb_info->is_server_connected)
+ send_ret = muse_core_ipc_send_msg(pc->cb_info->fd, send_msg);
+
+ if (send_ret < 0) {
LOGE("message send failed");
ret = RECORDER_ERROR_INVALID_OPERATION;
} else {
_recorder_msg_send(api, pc->cb_info, &ret);
- LOGD("ret : 0x%x", ret);
+ if (ret == RECORDER_ERROR_SERVICE_DISCONNECTED)
+ ret = false;
+
+ LOGD("ret : %d", ret);
return (bool)ret;
}