Tizen Native API
5.0
|
The Attributes API provides functions for getting and setting recorder attributes.
#include <recorder.h>
The Media Recorder API provides basic recorder attribute manipulators.
The Recorder Attributes API provides functions to set and get basic recorder attributes:
Each of these attributes have a get/set pair of functions. For example, recorder_attr_set_time_limit() and recorder_attr_get_time_limit(). For more detailed information and programming examples for this API, see the Multimedia Tutorial.
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_attr_set_size_limit (recorder_h recorder, int kbyte) |
Sets the maximum size of a recording file. | |
int | recorder_attr_get_size_limit (recorder_h recorder, int *kbyte) |
Gets the maximum size of a recording file. | |
int | recorder_attr_set_time_limit (recorder_h recorder, int second) |
Sets the time limit of a recording file. | |
int | recorder_attr_get_time_limit (recorder_h recorder, int *second) |
Gets the time limit of a recording file. | |
int | recorder_attr_set_audio_device (recorder_h recorder, recorder_audio_device_e device) |
Sets the audio device for recording. | |
int | recorder_attr_get_audio_device (recorder_h recorder, recorder_audio_device_e *device) |
Gets the audio device for recording. | |
int | recorder_attr_set_audio_samplerate (recorder_h recorder, int samplerate) |
Sets the sampling rate of an audio stream. | |
int | recorder_attr_get_audio_samplerate (recorder_h recorder, int *samplerate) |
Gets the sampling rate of an audio stream. | |
int | recorder_attr_set_audio_encoder_bitrate (recorder_h recorder, int bitrate) |
Sets the bitrate of an audio encoder. | |
int | recorder_attr_set_video_encoder_bitrate (recorder_h recorder, int bitrate) |
Sets the bitrate of a video encoder. | |
int | recorder_attr_get_audio_encoder_bitrate (recorder_h recorder, int *bitrate) |
Gets the bitrate of an audio encoder. | |
int | recorder_attr_get_video_encoder_bitrate (recorder_h recorder, int *bitrate) |
Gets the bitrate of a video encoder. | |
int | recorder_attr_set_mute (recorder_h recorder, bool enable) |
Sets the mute state of a recorder. | |
bool | recorder_attr_is_muted (recorder_h recorder) |
Gets the mute state of a recorder. | |
int | recorder_attr_set_recording_motion_rate (recorder_h recorder, double rate) |
Sets the recording motion rate. | |
int | recorder_attr_get_recording_motion_rate (recorder_h recorder, double *rate) |
Gets the recording motion rate. | |
int | recorder_attr_set_audio_channel (recorder_h recorder, int channel_count) |
Sets the number of the audio channel. | |
int | recorder_attr_get_audio_channel (recorder_h recorder, int *channel_count) |
Gets the number of the audio channel. | |
int | recorder_attr_set_orientation_tag (recorder_h recorder, recorder_rotation_e orientation) |
Sets the video orientation in a video metadata tag. | |
int | recorder_attr_get_orientation_tag (recorder_h recorder, recorder_rotation_e *orientation) |
Gets the video orientation in a video metadata tag. |
int recorder_attr_get_audio_channel | ( | recorder_h | recorder, |
int * | channel_count | ||
) |
Gets the number of the audio channel.
[in] | recorder | The handle to the media recorder |
[out] | channel_count | The number of the audio channel |
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_attr_get_audio_device | ( | recorder_h | recorder, |
recorder_audio_device_e * | device | ||
) |
Gets the audio device for recording.
[in] | recorder | The handle to the media recorder |
[out] | device | The type of an audio device |
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_attr_get_audio_encoder_bitrate | ( | recorder_h | recorder, |
int * | bitrate | ||
) |
Gets the bitrate of an audio encoder.
[in] | recorder | The handle to the media recorder |
[out] | bitrate | The bitrate in bits per second |
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_attr_get_audio_samplerate | ( | recorder_h | recorder, |
int * | samplerate | ||
) |
Gets the sampling rate of an audio stream.
[in] | recorder | The handle to the media recorder |
[out] | samplerate | The sample rate in Hertz |
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_attr_get_orientation_tag | ( | recorder_h | recorder, |
recorder_rotation_e * | orientation | ||
) |
Gets the video orientation in a video metadata tag.
[in] | recorder | The handle to a media recorder |
[out] | orientation | The information of the video orientation |
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_attr_get_recording_motion_rate | ( | recorder_h | recorder, |
double * | rate | ||
) |
Gets the recording motion rate.
0
and smaller than 1
, video is recorded in a slow motion mode. 1
, video is recorded in a fast motion mode (time lapse recording). 1
. [in] | recorder | The handle to the media recorder |
[out] | rate | The recording motion rate It is computed with fps. |
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_attr_get_size_limit | ( | recorder_h | recorder, |
int * | kbyte | ||
) |
Gets the maximum size of a recording file.
[in] | recorder | The handle to the media recorder |
[out] | kbyte | The maximum size of recording file (KB) 0 means unlimited recording size. |
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_attr_get_time_limit | ( | recorder_h | recorder, |
int * | second | ||
) |
Gets the time limit of a recording file.
[in] | recorder | The handle to the media recorder |
[out] | second | The time limit of the recording file (in seconds) 0 means unlimited recording time. |
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_attr_get_video_encoder_bitrate | ( | recorder_h | recorder, |
int * | bitrate | ||
) |
Gets the bitrate of a video encoder.
[in] | recorder | The handle to the media recorder |
[out] | bitrate | The bitrate in bits per second |
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 |
bool recorder_attr_is_muted | ( | recorder_h | recorder | ) |
Gets the mute state of a recorder.
[in] | recorder | The handle to the media recorder |
true
if the recorder is not recording any sound, otherwise false
if the recorder is recording 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 |
int recorder_attr_set_audio_channel | ( | recorder_h | recorder, |
int | channel_count | ||
) |
Sets the number of the audio channel.
1
. 2
. [in] | recorder | The handle to the media recorder |
[in] | channel_count | The number of the audio channel |
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_attr_set_audio_device | ( | recorder_h | recorder, |
recorder_audio_device_e | device | ||
) |
Sets the audio device for recording.
[in] | recorder | The handle to the media recorder |
[in] | device | The type of an audio device |
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_attr_set_audio_encoder_bitrate | ( | recorder_h | recorder, |
int | bitrate | ||
) |
Sets the bitrate of an audio encoder.
[in] | recorder | The handle to the media recorder |
[in] | bitrate | The bitrate (for mms : 12200[bps], normal : 288000[bps]) |
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_attr_set_audio_samplerate | ( | recorder_h | recorder, |
int | samplerate | ||
) |
Sets the sampling rate of an audio stream.
[in] | recorder | The handle to the media recorder |
[in] | samplerate | The sample rate in Hertz |
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_attr_set_mute | ( | recorder_h | recorder, |
bool | enable | ||
) |
Sets the mute state of a recorder.
[in] | recorder | The handle to the media recorder |
[in] | enable | The mute state |
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_attr_set_orientation_tag | ( | recorder_h | recorder, |
recorder_rotation_e | orientation | ||
) |
Sets the video orientation in a video metadata tag.
[in] | recorder | The handle to a media recorder |
[in] | orientation | The information of the video orientation |
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_attr_set_recording_motion_rate | ( | recorder_h | recorder, |
double | rate | ||
) |
Sets the recording motion rate.
0
and smaller than 1
, video is recorded in a slow motion mode. 1
, video is recorded in a fast motion mode (time lapse recording). 1
. [in] | recorder | The handle to the media recorder |
[in] | rate | The recording motion rate It is computed with fps. ( 0<rate< slow motion, 1<rate for fast motion(time lapse recording), 1 to reset). |
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_attr_set_size_limit | ( | recorder_h | recorder, |
int | kbyte | ||
) |
Sets the maximum size of a recording file.
[in] | recorder | The handle to the media recorder |
[in] | kbyte | The maximum size of the recording file(KB) 0 means unlimited recording size. |
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_attr_set_time_limit | ( | recorder_h | recorder, |
int | second | ||
) |
Sets the time limit of a recording file.
[in] | recorder | The handle to the media recorder |
[in] | second | The time limit of the recording file (in seconds) 0 means unlimited recording size. |
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_attr_set_video_encoder_bitrate | ( | recorder_h | recorder, |
int | bitrate | ||
) |
Sets the bitrate of a video encoder.
[in] | recorder | The handle to the media recorder |
[in] | bitrate | The bitrate in bits per second |
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 |