Tizen Native API
4.0
|
The Recorder API provides functions for audio and video recording.
#include <recorder.h>
The Recorder API provides functions to control the recording of a multimedia content. Simple audio and audio/video are supported. Recording operations operate as a state machine, described below.
In addition, the API contains functions to configure the recording process, or find details about it, such as getting/setting the filename for the recording, the file format and the video codec. Some of these interfaces are listed in the Recorder Attributes API.
Additional functions allow registering notifications via callback functions for various state change events.
FUNCTION | PRE-STATE | POST-STATE | SYNC TYPE |
---|---|---|---|
recorder_create_videorecorder() recorder_create_audiorecorder() | NONE | CREATED | SYNC |
recorder_destroy() | CREATED | NONE | SYNC |
recorder_prepare() | CREATED | READY | SYNC |
recorder_unprepare() | READY | CREATED | SYNC |
recorder_start() | READY / PAUSED | RECORDING | SYNC |
recorder_pause() | RECORDING | PAUSED | SYNC |
recorder_cancel() recorder_commit() | RECORDING / PAUSED | READY | SYNC |
The callback mechanism is used to notify the application about significant recorder events.
REGISTER | UNREGISTER | CALLBACK | DESCRIPTION |
---|---|---|---|
recorder_set_recording_limit_reached_cb() | recorder_unset_recording_limit_reached_cb() | recorder_recording_limit_reached_cb() | This callback is called when recording limitation error has occurred during recording. |
recorder_set_recording_status_cb() | recorder_unset_recording_status_cb() | recorder_recording_status_cb() | This callback is used to notify the recording status. |
recorder_set_state_changed_cb() | recorder_unset_state_changed_cb() | recorder_state_changed_cb() | This callback is used to notify the change of recorder's state. |
FOREACH | CALLBACK | DESCRIPTION |
---|---|---|
recorder_foreach_supported_file_format() | recorder_supported_file_format_cb() | Supported file format |
recorder_foreach_supported_audio_encoder() | recorder_supported_audio_encoder_cb() | Supported audio encoder |
recorder_foreach_supported_video_encoder() | recorder_supported_video_encoder_cb() | Supported video encoder |
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions | |
int | recorder_create_videorecorder (camera_h camera, recorder_h *recorder) |
Creates a recorder handle to record a video. | |
int | recorder_create_audiorecorder (recorder_h *recorder) |
Creates a recorder handle to record an audio. | |
int | recorder_destroy (recorder_h recorder) |
Destroys the recorder handle. | |
int | recorder_prepare (recorder_h recorder) |
Prepares the media recorder for recording. | |
int | recorder_unprepare (recorder_h recorder) |
Resets the media recorder. | |
int | recorder_start (recorder_h recorder) |
Starts the recording. | |
int | recorder_pause (recorder_h recorder) |
Pauses the recording. | |
int | recorder_commit (recorder_h recorder) |
Stops recording and saves the result. | |
int | recorder_cancel (recorder_h recorder) |
Cancels the recording. | |
int | recorder_get_state (recorder_h recorder, recorder_state_e *state) |
Gets the recorder's current state. | |
int | recorder_get_audio_level (recorder_h recorder, double *dB) |
Gets the peak audio input level that was sampled since the last call to this function. | |
int | recorder_set_filename (recorder_h recorder, const char *path) |
Sets the file path to record. | |
int | recorder_get_filename (recorder_h recorder, char **path) |
Gets the file path to record. | |
int | recorder_set_file_format (recorder_h recorder, recorder_file_format_e format) |
Sets the file format for recording media stream. | |
int | recorder_get_file_format (recorder_h recorder, recorder_file_format_e *format) |
Gets the file format for recording media stream. | |
int | recorder_set_sound_stream_info (recorder_h recorder, sound_stream_info_h stream_info) |
Sets the recorder's sound manager stream information. | |
int | recorder_set_audio_encoder (recorder_h recorder, recorder_audio_codec_e codec) |
Sets the audio codec for encoding an audio stream. | |
int | recorder_get_audio_encoder (recorder_h recorder, recorder_audio_codec_e *codec) |
Gets the audio codec for encoding an audio stream. | |
int | recorder_set_video_resolution (recorder_h recorder, int width, int height) |
Sets the resolution of the video recording. | |
int | recorder_get_video_resolution (recorder_h recorder, int *width, int *height) |
Gets the resolution of the video recording. | |
int | recorder_set_video_encoder (recorder_h recorder, recorder_video_codec_e codec) |
Sets the video codec for encoding video stream. | |
int | recorder_get_video_encoder (recorder_h recorder, recorder_video_codec_e *codec) |
Gets the video codec for encoding video stream. | |
int | recorder_set_state_changed_cb (recorder_h recorder, recorder_state_changed_cb callback, void *user_data) |
Registers the callback function that will be invoked when the recorder state changes. | |
int | recorder_unset_state_changed_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_set_interrupted_cb (recorder_h recorder, recorder_interrupted_cb callback, void *user_data) |
Registers a callback function to be called when the media recorder is interrupted according to a policy. | |
int | recorder_unset_interrupted_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_set_interrupt_started_cb (recorder_h recorder, recorder_interrupt_started_cb callback, void *user_data) |
Registers a callback function to be called when the media recorder interrupt is started according to a policy. | |
int | recorder_unset_interrupt_started_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_set_audio_stream_cb (recorder_h recorder, recorder_audio_stream_cb callback, void *user_data) |
Registers a callback function to be called when audio stream data is being delivered. | |
int | recorder_unset_audio_stream_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_set_muxed_stream_cb (recorder_h recorder, recorder_muxed_stream_cb callback, void *user_data) |
Registers a callback function to be called when muxed stream data is delivered. | |
int | recorder_unset_muxed_stream_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_set_recording_status_cb (recorder_h recorder, recorder_recording_status_cb callback, void *user_data) |
Registers a callback function to be invoked when the recording information changes. | |
int | recorder_unset_recording_status_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_set_recording_limit_reached_cb (recorder_h recorder, recorder_recording_limit_reached_cb callback, void *user_data) |
Registers the callback function to be run when reached the recording limit. | |
int | recorder_unset_recording_limit_reached_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_set_error_cb (recorder_h recorder, recorder_error_cb callback, void *user_data) |
Registers a callback function to be called when an asynchronous operation error occurred. | |
int | recorder_unset_error_cb (recorder_h recorder) |
Unregisters the callback function. | |
int | recorder_get_device_state (recorder_type_e type, recorder_device_state_e *state) |
Gets the state of recorder device. | |
int | recorder_add_device_state_changed_cb (recorder_device_state_changed_cb callback, void *user_data, int *cb_id) |
Registers a callback function to be called when the recorder device state changes. | |
int | recorder_remove_device_state_changed_cb (int cb_id) |
Unregisters a callback function. | |
Typedefs | |
typedef struct recorder_s * | recorder_h |
The Media recorder handle. | |
typedef void(* | recorder_recording_limit_reached_cb )(recorder_recording_limit_type_e type, void *user_data) |
Called when limitation error occurs while recording. | |
typedef void(* | recorder_recording_status_cb )(unsigned long long elapsed_time, unsigned long long file_size, void *user_data) |
Called to indicate the recording status. | |
typedef void(* | recorder_state_changed_cb )(recorder_state_e previous, recorder_state_e current, bool by_policy, void *user_data) |
Called when the record state is changed. | |
typedef void(* | recorder_device_state_changed_cb )(recorder_type_e type, recorder_device_state_e state, void *user_data) |
Called when the recorder device state is changed. | |
typedef void(* | recorder_interrupted_cb )(recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data) |
Called when the recorder is interrupted by a policy. | |
typedef void(* | recorder_interrupt_started_cb )(recorder_policy_e policy, recorder_state_e state, void *user_data) |
Called when the recorder interrupt is started by a policy. | |
typedef void(* | recorder_audio_stream_cb )(void *stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data) |
Called when audio stream data was being delivered just before storing in the recorded file. | |
typedef void(* | recorder_muxed_stream_cb )(void *stream, int size, unsigned long long offset, void *user_data) |
Called when muxed stream data is delivered just before writing to the file. | |
typedef bool(* | recorder_supported_video_resolution_cb )(int width, int height, void *user_data) |
Called once for each supported video resolution. | |
typedef void(* | recorder_error_cb )(recorder_error_e error, recorder_state_e current_state, void *user_data) |
Called when the error occurred. |
typedef void(* recorder_audio_stream_cb)(void *stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data) |
Called when audio stream data was being delivered just before storing in the recorded file.
[in] | stream | The audio stream data |
[in] | size | The size of the stream data |
[in] | format | The audio format |
[in] | channel | The number of the channel |
[in] | timestamp | The timestamp of the stream buffer (in msec) |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* recorder_device_state_changed_cb)(recorder_type_e type, recorder_device_state_e state, void *user_data) |
Called when the recorder device state is changed.
[in] | type | The recorder type |
[in] | state | The state of the recorder device |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* recorder_error_cb)(recorder_error_e error, recorder_state_e current_state, void *user_data) |
Called when the error occurred.
[in] | error | The error code |
[in] | current_state | The current state of the recorder |
[in] | user_data | The user data passed from the callback registration function |
typedef struct recorder_s* recorder_h |
The Media recorder handle.
typedef void(* recorder_interrupt_started_cb)(recorder_policy_e policy, recorder_state_e state, void *user_data) |
Called when the recorder interrupt is started by a policy.
[in] | policy | The policy that is interrupting the recorder |
[in] | state | The current state of the recorder |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* recorder_interrupted_cb)(recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data) |
Called when the recorder is interrupted by a policy.
[in] | policy | The policy that interrupted the recorder |
[in] | previous | The previous state of the recorder |
[in] | current | The current state of the recorder |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* recorder_muxed_stream_cb)(void *stream, int size, unsigned long long offset, void *user_data) |
Called when muxed stream data is delivered just before writing to the file.
[in] | stream | The muxed stream data |
[in] | size | The size of the stream data |
[in] | offset | The offset of the stream data |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* recorder_recording_limit_reached_cb)(recorder_recording_limit_type_e type, void *user_data) |
Called when limitation error occurs while recording.
The callback function is possible to receive three types of limits: time, size and no-space.
[in] | type | The imitation type |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* recorder_recording_status_cb)(unsigned long long elapsed_time, unsigned long long file_size, void *user_data) |
Called to indicate the recording status.
[in] | elapsed_time | The time of the recording (milliseconds) |
[in] | file_size | The size of the recording file (KB) |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* recorder_state_changed_cb)(recorder_state_e previous, recorder_state_e current, bool by_policy, void *user_data) |
Called when the record state is changed.
[in] | previous | The previous state of the recorder |
[in] | current | The current state of the recorder |
[in] | by_policy | true if the state is changed by policy, otherwise false if the state is not changed |
[in] | user_data | The user data passed from the callback registration function |
typedef bool(* recorder_supported_video_resolution_cb)(int width, int height, void *user_data) |
Called once for each supported video resolution.
[in] | width | The video image width |
[in] | height | The video image height |
[in] | user_data | The user data passed from the foreach function |
true
to continue with the next iteration of the loop, false
to break out of the loop enum recorder_error_e |
Enumeration for error code of the media recorder.
Enumeration for the file container format.
enum recorder_policy_e |
Enumeration for the recorder policy.
enum recorder_rotation_e |
enum recorder_state_e |
Enumeration for recorder states.
enum recorder_type_e |
int recorder_add_device_state_changed_cb | ( | recorder_device_state_changed_cb | callback, |
void * | user_data, | ||
int * | cb_id | ||
) |
Registers a callback function to be called when the recorder device state changes.
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
[out] | cb_id | The id of the registered callback |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_OUT_OF_MEMORY | Out of memory |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
int recorder_cancel | ( | recorder_h | recorder | ) |
Cancels the recording.
The recording data is discarded and not written in the recording file.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_commit | ( | recorder_h | recorder | ) |
Stops recording and saves the result.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_create_audiorecorder | ( | recorder_h * | recorder | ) |
Creates a recorder handle to record an audio.
[out] | recorder | A handle to the recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_OUT_OF_MEMORY | Out of memory |
RECORDER_ERROR_SOUND_POLICY | Sound policy error |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
int recorder_create_videorecorder | ( | camera_h | camera, |
recorder_h * | recorder | ||
) |
Creates a recorder handle to record a video.
[in] | camera | The handle to the camera |
[out] | recorder | A handle to the recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_OUT_OF_MEMORY | Out of memory |
RECORDER_ERROR_SOUND_POLICY | Sound policy error |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
int recorder_destroy | ( | recorder_h | recorder | ) |
Destroys the recorder handle.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
int recorder_get_audio_encoder | ( | recorder_h | recorder, |
recorder_audio_codec_e * | codec | ||
) |
Gets the audio codec for encoding an audio stream.
[in] | recorder | The handle to the media recorder |
[out] | codec | The audio codec |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_get_audio_level | ( | recorder_h | recorder, |
double * | dB | ||
) |
Gets the peak audio input level that was sampled since the last call to this function.
0
dB indicates maximum input level, -300
dB indicates minimum input level. [in] | recorder | The handle to the media recorder |
[out] | dB | The audio input level in dB |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_get_device_state | ( | recorder_type_e | type, |
recorder_device_state_e * | state | ||
) |
Gets the state of recorder device.
[in] | type | The recorder type |
[out] | state | The current state of the device |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
int recorder_get_file_format | ( | recorder_h | recorder, |
recorder_file_format_e * | format | ||
) |
Gets the file format for recording media stream.
[in] | recorder | The handle to the media recorder |
[out] | format | The media file format |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_get_filename | ( | recorder_h | recorder, |
char ** | path | ||
) |
Gets the file path to record.
[in] | recorder | The handle to the media recorder |
[out] | path | The recording file path |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_get_state | ( | recorder_h | recorder, |
recorder_state_e * | state | ||
) |
Gets the recorder's current state.
[in] | recorder | The handle to the media recorder |
[out] | state | The current state of the recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_get_video_encoder | ( | recorder_h | recorder, |
recorder_video_codec_e * | codec | ||
) |
Gets the video codec for encoding video stream.
[in] | recorder | The handle to the media recorder |
[out] | codec | The video codec |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_get_video_resolution | ( | recorder_h | recorder, |
int * | width, | ||
int * | height | ||
) |
Gets the resolution of the video recording.
[in] | recorder | The handle to the media recorder |
[out] | width | The video width |
[out] | height | The video height |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_pause | ( | recorder_h | recorder | ) |
Pauses the recording.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_prepare | ( | recorder_h | recorder | ) |
Prepares the media recorder for recording.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_SOUND_POLICY | Sound policy error |
RECORDER_ERROR_RESOURCE_CONFLICT | Resource conflict error |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_remove_device_state_changed_cb | ( | int | cb_id | ) |
Unregisters a callback function.
[in] | cb_id | The id of the registered callback |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
int recorder_set_audio_encoder | ( | recorder_h | recorder, |
recorder_audio_codec_e | codec | ||
) |
Sets the audio codec for encoding an audio stream.
[in] | recorder | The handle to the media recorder |
[in] | codec | The audio codec |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation (Since 2.3.1) |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_audio_stream_cb | ( | recorder_h | recorder, |
recorder_audio_stream_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be called when audio stream data is being delivered.
[in] | recorder | The handle to the recorder |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_error_cb | ( | recorder_h | recorder, |
recorder_error_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be called when an asynchronous operation error occurred.
[in] | recorder | The handle to the recorder |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_file_format | ( | recorder_h | recorder, |
recorder_file_format_e | format | ||
) |
Sets the file format for recording media stream.
[in] | recorder | The handle to the media recorder |
[in] | format | The media file format |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation (Since 2.3.1) |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_filename | ( | recorder_h | recorder, |
const char * | path | ||
) |
Sets the file path to record.
This function sets file path which defines where newly recorded data should be stored.
[in] | recorder | The handle to the media recorder |
[in] | path | The recording file path |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_interrupt_started_cb | ( | recorder_h | recorder, |
recorder_interrupt_started_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be called when the media recorder interrupt is started according to a policy.
[in] | recorder | The handle to the media recorder |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int recorder_set_interrupted_cb | ( | recorder_h | recorder, |
recorder_interrupted_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be called when the media recorder is interrupted according to a policy.
[in] | recorder | The handle to the media recorder |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_muxed_stream_cb | ( | recorder_h | recorder, |
recorder_muxed_stream_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be called when muxed stream data is delivered.
[in] | recorder | The handle to the recorder |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
int recorder_set_recording_limit_reached_cb | ( | recorder_h | recorder, |
recorder_recording_limit_reached_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback function to be run when reached the recording limit.
[in] | recorder | The handle to media recorder |
[in] | callback | The function pointer of user callback |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_recording_status_cb | ( | recorder_h | recorder, |
recorder_recording_status_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be invoked when the recording information changes.
[in] | recorder | The handle to the media recorder |
[in] | callback | The function pointer of user callback |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_sound_stream_info | ( | recorder_h | recorder, |
sound_stream_info_h | stream_info | ||
) |
Sets the recorder's sound manager stream information.
[in] | recorder | The handle to the media recorder |
[in] | stream_info | The sound manager info |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
int recorder_set_state_changed_cb | ( | recorder_h | recorder, |
recorder_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback function that will be invoked when the recorder state changes.
[in] | recorder | The handle to the media recorder |
[in] | callback | The function pointer of user callback |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_video_encoder | ( | recorder_h | recorder, |
recorder_video_codec_e | codec | ||
) |
Sets the video codec for encoding video stream.
[in] | recorder | The handle to the media recorder |
[in] | codec | The video codec |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_set_video_resolution | ( | recorder_h | recorder, |
int | width, | ||
int | height | ||
) |
Sets the resolution of the video recording.
[in] | recorder | The handle to the media recorder |
[in] | width | The video width |
[in] | height | The video height |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_start | ( | recorder_h | recorder | ) |
Starts the recording.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_unprepare | ( | recorder_h | recorder | ) |
Resets the media recorder.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_unset_audio_stream_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_unset_error_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the recorder |
on
success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_unset_interrupt_started_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int recorder_unset_interrupted_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_unset_muxed_stream_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_INVALID_OPERATION | Invalid operation |
RECORDER_ERROR_INVALID_STATE | Invalid state |
int recorder_unset_recording_limit_reached_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_unset_recording_status_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |
int recorder_unset_state_changed_cb | ( | recorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the media recorder |
0
on success, otherwise a negative error value RECORDER_ERROR_NONE | Successful |
RECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
RECORDER_ERROR_PERMISSION_DENIED | The access to the resources can not be granted |
RECORDER_ERROR_NOT_SUPPORTED | The feature is not supported |
RECORDER_ERROR_SERVICE_DISCONNECTED | The socket to multimedia server is disconnected |