| 
    Tizen Native API
    4.0
    
   
   | 
  
  
  
 
The Attributes API provides functions to fetch StreamRecorder attributes.
#include <streamrecorder.h>
The StreamRecorder Attributes API provides functions to get/set basic StreamRecorder attributes.
With the StreamRecorder Attributes API you are able to set and get StreamRecorder attributes like:
Functions | |
| int | streamrecorder_set_filename (streamrecorder_h recorder, const char *path) | 
| Sets the file path to record.   | |
| int | streamrecorder_get_filename (streamrecorder_h recorder, char **path) | 
| Gets the file path to record.   | |
| int | streamrecorder_set_file_format (streamrecorder_h recorder, streamrecorder_file_format_e format) | 
| Sets the file format for recording media stream.   | |
| int | streamrecorder_get_file_format (streamrecorder_h recorder, streamrecorder_file_format_e *format) | 
| Gets the file format for recording media stream.   | |
| int | streamrecorder_set_audio_encoder (streamrecorder_h recorder, streamrecorder_audio_codec_e codec) | 
| Sets the audio codec for encoding an audio stream.   | |
| int | streamrecorder_get_audio_encoder (streamrecorder_h recorder, streamrecorder_audio_codec_e *codec) | 
| Gets the audio codec for encoding an audio stream.   | |
| int | streamrecorder_set_video_resolution (streamrecorder_h recorder, int width, int height) | 
| Sets the resolution of the video recording.   | |
| int | streamrecorder_get_video_resolution (streamrecorder_h recorder, int *width, int *height) | 
| Gets the resolution of the video recording.   | |
| int | streamrecorder_set_video_encoder (streamrecorder_h recorder, streamrecorder_video_codec_e codec) | 
| Sets the video codec for encoding video stream.   | |
| int | streamrecorder_get_video_encoder (streamrecorder_h recorder, streamrecorder_video_codec_e *codec) | 
| Gets the video codec for encoding video stream.   | |
| int | streamrecorder_set_video_framerate (streamrecorder_h recorder, int framerate) | 
| Sets the recording frame rate.   | |
| int | streamrecorder_get_video_framerate (streamrecorder_h recorder, int *framerate) | 
| Gets the recording frame rate.   | |
| int | streamrecorder_set_video_source_format (streamrecorder_h recorder, streamrecorder_video_source_format_e format) | 
| Sets the video source format.   | |
| int | streamrecorder_get_video_source_format (streamrecorder_h recorder, streamrecorder_video_source_format_e *format) | 
| Gets the video source format.   | |
| int | streamrecorder_set_recording_limit (streamrecorder_h recorder, streamrecorder_recording_limit_type_e type, int limit) | 
| Sets the maximum size of a recording file.   | |
| int | streamrecorder_get_recording_limit (streamrecorder_h recorder, streamrecorder_recording_limit_type_e type, int *limit) | 
| Gets the maximum size of a recording file.   | |
| int | streamrecorder_set_audio_samplerate (streamrecorder_h recorder, int samplerate) | 
| Sets the sampling rate of an audio stream.   | |
| int | streamrecorder_get_audio_samplerate (streamrecorder_h recorder, int *samplerate) | 
| Gets the sampling rate of an audio stream.   | |
| int | streamrecorder_set_audio_encoder_bitrate (streamrecorder_h recorder, int bitrate) | 
| Sets the bitrate of an audio encoder.   | |
| int | streamrecorder_set_video_encoder_bitrate (streamrecorder_h recorder, int bitrate) | 
| Sets the bitrate of a video encoder.   | |
| int | streamrecorder_get_audio_encoder_bitrate (streamrecorder_h recorder, int *bitrate) | 
| Gets the bitrate of an audio encoder.   | |
| int | streamrecorder_get_video_encoder_bitrate (streamrecorder_h recorder, int *bitrate) | 
| Gets the bitrate of a video encoder.   | |
| int | streamrecorder_set_audio_channel (streamrecorder_h recorder, int channel_count) | 
| Sets the number of the audio channel.   | |
| int | streamrecorder_get_audio_channel (streamrecorder_h recorder, int *channel_count) | 
| Gets the number of the audio channel.   | |
| int streamrecorder_get_audio_channel | ( | streamrecorder_h | recorder, | 
| int * | channel_count | ||
| ) | 
Gets the number of the audio channel.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | channel_count | The number of the audio channel | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_get_audio_encoder | ( | streamrecorder_h | recorder, | 
| streamrecorder_audio_codec_e * | codec | ||
| ) | 
Gets the audio codec for encoding an audio stream.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | codec | The audio codec | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_NOT_SUPPORTED | The feature is not supported | 
| int streamrecorder_get_audio_encoder_bitrate | ( | streamrecorder_h | recorder, | 
| int * | bitrate | ||
| ) | 
Gets the bitrate of an audio encoder.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | bitrate | The bitrate in bits per second | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_get_audio_samplerate | ( | streamrecorder_h | recorder, | 
| int * | samplerate | ||
| ) | 
Gets the sampling rate of an audio stream.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | samplerate | The sample rate in Hertz | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_get_file_format | ( | streamrecorder_h | recorder, | 
| streamrecorder_file_format_e * | format | ||
| ) | 
Gets the file format for recording media stream.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | format | The media file format | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_get_filename | ( | streamrecorder_h | recorder, | 
| char ** | path | ||
| ) | 
Gets the file path to record.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | path | The recording file path | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter streamrecorder_enable_source_buffer() should be invoked before this function. | 
| int streamrecorder_get_recording_limit | ( | streamrecorder_h | recorder, | 
| streamrecorder_recording_limit_type_e | type, | ||
| int * | limit | ||
| ) | 
Gets the maximum size of a recording file.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | type | The recording limit type | 
| [out] | limit | If limit type is STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE, the limit value is the maximum size of the recording file(KB),  otherwise limit value is the maximum time of the recording file (in seconds) 0 means unlimited recording size or time.  | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_get_video_encoder | ( | streamrecorder_h | recorder, | 
| streamrecorder_video_codec_e * | codec | ||
| ) | 
Gets the video codec for encoding video stream.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | codec | The video codec | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_NOT_SUPPORTED | The feature is not supported | 
| int streamrecorder_get_video_encoder_bitrate | ( | streamrecorder_h | recorder, | 
| int * | bitrate | ||
| ) | 
Gets the bitrate of a video encoder.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | bitrate | The bitrate in bits per second | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_get_video_framerate | ( | streamrecorder_h | recorder, | 
| int * | framerate | ||
| ) | 
Gets the recording frame rate.
| [in] | recorder | The handle to the camera | 
| [out] | framerate | The frame rate for recording that already is set | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_get_video_resolution | ( | streamrecorder_h | recorder, | 
| int * | width, | ||
| int * | height | ||
| ) | 
Gets the resolution of the video recording.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | width | The video width | 
| [out] | height | The video height | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_NOT_SUPPORTED | The feature is not supported | 
| int streamrecorder_get_video_source_format | ( | streamrecorder_h | recorder, | 
| streamrecorder_video_source_format_e * | format | ||
| ) | 
Gets the video source format.
| [in] | recorder | The handle to the streamrecorder | 
| [out] | format | The color type of video source that already is set | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| int streamrecorder_set_audio_channel | ( | streamrecorder_h | recorder, | 
| int | channel_count | ||
| ) | 
Sets the number of the audio channel.
1. 2. | [in] | recorder | The handle to the streamrecorder | 
| [in] | channel_count | The number of the audio channel | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| int streamrecorder_set_audio_encoder | ( | streamrecorder_h | recorder, | 
| streamrecorder_audio_codec_e | codec | ||
| ) | 
Sets the audio codec for encoding an audio stream.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | codec | The audio codec | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| STREAMRECORDER_ERROR_NOT_SUPPORTED | The feature is not supported | 
| STREAMRECORDER_ERROR_INVALID_OPERATION | Invalid operation | 
| int streamrecorder_set_audio_encoder_bitrate | ( | streamrecorder_h | recorder, | 
| int | bitrate | ||
| ) | 
Sets the bitrate of an audio encoder.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | bitrate | The bitrate (for mms : 12200[bps], normal : 288000[bps]) | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| int streamrecorder_set_audio_samplerate | ( | streamrecorder_h | recorder, | 
| int | samplerate | ||
| ) | 
Sets the sampling rate of an audio stream.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | samplerate | The sample rate in Hertz | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| int streamrecorder_set_file_format | ( | streamrecorder_h | recorder, | 
| streamrecorder_file_format_e | format | ||
| ) | 
Sets the file format for recording media stream.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | format | The media file format | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| STREAMRECORDER_ERROR_INVALID_OPERATION | Invalid operation | 
| int streamrecorder_set_filename | ( | streamrecorder_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 streamrecorder | 
| [in] | path | The recording file path | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| int streamrecorder_set_recording_limit | ( | streamrecorder_h | recorder, | 
| streamrecorder_recording_limit_type_e | type, | ||
| int | limit | ||
| ) | 
Sets the maximum size of a recording file.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | type | The recording limit type | 
| [in] | limit | If limit type is STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE, the limit value is the maximum size of the recording file(KB),  otherwise limit value is the maximum time of the recording file (in seconds) 0 means unlimited recording size or time.  | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| int streamrecorder_set_video_encoder | ( | streamrecorder_h | recorder, | 
| streamrecorder_video_codec_e | codec | ||
| ) | 
Sets the video codec for encoding video stream.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | codec | The video codec | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| STREAMRECORDER_ERROR_NOT_SUPPORTED | The feature is not supported | 
| int streamrecorder_set_video_encoder_bitrate | ( | streamrecorder_h | recorder, | 
| int | bitrate | ||
| ) | 
Sets the bitrate of a video encoder.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | bitrate | The bitrate in bits per second | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| int streamrecorder_set_video_framerate | ( | streamrecorder_h | recorder, | 
| int | framerate | ||
| ) | 
Sets the recording frame rate.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | framerate | The frame rate for recording | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| int streamrecorder_set_video_resolution | ( | streamrecorder_h | recorder, | 
| int | width, | ||
| int | height | ||
| ) | 
Sets the resolution of the video recording.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | width | The input width | 
| [in] | height | The input height | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state | 
| STREAMRECORDER_ERROR_NOT_SUPPORTED | The feature is not supported | 
| int streamrecorder_set_video_source_format | ( | streamrecorder_h | recorder, | 
| streamrecorder_video_source_format_e | format | ||
| ) | 
Sets the video source format.
| [in] | recorder | The handle to the streamrecorder | 
| [in] | format | The color type of video source | 
0 on success, otherwise a negative error value | STREAMRECORDER_ERROR_NONE | Successful | 
| STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter | 
| STREAMRECORDER_ERROR_INVALID_STATE | Invalid state |