2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_MULTIMEDIA_RECORDER_H__
18 #define __TIZEN_MULTIMEDIA_RECORDER_H__
20 #include <legacy_camera.h>
27 #define RECORDER_ERROR_CLASS TIZEN_ERROR_RECORDER | 0x10
31 * @brief This file contains the Recorder API.
32 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
36 * @addtogroup CAPI_MEDIA_RECORDER_MODULE
41 * @brief The Media recorder handle.
42 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
44 typedef struct recorder_s *recorder_h;
47 * @brief Enumeration for error code of the media recorder.
48 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
51 RECORDER_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
52 RECORDER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
53 RECORDER_ERROR_INVALID_STATE = RECORDER_ERROR_CLASS | 0x02, /**< Invalid state */
54 RECORDER_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY , /**< Out of memory */
55 RECORDER_ERROR_DEVICE = RECORDER_ERROR_CLASS | 0x04, /**< Device error */
56 RECORDER_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Internal error */
57 RECORDER_ERROR_SOUND_POLICY = RECORDER_ERROR_CLASS | 0x06, /**< Blocked by Audio Session Manager */
58 RECORDER_ERROR_SECURITY_RESTRICTED = RECORDER_ERROR_CLASS | 0x07, /**< Restricted by security system policy */
59 RECORDER_ERROR_SOUND_POLICY_BY_CALL = RECORDER_ERROR_CLASS | 0x08, /**< Blocked by Audio Session Manager - CALL */
60 RECORDER_ERROR_SOUND_POLICY_BY_ALARM = RECORDER_ERROR_CLASS | 0x09, /**< Blocked by Audio Session Manager - ALARM */
61 RECORDER_ERROR_ESD = RECORDER_ERROR_CLASS | 0x0a, /**< ESD situation */
62 RECORDER_ERROR_OUT_OF_STORAGE = RECORDER_ERROR_CLASS | 0x0b, /**< Out of storage */
63 RECORDER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< The access to the resources can not be granted */
64 RECORDER_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The feature is not supported */
65 RECORDER_ERROR_RESOURCE_CONFLICT = RECORDER_ERROR_CLASS | 0x0c, /**< Blocked by resource conflict (Since 3.0) */
69 * @brief Enumeration for recorder states.
70 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
73 RECORDER_STATE_NONE, /**< Recorder is not created */
74 RECORDER_STATE_CREATED, /**< Recorder is created, but not prepared */
75 RECORDER_STATE_READY, /**< Recorder is ready to record \n In case of video recorder, preview display will be shown */
76 RECORDER_STATE_RECORDING, /**< Recorder is recording media */
77 RECORDER_STATE_PAUSED, /**< Recorder is paused while recording media */
81 * @brief Enumeration for the recording limit.
82 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
85 RECORDER_RECORDING_LIMIT_TIME, /**< Time limit (second) of recording file */
86 RECORDER_RECORDING_LIMIT_SIZE, /**< Size limit (kilo bytes [KB]) of recording file */
87 RECORDER_RECORDING_LIMIT_FREE_SPACE, /**< No free space in storage */
88 } recorder_recording_limit_type_e;
91 * @brief Enumeration for the file container format.
92 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
95 RECORDER_FILE_FORMAT_3GP, /**< 3GP file format */
96 RECORDER_FILE_FORMAT_MP4, /**< MP4 file format */
97 RECORDER_FILE_FORMAT_AMR, /**< AMR file format */
98 RECORDER_FILE_FORMAT_ADTS, /**< ADTS file format */
99 RECORDER_FILE_FORMAT_WAV, /**< WAV file format */
100 RECORDER_FILE_FORMAT_OGG, /**< OGG file format */
101 RECORDER_FILE_FORMAT_M2TS /**< MPEG2-TransportStream file format */
102 } recorder_file_format_e;
105 * @brief Enumeration for the audio codec.
106 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
109 RECORDER_AUDIO_CODEC_DISABLE = -1, /**< Disable audio track */
110 RECORDER_AUDIO_CODEC_AMR = 0, /**< AMR codec */
111 RECORDER_AUDIO_CODEC_AAC, /**< AAC codec */
112 RECORDER_AUDIO_CODEC_VORBIS, /**< Vorbis codec */
113 RECORDER_AUDIO_CODEC_PCM, /**< PCM codec */
114 RECORDER_AUDIO_CODEC_MP3 /**< MP3 codec (Since 3.0) */
115 } recorder_audio_codec_e;
118 * @brief Enumeration for the video codec.
119 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
122 RECORDER_VIDEO_CODEC_H263, /**< H263 codec */
123 RECORDER_VIDEO_CODEC_H264, /**< H264 codec */
124 RECORDER_VIDEO_CODEC_MPEG4, /**< MPEG4 codec */
125 RECORDER_VIDEO_CODEC_THEORA /**< Theora codec */
126 } recorder_video_codec_e;
129 * @brief Enumeration for audio capture devices.
130 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
133 RECORDER_AUDIO_DEVICE_MIC, /**< Mic device */
134 RECORDER_AUDIO_DEVICE_MODEM, /**< Modem */
135 } recorder_audio_device_e;
138 * @brief Enumeration for the recorder rotation type.
139 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
142 RECORDER_ROTATION_NONE, /**< No rotation */
143 RECORDER_ROTATION_90, /**< 90 degree rotation */
144 RECORDER_ROTATION_180, /**< 180 degree rotation */
145 RECORDER_ROTATION_270, /**< 270 degree rotation */
146 } recorder_rotation_e;
149 * @brief Enumeration for the recorder policy.
150 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
153 RECORDER_POLICY_NONE = 0, /**< None */
154 RECORDER_POLICY_SOUND, /**< Sound policy (Deprecated since 3.0) */
155 RECORDER_POLICY_SOUND_BY_CALL, /**< Sound policy by CALL (Deprecated since 3.0) */
156 RECORDER_POLICY_SOUND_BY_ALARM, /**< Sound policy by ALARM (Deprecated since 3.0) */
157 RECORDER_POLICY_SECURITY, /**< Security policy */
158 RECORDER_POLICY_RESOURCE_CONFLICT /**< Resource conflict (Since 3.0) */
162 * @brief Enumeration for the recorder type.
166 RECORDER_TYPE_AUDIO = 0, /**< Audio only recorder */
167 RECORDER_TYPE_VIDEO /**< Video recorder (audio is optional) */
171 * @brief Enumeration for the recorder device state.
175 RECORDER_DEVICE_STATE_IDLE = 0, /**< No recording in progress */
176 RECORDER_DEVICE_STATE_RECORDING, /**< Now recording */
177 RECORDER_DEVICE_STATE_PAUSED /**< All recordings are paused */
178 } recorder_device_state_e;
185 * @addtogroup CAPI_MEDIA_RECORDER_MODULE
190 * @brief Called when limitation error occurs while recording.
191 * @details The callback function is possible to receive three types of limits: time, size and no-space.
192 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
193 * @remarks After being called, recording data is discarded and not written in the recording file. Also the state of recorder is not changed.
194 * @param[in] type The imitation type
195 * @param[in] user_data The user data passed from the callback registration function
196 * @pre You have to register a callback using recorder_set_recording_limit_reached_cb().
197 * @see recorder_set_recording_status_cb()
198 * @see recorder_set_recording_limit_reached_cb()
199 * @see recorder_unset_recording_limit_reached_cb()
201 typedef void (*recorder_recording_limit_reached_cb)(recorder_recording_limit_type_e type, void *user_data);
204 * @brief Called to indicate the recording status.
205 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
206 * @remarks This callback function is repeatedly invoked during the #RECORDER_STATE_RECORDING state.
207 * @param[in] elapsed_time The time of the recording (milliseconds)
208 * @param[in] file_size The size of the recording file (KB)
209 * @param[in] user_data The user data passed from the callback registration function
210 * @pre recorder_start() will invoke this callback if you register it using recorder_set_recording_status_cb().
211 * @see recorder_set_recording_status_cb()
212 * @see recorder_unset_recording_status_cb()
213 * @see recorder_start()
215 typedef void (*recorder_recording_status_cb)(unsigned long long elapsed_time, unsigned long long file_size, void *user_data);
218 * @brief Called when the record state is changed.
219 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
220 * @param[in] previous The previous state of the recorder
221 * @param[in] current The current state of the recorder
222 * @param[in] by_policy @c true if the state is changed by policy, otherwise @c false if the state is not changed
223 * @param[in] user_data The user data passed from the callback registration function
224 * @pre This function is required to register a callback using recorder_set_state_changed_cb().
225 * @see recorder_set_state_changed_cb()
226 * @see recorder_prepare()
227 * @see recorder_unprepare()
228 * @see recorder_start()
229 * @see recorder_pause()
230 * @see recorder_commit()
231 * @see recorder_cancel()
233 typedef void (*recorder_state_changed_cb)(recorder_state_e previous, recorder_state_e current, bool by_policy, void *user_data);
236 * @brief Called when the recorder is interrupted by a policy.
237 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
238 * @param[in] policy The policy that is interrupting the recorder
239 * @param[in] previous The previous state of the recorder
240 * @param[in] current The current state of the recorder
241 * @param[in] user_data The user data passed from the callback registration function
242 * @see recorder_set_interrupted_cb()
244 typedef void (*recorder_interrupted_cb)(recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data);
247 * @brief Called when audio stream data was being delivered just before storing in the recorded file.
248 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
249 * @remarks The callback function holds the same buffer that will be recorded. \n
250 * So if the user changes the buffer, the result file will contain the buffer.
251 * @remarks The callback is called via internal thread of Frameworks, therefore do not invoke UI API, recorder_unprepare(), recorder_commit() and recorder_cancel() in callback.
252 * @param[in] stream The audio stream data
253 * @param[in] size The size of the stream data
254 * @param[in] format The audio format
255 * @param[in] channel The number of the channel
256 * @param[in] timestamp The timestamp of the stream buffer (in msec)
257 * @param[in] user_data The user data passed from the callback registration function
258 * @see recorder_set_audio_stream_cb()
260 typedef void (*recorder_audio_stream_cb)(void* stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data);
263 * @brief Called once for each supported video resolution.
264 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
265 * @param[in] width The video image width
266 * @param[in] height The video image height
267 * @param[in] user_data The user data passed from the foreach function
268 * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
269 * @pre recorder_foreach_supported_video_resolution() will invoke this callback.
270 * @see recorder_foreach_supported_video_resolution()
272 typedef bool (*recorder_supported_video_resolution_cb)(int width, int height, void *user_data);
275 * @brief Called when the error occurred.
276 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
277 * @remarks This callback informs about the critical error situation. \n
278 * When being invoked, user should release the resource and terminate the application. \n
279 * This error code will be reported.
280 * #RECORDER_ERROR_DEVICE \n
281 * #RECORDER_ERROR_INVALID_OPERATION \n
282 * #RECORDER_ERROR_OUT_OF_MEMORY.
283 * @param[in] error The error code
284 * @param[in] current_state The current state of the recorder
285 * @param[in] user_data The user data passed from the callback registration function
286 * @pre This callback function is invoked if you register this callback using recorder_set_error_cb().
287 * @see recorder_set_error_cb()
288 * @see recorder_unset_error_cb()
290 typedef void (*recorder_error_cb)(recorder_error_e error, recorder_state_e current_state, void *user_data);
297 * @addtogroup CAPI_MEDIA_RECORDER_CAPABILITY_MODULE
302 * @brief Called iteratively to notify about the supported file formats.
303 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
304 * @param[in] format The format of recording files
305 * @param[in] user_data The user data passed from the foreach function
306 * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
307 * @pre recorder_foreach_supported_file_format() will invoke this callback.
308 * @see recorder_foreach_supported_file_format()
310 typedef bool (*recorder_supported_file_format_cb)(recorder_file_format_e format, void *user_data);
313 * @brief Called iteratively to notify about the supported audio encoders.
314 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
315 * @param[in] codec The codec of audio encoder
316 * @param[in] user_data The user data passed from the foreach function
317 * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
318 * @pre recorder_foreach_supported_audio_encoder() will invoke this callback.
319 * @see recorder_foreach_supported_audio_encoder()
321 typedef bool (*recorder_supported_audio_encoder_cb)(recorder_audio_codec_e codec, void *user_data);
324 * @brief Called iteratively to notify about the supported video encoders.
325 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
326 * @param[in] codec The codec of video encoder
327 * @param[in] user_data The user data passed from the foreach function
328 * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
329 * @pre recorder_foreach_supported_video_encoder() will invoke this callback.
330 * @see recorder_foreach_supported_video_encoder()
332 typedef bool (*recorder_supported_video_encoder_cb)(recorder_video_codec_e codec, void *user_data);
339 * @addtogroup CAPI_MEDIA_RECORDER_MODULE
344 * @brief Creates a recorder handle to record a video.
345 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
347 * @privilege %http://tizen.org/privilege/recorder
348 * @remarks You must release @a recorder using recorder_destroy(). \n
349 * The @a camera handle also could be used for capturing images. \n
350 * If the camera state was #CAMERA_STATE_CREATED, the preview format will be changed to the recommended preview format for recording.
351 * @remarks The created recorder state will be different according to camera state : \n
352 * #CAMERA_STATE_CREATED -> #RECORDER_STATE_CREATED\n
353 * #CAMERA_STATE_PREVIEW -> #RECORDER_STATE_READY\n
354 * #CAMERA_STATE_CAPTURED -> #RECORDER_STATE_READY
355 * @param[in] camera The handle to the camera
356 * @param[out] recorder A handle to the recorder
357 * @return @c 0 on success, otherwise a negative error value
358 * @retval #RECORDER_ERROR_NONE Successful
359 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
360 * @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory
361 * @retval #RECORDER_ERROR_SOUND_POLICY Sound policy error
362 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
363 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
364 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
365 * @see camera_create()
366 * @see camera_stop_preview()
367 * @see recorder_destroy()
369 int legacy_recorder_create_videorecorder(camera_h camera, recorder_h *recorder);
372 * @brief Creates a recorder handle to record an audio.
373 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
375 * @privilege %http://tizen.org/privilege/recorder
376 * @remarks You must release @a recorder using recorder_destroy().
377 * @param[out] recorder A handle to the recorder
378 * @return @c 0 on success, otherwise a negative error value
379 * @retval #RECORDER_ERROR_NONE Successful
380 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
381 * @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory
382 * @retval #RECORDER_ERROR_SOUND_POLICY Sound policy error
383 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
384 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
385 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
386 * @post The recorder state will be #RECORDER_STATE_CREATED.
387 * @see recorder_destroy()
389 int legacy_recorder_create_audiorecorder(recorder_h *recorder);
393 * @brief Destroys the recorder handle.
394 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
396 * @privilege %http://tizen.org/privilege/recorder
397 * @remarks The video recorder's camera handle is not released by this function.
398 * @param[in] recorder The handle to the media recorder
399 * @return @c 0 on success, otherwise a negative error value
400 * @retval #RECORDER_ERROR_NONE Successful
401 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
402 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
403 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
404 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
405 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
406 * @pre The recorder state should be #RECORDER_STATE_CREATED.
407 * @post The recorder state will be #RECORDER_STATE_NONE.
408 * @see camera_destroy()
409 * @see recorder_create_videorecorder()
410 * @see recorder_create_audiorecorder()
412 int legacy_recorder_destroy(recorder_h recorder);
415 * @brief Prepares the media recorder for recording.
416 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
418 * @privilege %http://tizen.org/privilege/recorder
419 * @remarks Before calling the function, it is required to properly set audio encoder (recorder_set_audio_encoder()),
420 * video encoder(recorder_set_video_encoder()) and file format (recorder_set_file_format()).
421 * @param[in] recorder The handle to the media recorder
422 * @return @c 0 on success, otherwise a negative error value
423 * @retval #RECORDER_ERROR_NONE Successful
424 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
425 * @retval #RECORDER_ERROR_SOUND_POLICY Sound policy error
426 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
427 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
428 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
429 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
430 * @pre The recorder state should be #RECORDER_STATE_CREATED by legacy_recorder_create_videorecorder(), legacy_recorder_create_audiorecorder() or legacy_recorder_unprepare().
431 * @post The recorder state will be #RECORDER_STATE_READY.
432 * @post If recorder handle is created by legacy_recorder_create_videorecorder(), the camera state will be changed to #CAMERA_STATE_PREVIEW.
433 * @see recorder_create_videorecorder()
434 * @see recorder_create_audiorecorder()
435 * @see recorder_unprepare()
436 * @see recorder_set_audio_encoder()
437 * @see recorder_set_video_encoder()
438 * @see recorder_set_file_format()
440 int legacy_recorder_prepare(recorder_h recorder);
443 * @brief Resets the media recorder.
444 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
446 * @privilege %http://tizen.org/privilege/recorder
447 * @param[in] recorder The handle to the media recorder
448 * @return @c 0 on success, otherwise a negative error value
449 * @retval #RECORDER_ERROR_NONE Successful
450 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
451 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
452 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
453 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
454 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
455 * @pre The recorder state should be #RECORDER_STATE_READY set by legacy_recorder_prepare(), legacy_recorder_cancel() or legacy_recorder_commit().
456 * @post The recorder state will be #RECORDER_STATE_CREATED.
457 * @post If the recorder handle is created by legacy_recorder_create_videorecorder(), camera state will be changed to #CAMERA_STATE_CREATED.
458 * @see recorder_prepare()
459 * @see recorder_cancel()
460 * @see recorder_commit()
462 int legacy_recorder_unprepare(recorder_h recorder);
465 * @brief Starts the recording.
466 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
468 * @privilege %http://tizen.org/privilege/recorder
469 * @remarks If file path has been set to an existing file, this file is removed automatically and updated by new one. \n
470 * In the video recorder, some preview format does not support record mode. It will return #RECORDER_ERROR_INVALID_OPERATION error. \n
471 * You should use default preview format or #CAMERA_PIXEL_FORMAT_NV12 in the record mode. \n
472 * When you want to record audio or video file, you need to add privilege according to rules below additionally. \n
473 * If you want to save contents to internal storage, you should add mediastorage privilege. \n
474 * If you want to save contents to external storage, you should add externalstorage privilege. \n
475 * The filename should be set before this function is invoked.
476 * @param[in] recorder The handle to the media recorder
477 * @return @c 0 on success, otherwise a negative error value
478 * @retval #RECORDER_ERROR_NONE Successful
479 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
480 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
481 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
482 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
483 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
484 * @pre The recorder state must be #RECORDER_STATE_READY by legacy_recorder_prepare() or #RECORDER_STATE_PAUSED by legacy_recorder_pause(). \n
485 * The filename should be set by legacy_recorder_set_filename().
486 * @post The recorder state will be #RECORDER_STATE_RECORDING.
487 * @see recorder_pause()
488 * @see recorder_commit()
489 * @see recorder_cancel()
490 * @see recorder_set_audio_encoder()
491 * @see recorder_set_filename()
492 * @see recorder_set_file_format()
493 * @see recorder_recording_status_cb()
494 * @see recorder_set_filename()
496 int legacy_recorder_start(recorder_h recorder);
499 * @brief Pauses the recording.
500 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
502 * @privilege %http://tizen.org/privilege/recorder
503 * @remarks Recording can be resumed with legacy_recorder_start().
504 * @param[in] recorder The handle to the media recorder
505 * @return @c 0 on success, otherwise a negative error value
506 * @retval #RECORDER_ERROR_NONE Successful
507 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
508 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
509 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
510 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
511 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
512 * @pre The recorder state must be #RECORDER_STATE_RECORDING.
513 * @post The recorder state will be #RECORDER_STATE_PAUSED.
514 * @see legacy_recorder_pause()
515 * @see legacy_recorder_commit()
516 * @see legacy_recorder_cancel()
518 int legacy_recorder_pause(recorder_h recorder);
521 * @brief Stops recording and saves the result.
522 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
524 * @privilege %http://tizen.org/privilege/recorder
525 * @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n
526 * If you want to save contents to internal storage, you should add mediastorage privilege. \n
527 * If you want to save contents to external storage, you should add externalstorage privilege.
528 * @param[in] recorder The handle to the media recorder
529 * @return @c 0 on success, otherwise a negative error value
530 * @retval #RECORDER_ERROR_NONE Successful
531 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
532 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
533 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
534 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
535 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
536 * @pre The recorder state must be #RECORDER_STATE_RECORDING set by legacy_recorder_start() or #RECORDER_STATE_PAUSED by legacy_recorder_pause().
537 * @post The recorder state will be #RECORDER_STATE_READY.
538 * @see legacy_recorder_pause()
539 * @see legacy_recorder_cancel()
540 * @see legacy_recorder_set_filename()
541 * @see recorder_start()
543 int legacy_recorder_commit(recorder_h recorder);
546 * @brief Cancels the recording.
547 * @details The recording data is discarded and not written in the recording file.
548 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
550 * @privilege %http://tizen.org/privilege/recorder
551 * @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n
552 * If you want to save contents to internal storage, you should add mediastorage privilege. \n
553 * If you want to save contents to external storage, you should add externalstorage privilege.
554 * @param[in] recorder The handle to the media recorder
555 * @return @c 0 on success, otherwise a negative error value
556 * @retval #RECORDER_ERROR_NONE Successful
557 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
558 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation
559 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
560 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
561 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
562 * @pre The recorder state must be #RECORDER_STATE_RECORDING set by legacy_recorder_start() or #RECORDER_STATE_PAUSED by legacy_recorder_pause().
563 * @post The recorder state will be #RECORDER_STATE_READY.
564 * @see legacy_recorder_pause()
565 * @see legacy_recorder_commit()
566 * @see legacy_recorder_cancel()
567 * @see legacy_recorder_start()
569 int legacy_recorder_cancel(recorder_h recorder);
572 * @brief Gets the recorder's current state.
573 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
574 * @param[in] recorder The handle to the media recorder
575 * @param[out] state The current state of the recorder
576 * @return @c 0 on success, otherwise a negative error value
577 * @retval #RECORDER_ERROR_NONE Successful
578 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
579 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
580 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
582 int legacy_recorder_get_state(recorder_h recorder, recorder_state_e *state);
585 * @brief Gets the peak audio input level that was sampled since the last call to this function.
586 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
587 * @remarks @c 0 dB indicates maximum input level, @c -300 dB indicates minimum input level.
588 * @param[in] recorder The handle to the media recorder
589 * @param[out] dB The audio input level in dB
590 * @return @c 0 on success, otherwise a negative error value
591 * @retval #RECORDER_ERROR_NONE Successful
592 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
593 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
594 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
595 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
596 * @pre The recorder state must be #RECORDER_STATE_RECORDING or #RECORDER_STATE_PAUSED.
598 int legacy_recorder_get_audio_level(recorder_h recorder, double *dB);
601 * @brief Sets the file path to record.
602 * @details This function sets file path which defines where newly recorded data should be stored.
603 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
604 * @remarks If the same file already exists in the file system, then old file will be overwritten.
605 * @param[in] recorder The handle to the media recorder
606 * @param[in] path The recording file path
607 * @return @c 0 on success, otherwise a negative error value
608 * @retval #RECORDER_ERROR_NONE Successful
609 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
610 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
611 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
612 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
613 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
614 * @see recorder_get_filename()
616 int legacy_recorder_set_filename(recorder_h recorder, const char *path);
619 * @brief Gets the file path to record.
620 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
621 * @remarks You must release @a path using free().
622 * @param[in] recorder The handle to the media recorder
623 * @param[out] path The recording file path
624 * @return @c 0 on success, otherwise a negative error value
625 * @retval #RECORDER_ERROR_NONE Successful
626 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
627 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
628 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
629 * @see recorder_set_filename()
631 int legacy_recorder_get_filename(recorder_h recorder, char **path);
634 * @brief Sets the file format for recording media stream.
635 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
636 * @remarks Since 2.3.1, it could be returned #RECORDER_ERROR_INVALID_OPERATION \n
637 * when it's audio recorder and its state is #RECORDER_STATE_READY \n
638 * because of checking codec compatibility with current encoder.
639 * @param[in] recorder The handle to the media recorder
640 * @param[in] format The media file format
641 * @return @c 0 on success, otherwise a negative error value
642 * @retval #RECORDER_ERROR_NONE Successful
643 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
644 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
645 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
646 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
647 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1)
648 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
649 * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
650 * @see legacy_recorder_get_file_format()
651 * @see legacy_recorder_foreach_supported_file_format()
653 int legacy_recorder_set_file_format(recorder_h recorder, recorder_file_format_e format);
657 * @brief Gets the file format for recording media stream.
658 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
659 * @param[in] recorder The handle to the media recorder
660 * @param[out] format The media file format
661 * @return @c 0 on success, otherwise a negative error value
662 * @retval #RECORDER_ERROR_NONE Successful
663 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
664 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
665 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
666 * @see legacy_recorder_set_file_format()
667 * @see legacy_recorder_foreach_supported_file_format()
669 int legacy_recorder_get_file_format(recorder_h recorder, recorder_file_format_e *format);
673 * @brief Sets the recorder's sound manager stream information.
675 * @remarks You can set sound stream information including audio routing.
676 * For more details, please refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE
677 * @param[in] recorder The handle to the media recorder
678 * @param[in] stream_type The type of sound manager info
679 * @param[in] stream_index The index of sound manager info
680 * @return @c 0 on success, otherwise a negative error value
681 * @retval #RECORDER_ERROR_NONE Successful
682 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
683 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
684 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY
685 * @see #sound_stream_info_h
686 * @see sound_manager_create_stream_information()
687 * @see sound_manager_destroy_stream_information()
689 int legacy_recorder_set_sound_stream_info(recorder_h recorder, char *stream_type, int stream_index);
697 * @addtogroup CAPI_MEDIA_RECORDER_CAPABILITY_MODULE
702 * @brief Retrieves all supported file formats by invoking a specific callback for each supported file format.
703 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
704 * @param[in] recorder The handle to the media recorder
705 * @param[in] foreach_cb The iteration callback
706 * @param[in] codec_type The type of codec(Audio or Video)
707 * @param[in] codec The codec
708 * @param[in] user_data The user data to be passed to the callback function
709 * @return @c 0 on success, otherwise a negative error value
710 * @retval #RECORDER_ERROR_NONE Successful
711 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
712 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
713 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
714 * @post legacy_recorder_supported_file_format_cb() will be invoked.
715 * @see legacy_recorder_get_file_format()
716 * @see legacy_recorder_set_file_format()
717 * @see legacy_recorder_supported_file_format_cb()
719 int legacy_recorder_foreach_supported_file_format(recorder_h recorder,
720 recorder_supported_file_format_cb foreach_cb, const char* codec_type, int codec, void *user_data);
728 * @addtogroup CAPI_MEDIA_RECORDER_MODULE
733 * @brief Sets the audio codec for encoding an audio stream.
734 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
735 * @remarks You can get available audio encoders by using recorder_foreach_supported_audio_encoder(). \n
736 * If set to #RECORDER_AUDIO_CODEC_DISABLE, the audio track is not created in recording files.\n
737 * Since 2.3.1, it could be returned #RECORDER_ERROR_INVALID_OPERATION \n
738 * when it's audio recorder and its state is #RECORDER_STATE_READY \n
739 * because of checking codec compatibility with current file format.
740 * @param[in] recorder The handle to the media recorder
741 * @param[in] codec The audio codec
742 * @return @c 0 on success, otherwise a negative error value
743 * @retval #RECORDER_ERROR_NONE Successful
744 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
745 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
746 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
747 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
748 * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1)
749 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
750 * @see recorder_get_audio_encoder()
751 * @see legacy_recorder_foreach_supported_audio_encoder()
753 int legacy_recorder_set_audio_encoder(recorder_h recorder, recorder_audio_codec_e codec);
756 * @brief Gets the audio codec for encoding an audio stream.
757 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
758 * @param[in] recorder The handle to the media recorder
759 * @param[out] codec The audio codec
760 * @return @c 0 on success, otherwise a negative error value
761 * @retval #RECORDER_ERROR_NONE Successful
762 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
763 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
764 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
765 * @see recorder_set_audio_encoder()
766 * @see legacy_recorder_foreach_supported_audio_encoder()
768 int legacy_recorder_get_audio_encoder(recorder_h recorder, recorder_audio_codec_e *codec);
775 * @addtogroup CAPI_MEDIA_RECORDER_CAPABILITY_MODULE
780 * @brief Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder.
781 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
782 * @param[in] recorder The handle to the media recorder
783 * @param[in] foreach_cb The iteration callback
784 * @param[in] codec_type The type of codec(Audio or Video)
785 * @param[in] format The file format
786 * @param[in] user_data The user data to be passed to the callback function
787 * @return @c 0 on success, otherwise a negative error value
788 * @retval #RECORDER_ERROR_NONE Successful
789 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
790 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
791 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
792 * @post legacy_recorder_supported_audio_encoder_cb() will be invoked.
793 * @see recorder_set_audio_encoder()
794 * @see recorder_get_audio_encoder()
795 * @see recorder_supported_audio_encoder_cb()
797 int legacy_recorder_foreach_supported_audio_encoder(recorder_h recorder,
798 recorder_supported_audio_encoder_cb foreach_cb, const char* codec_type, int format, void *user_data);
805 * @addtogroup CAPI_MEDIA_RECORDER_MODULE
810 * @brief Sets the resolution of the video recording.
811 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
812 * @remarks This function should be called before recording (recorder_start()).
813 * @param[in] recorder The handle to the media recorder
814 * @param[in] width The preview width
815 * @param[in] height The preview height
816 * @return @c 0 on success, otherwise a negative error value
817 * @retval #RECORDER_ERROR_NONE Successful
818 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
819 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
820 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
821 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
822 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
823 * @see recorder_start()
824 * @see recorder_get_video_resolution()
825 * @see recorder_foreach_supported_video_resolution()
827 int legacy_recorder_set_video_resolution(recorder_h recorder, int width, int height);
830 * @brief Gets the resolution of the video recording.
831 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
832 * @param[in] recorder The handle to the media recorder
833 * @param[out] width The video width
834 * @param[out] height The video height
835 * @return @c 0 on success, otherwise a negative error value
836 * @retval #RECORDER_ERROR_NONE Successful
837 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
838 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
839 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
840 * @see recorder_set_video_resolution()
841 * @see recorder_foreach_supported_video_resolution()
843 int legacy_recorder_get_video_resolution(recorder_h recorder, int *width, int *height);
850 * @addtogroup CAPI_MEDIA_RECORDER_CAPABILITY_MODULE
855 * @brief Retrieves all supported video resolutions by invoking callback function once for each supported video resolution.
856 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
857 * @param[in] recorder The handle to the media recorder
858 * @param[in] foreach_cb The callback function to be invoked
859 * @param[in] user_data The user data to be passed to the callback function
860 * @return @c 0 on success, otherwise a negative error value
861 * @retval #RECORDER_ERROR_NONE Successful
862 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
863 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
864 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
865 * @post This function invokes legacy_recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution.
866 * @see recorder_set_video_resolution()
867 * @see recorder_get_video_resolution()
868 * @see recorder_supported_video_resolution_cb()
870 int legacy_recorder_foreach_supported_video_resolution(recorder_h recorder,
871 recorder_supported_video_resolution_cb foreach_cb, void *user_data);
878 * @addtogroup CAPI_MEDIA_RECORDER_MODULE
883 * @brief Sets the video codec for encoding video stream.
884 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
885 * @remarks You can get available video encoders by using recorder_foreach_supported_video_encoder().
886 * @param[in] recorder The handle to the media recorder
887 * @param[in] codec The video codec
888 * @return @c 0 on success, otherwise a negative error value
889 * @retval #RECORDER_ERROR_NONE Successful
890 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
891 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
892 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
893 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
894 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
895 * @see recorder_get_video_encoder()
896 * @see legacy_recorder_foreach_supported_video_encoder()
898 int legacy_recorder_set_video_encoder(recorder_h recorder, recorder_video_codec_e codec);
901 * @brief Gets the video codec for encoding video stream.
902 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
903 * @param[in] recorder The handle to the media recorder
904 * @param[out] codec The video codec
905 * @return @c 0 on success, otherwise a negative error value
906 * @retval #RECORDER_ERROR_NONE Successful
907 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
908 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
909 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
910 * @see legacy_recorder_set_video_encoder()
911 * @see legacy_recorder_foreach_supported_video_encoder()
913 int legacy_recorder_get_video_encoder(recorder_h recorder, recorder_video_codec_e *codec);
920 * @addtogroup CAPI_MEDIA_RECORDER_CAPABILITY_MODULE
925 * @brief Retrieves all supported video encoders by invoking a specific callback for each supported video encoder.
926 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
927 * @param[in] recorder The handle to the media recorder
928 * @param[in] foreach_cb The iteration callback
929 * @param[in] codec_type The type of codec(Audio or Video)
930 * @param[in] format The file format
931 * @param[in] user_data The user data to be passed to the callback function
932 * @return @c 0 on success, otherwise a negative error value
933 * @retval #RECORDER_ERROR_NONE Successful
934 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
935 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
936 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
937 * @post legacy_recorder_supported_video_encoder_cb() will be invoked.
938 * @see legacy_recorder_set_video_encoder()
939 * @see legacy_recorder_get_video_encoder()
940 * @see recorder_supported_video_encoder_cb()
942 int legacy_recorder_foreach_supported_video_encoder(recorder_h recorder,
943 recorder_supported_video_encoder_cb foreach_cb, const char* codec_type, int format, void *user_data);
950 * @addtogroup CAPI_MEDIA_RECORDER_MODULE
955 * @brief Registers the callback function that will be invoked when the recorder state changes.
956 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
957 * @param[in] recorder The handle to the media recorder
958 * @param[in] callback The function pointer of user callback
959 * @param[in] user_data The user data to be passed to the callback function
960 * @return @c 0 on success, otherwise a negative error value
961 * @retval #RECORDER_ERROR_NONE Successful
962 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
963 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
964 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
965 * @post legacy_recorder_state_changed_cb() will be invoked.
966 * @see legacy_recorder_unset_state_changed_cb()
967 * @see legacy_recorder_state_changed_cb()
969 int legacy_recorder_set_state_changed_cb(recorder_h recorder, recorder_state_changed_cb callback, void *user_data);
972 * @brief Unregisters the callback function.
973 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
974 * @param[in] recorder The handle to the media recorder
975 * @return @c 0 on success, otherwise a negative error value
976 * @retval #RECORDER_ERROR_NONE Successful
977 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
978 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
979 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
980 * @see legacy_recorder_set_state_changed_cb()
982 int legacy_recorder_unset_state_changed_cb(recorder_h recorder);
985 * @brief Registers a callback function to be called when the media recorder is interrupted according to a policy.
986 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
987 * @param[in] recorder The handle to the media recorder
988 * @param[in] callback The callback function to register
989 * @param[in] user_data The user data to be passed to the callback function
990 * @return @c 0 on success, otherwise a negative error value
991 * @retval #RECORDER_ERROR_NONE Successful
992 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
993 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
994 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
995 * @see recorder_unset_interrupted_cb()
996 * @see recorder_interrupted_cb()
998 int legacy_recorder_set_interrupted_cb(recorder_h recorder, recorder_interrupted_cb callback, void *user_data);
1001 * @brief Unregisters the callback function.
1002 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1003 * @param[in] recorder The handle to the media recorder
1004 * @return @c 0 on success, otherwise a negative error value
1005 * @retval #RECORDER_ERROR_NONE Successful
1006 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1007 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1008 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1009 * @see recorder_set_interrupted_cb()
1011 int legacy_recorder_unset_interrupted_cb(recorder_h recorder);
1014 * @brief Registers a callback function to be called when audio stream data is being delivered.
1015 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1016 * @remarks This callback function holds the same buffer that will be recorded. \n
1017 * Therefore if an user changes the buffer, the result file will have the buffer. \n
1018 * @remarks The callback is called via internal thread of Frameworks. Therefore do not invoke UI API, legacy_recorder_unprepare(), legacy_recorder_commit() and legacy_recorder_cancel() in callback.\n
1019 * This callback function to be called in #RECORDER_STATE_RECORDING and #RECORDER_STATE_PAUSED state.
1021 * @param[in] recorder The handle to the recorder
1022 * @param[in] callback The callback function to register
1023 * @param[in] user_data The user data to be passed to the callback function
1024 * @return @c 0 on success, otherwise a negative error value
1025 * @retval #RECORDER_ERROR_NONE Successful
1026 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1027 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1028 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1029 * @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED.
1030 * @see recorder_unset_audio_stream_cb()
1031 * @see recorder_audio_stream_cb()
1033 int legacy_recorder_set_audio_stream_cb(recorder_h recorder, recorder_audio_stream_cb callback, void* user_data);
1036 * @brief Unregisters the callback function.
1037 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1038 * @param[in] recorder The handle to the media recorder
1039 * @return @c 0 on success, otherwise a negative error value
1040 * @retval #RECORDER_ERROR_NONE Successful
1041 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1042 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1043 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1044 * @see legacy_recorder_set_audio_stream_cb()
1046 int legacy_recorder_unset_audio_stream_cb(recorder_h recorder);
1049 * @brief Registers a callback function to be invoked when the recording information changes.
1050 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1051 * @param[in] recorder The handle to the media recorder
1052 * @param[in] callback The function pointer of user callback
1053 * @param[in] user_data The user data to be passed to the callback function
1054 * @return @c 0 on success, otherwise a negative error value
1055 * @retval #RECORDER_ERROR_NONE Successful
1056 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1057 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1058 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1059 * @post legacy_recorder_recording_status_cb() will be invoked.
1060 * @see recorder_unset_recording_status_cb()
1061 * @see recorder_recording_status_cb()
1063 int legacy_recorder_set_recording_status_cb(recorder_h recorder, recorder_recording_status_cb callback, void *user_data);
1066 * @brief Unregisters the callback function.
1067 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1068 * @param[in] recorder The handle to the media recorder
1069 * @return @c 0 on success, otherwise a negative error value
1070 * @retval #RECORDER_ERROR_NONE Successful
1071 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1072 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1073 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1074 * @see recorder_set_recording_status_cb()
1076 int legacy_recorder_unset_recording_status_cb(recorder_h recorder);
1079 * @brief Registers the callback function to be run when reached the recording limit.
1080 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1081 * @param[in] recorder The handle to media recorder
1082 * @param[in] callback The function pointer of user callback
1083 * @param[in] user_data The user data to be passed to the callback function
1084 * @return @c 0 on success, otherwise a negative error value
1085 * @retval #RECORDER_ERROR_NONE Successful
1086 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1087 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1088 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1089 * @post legacy_recorder_recording_limit_reached_cb() will be invoked.
1090 * @see recorder_unset_recording_limit_reached_cb()
1091 * @see recorder_attr_set_size_limit()
1092 * @see recorder_attr_set_time_limit()
1093 * @see recorder_recording_limit_reached_cb()
1095 int legacy_recorder_set_recording_limit_reached_cb(recorder_h recorder, recorder_recording_limit_reached_cb callback, void *user_data);
1098 * @brief Unregisters the callback function.
1099 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1100 * @param[in] recorder The handle to the media recorder
1101 * @return @c 0 on success, otherwise a negative error value
1102 * @retval #RECORDER_ERROR_NONE Successful
1103 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1104 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1105 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1106 * @see recorder_set_recording_limit_reached_cb()
1108 int legacy_recorder_unset_recording_limit_reached_cb(recorder_h recorder);
1111 * @brief Registers a callback function to be called when an asynchronous operation error occurred.
1112 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1113 * @remarks This callback informs critical error situation.\n
1114 * When this callback is invoked, user should release the resource and terminate the application. \n
1115 * These error codes will occur. \n
1116 * #RECORDER_ERROR_DEVICE \n
1117 * #RECORDER_ERROR_INVALID_OPERATION \n
1118 * #RECORDER_ERROR_OUT_OF_MEMORY
1119 * @param[in] recorder The handle to the recorder
1120 * @param[in] callback The callback function to register
1121 * @param[in] user_data The user data to be passed to the callback function
1122 * @return @c 0 on success, otherwise a negative error value
1123 * @retval #RECORDER_ERROR_NONE Successful
1124 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1125 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1126 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1127 * @post This function will invoke legacy_recorder_error_cb() when an asynchronous operation error occur.
1128 * @see recorder_unset_error_cb()
1129 * @see recorder_error_cb()
1131 int legacy_recorder_set_error_cb(recorder_h recorder, recorder_error_cb callback, void *user_data);
1135 * @brief Unregisters the callback function.
1136 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1137 * @param[in] recorder The handle to the recorder
1138 * @return @c on success, otherwise a negative error value
1139 * @retval #RECORDER_ERROR_NONE Successful
1140 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1141 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1142 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1143 * @see recorder_set_error_cb()
1145 int legacy_recorder_unset_error_cb(recorder_h recorder);
1153 * @addtogroup CAPI_MEDIA_RECORDER_ATTRIBUTES_MODULE
1159 * @brief Sets the maximum size of a recording file.
1160 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1161 * @remarks After reaching the limitation, the recording data is discarded and not written in the recording file.
1162 * @param[in] recorder The handle to the media recorder
1163 * @param[in] kbyte The maximum size of the recording file(KB) \n
1164 * @c 0 means unlimited recording size.
1165 * @return @c 0 on success, otherwise a negative error value
1166 * @retval #RECORDER_ERROR_NONE Successful
1167 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1168 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
1169 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1170 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1171 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
1172 * @see recorder_attr_get_size_limit()
1173 * @see recorder_attr_set_time_limit()
1175 int legacy_recorder_attr_set_size_limit(recorder_h recorder, int kbyte);
1178 * @brief Gets the maximum size of a recording file.
1179 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1180 * @param[in] recorder The handle to the media recorder
1181 * @param[out] kbyte The maximum size of recording file (KB) \n
1182 * @c 0 means unlimited recording size.
1183 * @return @c 0 on success, otherwise a negative error value
1184 * @retval #RECORDER_ERROR_NONE Successful
1185 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1186 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1187 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1188 * @see recorder_attr_set_size_limit()
1189 * @see recorder_attr_get_time_limit()
1191 int legacy_recorder_attr_get_size_limit(recorder_h recorder, int *kbyte);
1194 * @brief Sets the time limit of a recording file.
1195 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1196 * @remarks After reaching the limitation, the recording data is discarded and not written in the recording file.
1197 * @param[in] recorder The handle to the media recorder
1198 * @param[in] second The time limit of the recording file (in seconds) \n
1199 * @c 0 means unlimited recording size.
1200 * @return @c 0 on success, otherwise a negative error value
1201 * @retval #RECORDER_ERROR_NONE Successful
1202 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1203 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
1204 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1205 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1206 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
1207 * @see recorder_attr_get_time_limit()
1208 * @see recorder_attr_set_size_limit()
1210 int legacy_recorder_attr_set_time_limit(recorder_h recorder, int second);
1214 * @brief Gets the time limit of a recording file.
1215 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1216 * @param[in] recorder The handle to the media recorder
1217 * @param[out] second The time limit of the recording file (in seconds) \n
1218 * @c 0 means unlimited recording time.
1219 * @return @c 0 on success, otherwise a negative error value
1220 * @retval #RECORDER_ERROR_NONE Successful
1221 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1222 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1223 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1224 * @see recorder_attr_set_time_limit()
1225 * @see recorder_attr_get_size_limit()
1227 int legacy_recorder_attr_get_time_limit(recorder_h recorder, int *second);
1230 * @brief Sets the audio device for recording.
1231 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1232 * @param[in] recorder The handle to the media recorder
1233 * @param[in] device The type of an audio device
1234 * @return @c 0 on success, otherwise a negative error value
1235 * @retval #RECORDER_ERROR_NONE Successful
1236 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1237 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
1238 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1239 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1240 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
1241 * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
1242 * @see recorder_attr_get_audio_device()
1244 int legacy_recorder_attr_set_audio_device(recorder_h recorder, recorder_audio_device_e device);
1247 * @brief Gets the audio device for recording.
1248 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1249 * @param[in] recorder The handle to the media recorder
1250 * @param[out] device The type of an audio device
1251 * @return @c 0 on success, otherwise a negative error value
1252 * @retval #RECORDER_ERROR_NONE Successful
1253 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1254 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1255 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1256 * @see recorder_attr_set_audio_device()
1258 int legacy_recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_device_e *device);
1261 * @brief Sets the sampling rate of an audio stream.
1262 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1263 * @param[in] recorder The handle to the media recorder
1264 * @param[in] samplerate The sample rate in Hertz
1265 * @return @c 0 on success, otherwise a negative error value
1266 * @retval #RECORDER_ERROR_NONE Successful
1267 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1268 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
1269 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1270 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1271 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
1272 * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
1273 * @see recorder_attr_get_audio_samplerate()
1275 int legacy_recorder_attr_set_audio_samplerate(recorder_h recorder, int samplerate);
1278 * @brief Gets the sampling rate of an audio stream.
1279 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1280 * @param[in] recorder The handle to the media recorder
1281 * @param[out] samplerate The sample rate in Hertz
1282 * @return @c 0 on success, otherwise a negative error value
1283 * @retval #RECORDER_ERROR_NONE Successful
1284 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1285 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1286 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1287 * @see recorder_attr_set_audio_samplerate()
1289 int legacy_recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerate);
1292 * @brief Sets the bitrate of an audio encoder.
1293 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1294 * @param[in] recorder The handle to the media recorder
1295 * @param[in] bitrate The bitrate (for mms : 12200[bps], normal : 288000[bps])
1296 * @return @c 0 on success, otherwise a negative error value
1297 * @retval #RECORDER_ERROR_NONE Successful
1298 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1299 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
1300 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1301 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1302 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
1303 * @see recorder_attr_get_audio_encoder_bitrate()
1305 int legacy_recorder_attr_set_audio_encoder_bitrate(recorder_h recorder, int bitrate);
1308 * @brief Sets the bitrate of a video encoder.
1309 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1310 * @param[in] recorder The handle to the media recorder
1311 * @param[in] bitrate The bitrate in bits per second
1312 * @return @c 0 on success, otherwise a negative error value
1313 * @retval #RECORDER_ERROR_NONE Successful
1314 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1315 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
1316 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1317 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1318 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
1319 * @see recorder_attr_get_video_encoder_bitrate()
1321 int legacy_recorder_attr_set_video_encoder_bitrate(recorder_h recorder, int bitrate);
1324 * @brief Gets the bitrate of an audio encoder.
1325 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1326 * @param[in] recorder The handle to the media recorder
1327 * @param[out] bitrate The bitrate in bits per second
1328 * @return @c 0 on success, otherwise a negative error value
1329 * @retval #RECORDER_ERROR_NONE Successful
1330 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1331 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1332 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1333 * @see recorder_attr_set_audio_encoder_bitrate()
1335 int legacy_recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitrate);
1338 * @brief Gets the bitrate of a video encoder.
1339 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1340 * @param[in] recorder The handle to the media recorder
1341 * @param[out] bitrate The bitrate in bits per second
1342 * @return @c 0 on success, otherwise a negative error value
1343 * @retval #RECORDER_ERROR_NONE Successful
1344 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1345 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1346 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1347 * @see recorder_attr_set_audio_encoder_bitrate()
1349 int legacy_recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitrate);
1352 * @brief Sets the mute state of a recorder.
1353 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1354 * @param[in] recorder The handle to the media recorder
1355 * @param[in] enable The mute state
1356 * @return @c 0 on success, otherwise a negative error value
1357 * @retval #RECORDER_ERROR_NONE Successful
1358 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1359 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1360 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1361 * @see recorder_attr_is_muted()
1363 int legacy_recorder_attr_set_mute(recorder_h recorder, bool enable);
1366 * @brief Gets the mute state of a recorder.
1367 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1368 * @param[in] recorder The handle to the media recorder
1369 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1370 * @return @c true if the recorder is not recording any sound,
1371 * otherwise @c false if the recorder is recording
1372 * @exception #RECORDER_ERROR_NONE Successful
1373 * @exception #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1374 * @exception #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1375 * @exception #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1376 * @see recorder_attr_set_mute()
1378 bool legacy_recorder_attr_is_muted(recorder_h recorder);
1381 * @brief Sets the recording motion rate.
1382 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1383 * @remarks This attribute is valid only in a video recorder. \n
1384 * If the rate bigger than @c 0 and smaller than @c 1, video is recorded in a slow motion mode. \n
1385 * If the rate bigger than @c 1, video is recorded in a fast motion mode (time lapse recording).
1386 * @remarks Audio data is not recorded. \n
1387 * To reset slow motion recording, set the rate to @c 1.
1388 * @param[in] recorder The handle to the media recorder
1389 * @param[in] rate The recording motion rate \n
1390 * It is computed with fps. (@c 0<rate<@c 1 for slow motion, @c 1<rate for fast motion(time lapse recording), @c 1 to reset).
1391 * @return @c 0 on success, otherwise a negative error value
1392 * @retval #RECORDER_ERROR_NONE Successful
1393 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1394 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1395 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1396 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
1397 * @see recorder_attr_get_recording_motion_rate()
1399 int legacy_recorder_attr_set_recording_motion_rate(recorder_h recorder, double rate);
1402 * @brief Gets the recording motion rate.
1403 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1404 * @remarks This attribute is valid only in a video recorder. \n
1405 * If the rate bigger than @c 0 and smaller than @c 1, video is recorded in a slow motion mode. \n
1406 * If the rate bigger than @c 1, video is recorded in a fast motion mode (time lapse recording).
1407 * @remarks Audio data is not recorded. \n
1408 * To reset slow motion recording, set the rate to @c 1.
1409 * @param[in] recorder The handle to the media recorder
1410 * @param[out] rate The recording motion rate \n
1411 * It is computed with fps.
1412 * @return @c 0 on success, otherwise a negative error value
1413 * @retval #RECORDER_ERROR_NONE Successful
1414 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1415 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1416 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1417 * @see recorder_attr_set_recording_motion_rate()
1419 int legacy_recorder_attr_get_recording_motion_rate(recorder_h recorder, double *rate);
1422 * @brief Sets the number of the audio channel.
1423 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1424 * @remarks This attribute is applied only in RECORDER_STATE_CREATED state. \n
1425 * For mono recording, setting channel to @c 1. \n
1426 * For stereo recording, setting channel to @c 2.
1427 * @param[in] recorder The handle to the media recorder
1428 * @param[in] channel_count The number of the audio channel
1429 * @return @c 0 on success, otherwise a negative error value
1430 * @retval #RECORDER_ERROR_NONE Successful
1431 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1432 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1433 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1434 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n
1435 * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY.
1436 * @see recorder_attr_get_audio_channel()
1438 int legacy_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count);
1441 * @brief Gets the number of the audio channel.
1442 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1443 * @param[in] recorder The handle to the media recorder
1444 * @param[out] channel_count The number of the audio channel
1445 * @return @c 0 on success, otherwise a negative error value
1446 * @retval #RECORDER_ERROR_NONE Successful
1447 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1448 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1449 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1450 * @see recorder_attr_set_audio_channel()
1452 int legacy_recorder_attr_get_audio_channel(recorder_h recorder, int *channel_count);
1456 * @brief Sets the video orientation in a video metadata tag.
1457 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1458 * @param[in] recorder The handle to a media recorder
1459 * @param[in] orientation The information of the video orientation
1460 * @return @c 0 on success, otherwise a negative error value
1461 * @retval #RECORDER_ERROR_NONE Successful
1462 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1463 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1464 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1465 * @see recorder_attr_get_orientation_tag()
1467 int legacy_recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotation_e orientation);
1470 * @brief Gets the video orientation in a video metadata tag.
1471 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1472 * @param[in] recorder The handle to a media recorder
1473 * @param[out] orientation The information of the video orientation
1474 * @return @c 0 on success, otherwise a negative error value
1475 * @retval #RECORDER_ERROR_NONE Successful
1476 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1477 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1478 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1479 * @see recorder_attr_set_orientation_tag()
1481 int legacy_recorder_attr_get_orientation_tag(recorder_h recorder, recorder_rotation_e *orientation);
1484 * @brief Sets the root directory to check available space.
1485 * @details This function sets root directory to recorder, and it's used to check available space to write recording file.
1487 * @param[in] recorder The handle to the media recorder
1488 * @param[in] root_directory The root directory of the client process
1489 * @return @c 0 on success, otherwise a negative error value
1490 * @retval #RECORDER_ERROR_NONE Successful
1491 * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
1492 * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
1493 * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1494 * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
1495 * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
1497 int legacy_recorder_attr_set_root_directory(recorder_h recorder, const char *root_directory);
1507 #endif /* __TIZEN_MULTIMEDIA_RECORDER_H__ */