Tizen Native API  7.0

It provides capability information of the media recorder.

Required Header

#include <recorder.h>

Overview

The Capability API allows you to retrieve the recorder capabilities mentioned below:

  • Supported file formats
  • Supported audio and video encoders

To get all supported file formats, call recorder_foreach_supported_file_format(). This function will internally invoke recorder_supported_file_format_cb() for each file format.

Related Features

This API is related with the following features:

  • http://tizen.org/feature/media.audio_recording
  • http://tizen.org/feature/media.video_recording

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_foreach_supported_file_format (recorder_h recorder, recorder_supported_file_format_cb callback, void *user_data)
 Retrieves all supported file formats by invoking a specific callback for each supported file format.
int recorder_foreach_supported_audio_encoder (recorder_h recorder, recorder_supported_audio_encoder_cb callback, void *user_data)
 Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder.
int recorder_foreach_supported_video_resolution (recorder_h recorder, recorder_supported_video_resolution_cb foreach_cb, void *user_data)
 Retrieves all supported video resolutions by invoking callback function once for each supported video resolution.
int recorder_foreach_supported_video_encoder (recorder_h recorder, recorder_supported_video_encoder_cb callback, void *user_data)
 Retrieves all supported video encoders by invoking a specific callback for each supported video encoder.

Typedefs

typedef bool(* recorder_supported_file_format_cb )(recorder_file_format_e format, void *user_data)
 Called iteratively to notify about the supported file formats.
typedef bool(* recorder_supported_audio_encoder_cb )(recorder_audio_codec_e codec, void *user_data)
 Called iteratively to notify about the supported audio encoders.
typedef bool(* recorder_supported_video_encoder_cb )(recorder_video_codec_e codec, void *user_data)
 Called iteratively to notify about the supported video encoders.

Typedef Documentation

typedef bool(* recorder_supported_audio_encoder_cb)(recorder_audio_codec_e codec, void *user_data)

Called iteratively to notify about the supported audio encoders.

Since :
2.3.1
Parameters:
[in]codecThe codec of audio encoder
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
recorder_foreach_supported_audio_encoder() will invoke this callback.
See also:
recorder_foreach_supported_audio_encoder()
typedef bool(* recorder_supported_file_format_cb)(recorder_file_format_e format, void *user_data)

Called iteratively to notify about the supported file formats.

Since :
2.3.1
Parameters:
[in]formatThe format of recording files
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
recorder_foreach_supported_file_format() will invoke this callback.
See also:
recorder_foreach_supported_file_format()
typedef bool(* recorder_supported_video_encoder_cb)(recorder_video_codec_e codec, void *user_data)

Called iteratively to notify about the supported video encoders.

Since :
2.3.1
Parameters:
[in]codecThe codec of video encoder
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
recorder_foreach_supported_video_encoder() will invoke this callback.
See also:
recorder_foreach_supported_video_encoder()

Function Documentation

int recorder_foreach_supported_audio_encoder ( recorder_h  recorder,
recorder_supported_audio_encoder_cb  callback,
void *  user_data 
)

Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder.

Since :
2.3.1
Parameters:
[in]recorderThe handle to the media recorder
[in]callbackThe iteration callback
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
RECORDER_ERROR_NONESuccessful
RECORDER_ERROR_INVALID_PARAMETERInvalid parameter
RECORDER_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
RECORDER_ERROR_NOT_SUPPORTEDThe feature is not supported
RECORDER_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
Postcondition:
recorder_supported_audio_encoder_cb() will be invoked.
See also:
recorder_set_audio_encoder()
recorder_get_audio_encoder()
recorder_supported_audio_encoder_cb()
int recorder_foreach_supported_file_format ( recorder_h  recorder,
recorder_supported_file_format_cb  callback,
void *  user_data 
)

Retrieves all supported file formats by invoking a specific callback for each supported file format.

Since :
2.3.1
Parameters:
[in]recorderThe handle to the media recorder
[in]callbackThe iteration callback
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
RECORDER_ERROR_NONESuccessful
RECORDER_ERROR_INVALID_PARAMETERInvalid parameter
RECORDER_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
RECORDER_ERROR_NOT_SUPPORTEDThe feature is not supported
RECORDER_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
Postcondition:
recorder_supported_file_format_cb() will be invoked.
See also:
recorder_get_file_format()
recorder_set_file_format()
recorder_supported_file_format_cb()
int recorder_foreach_supported_video_encoder ( recorder_h  recorder,
recorder_supported_video_encoder_cb  callback,
void *  user_data 
)

Retrieves all supported video encoders by invoking a specific callback for each supported video encoder.

Since :
2.3.1
Parameters:
[in]recorderThe handle to the media recorder
[in]callbackThe iteration callback
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
RECORDER_ERROR_NONESuccessful
RECORDER_ERROR_INVALID_PARAMETERInvalid parameter
RECORDER_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
RECORDER_ERROR_NOT_SUPPORTEDThe feature is not supported
RECORDER_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
Postcondition:
recorder_supported_video_encoder_cb() will be invoked.
See also:
recorder_set_video_encoder()
recorder_get_video_encoder()
recorder_supported_video_encoder_cb()

Retrieves all supported video resolutions by invoking callback function once for each supported video resolution.

Since :
2.3.1
Parameters:
[in]recorderThe handle to the media recorder
[in]foreach_cbThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
RECORDER_ERROR_NONESuccessful
RECORDER_ERROR_INVALID_PARAMETERInvalid parameter
RECORDER_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
RECORDER_ERROR_NOT_SUPPORTEDThe feature is not supported
RECORDER_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
Postcondition:
This function invokes recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution.
See also:
recorder_set_video_resolution()
recorder_get_video_resolution()
recorder_supported_video_resolution_cb()