Tizen Native API
4.0
|
The Callback API Callbacks from the StreamRecorder frameworks.
#include <streamrecorder.h>
The StreamRecorder Callback API provides functions status.
Functions | |
int | streamrecorder_set_notify_cb (streamrecorder_h recorder, streamrecorder_notify_cb callback, void *user_data) |
Registers the callback function that will be invoked when the streamrecorder get some notification. | |
int | streamrecorder_unset_notify_cb (streamrecorder_h recorder) |
Unregisters the callback function. | |
int | streamrecorder_set_recording_status_cb (streamrecorder_h recorder, streamrecorder_recording_status_cb callback, void *user_data) |
Registers a callback function to be invoked when the recording information changes. | |
int | streamrecorder_unset_recording_status_cb (streamrecorder_h recorder) |
Unregisters the callback function. | |
int | streamrecorder_set_recording_limit_reached_cb (streamrecorder_h recorder, streamrecorder_recording_limit_reached_cb callback, void *user_data) |
Registers the callback function to be run when reached the recording limit. | |
int | streamrecorder_unset_recording_limit_reached_cb (streamrecorder_h recorder) |
Unregisters the callback function. | |
int | streamrecorder_set_error_cb (streamrecorder_h recorder, streamrecorder_error_cb callback, void *user_data) |
Registers a callback function to be called when an asynchronous operation error occurred. | |
int | streamrecorder_unset_error_cb (streamrecorder_h recorder) |
Unregisters the callback function. | |
int | streamrecorder_set_buffer_consume_completed_cb (streamrecorder_h recorder, streamrecorder_consume_completed_cb callback, void *user_data) |
Registers a callback function to be called when asynchronous buffers are consumed. | |
int | streamrecorder_unset_buffer_consume_completed_cb (streamrecorder_h recorder) |
Unregisters the callback function. | |
Typedefs | |
typedef void(* | streamrecorder_recording_limit_reached_cb )(streamrecorder_recording_limit_type_e type, void *user_data) |
Called when limitation error occurs while recording. | |
typedef void(* | streamrecorder_recording_status_cb )(unsigned long long elapsed_time, unsigned long long file_size, void *user_data) |
Called to indicate the recording status. | |
typedef void(* | streamrecorder_notify_cb )(streamrecorder_state_e previous, streamrecorder_state_e current, streamrecorder_notify_e notification, void *user_data) |
Called when the streamrecorder gets some notifications. | |
typedef void(* | streamrecorder_error_cb )(streamrecorder_error_e error, streamrecorder_state_e current_state, void *user_data) |
Called when the error occurred. | |
typedef void(* | streamrecorder_consume_completed_cb )(void *buffer, void *user_data) |
Called iteratively to notify about the buffer has been consumed. |
typedef void(* streamrecorder_consume_completed_cb)(void *buffer, void *user_data) |
Called iteratively to notify about the buffer has been consumed.
[in] | buffer | The consumed buffer that user pushed |
[in] | user_data | The user data passed |
typedef void(* streamrecorder_error_cb)(streamrecorder_error_e error, streamrecorder_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 streamrecorder |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* streamrecorder_notify_cb)(streamrecorder_state_e previous, streamrecorder_state_e current, streamrecorder_notify_e notification, void *user_data) |
Called when the streamrecorder gets some notifications.
[in] | previous | The previous state of the streamrecorder |
[in] | current | The current state of the streamrecorder |
[in] | notification | The notification type of the streamrecorder |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* streamrecorder_recording_limit_reached_cb)(streamrecorder_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 and size.
[in] | type | The imitation type |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* streamrecorder_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 |
int streamrecorder_set_buffer_consume_completed_cb | ( | streamrecorder_h | recorder, |
streamrecorder_consume_completed_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be called when asynchronous buffers are consumed.
[in] | recorder | The handle to the streamrecorder |
[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 STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_set_error_cb | ( | streamrecorder_h | recorder, |
streamrecorder_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 streamrecorder |
[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 STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_set_notify_cb | ( | streamrecorder_h | recorder, |
streamrecorder_notify_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback function that will be invoked when the streamrecorder get some notification.
[in] | recorder | The handle to the streamrecorder |
[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 STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_set_recording_limit_reached_cb | ( | streamrecorder_h | recorder, |
streamrecorder_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 streamrecorder |
[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 STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_set_recording_status_cb | ( | streamrecorder_h | recorder, |
streamrecorder_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 streamrecorder |
[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 STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_unset_buffer_consume_completed_cb | ( | streamrecorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the streamrecorder |
on
success, otherwise a negative error value STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_unset_error_cb | ( | streamrecorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the streamrecorder |
on
success, otherwise a negative error value STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_unset_notify_cb | ( | streamrecorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the streamrecorder |
0
on success, otherwise a negative error value STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_unset_recording_limit_reached_cb | ( | streamrecorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the streamrecorder |
0
on success, otherwise a negative error value STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |
int streamrecorder_unset_recording_status_cb | ( | streamrecorder_h | recorder | ) |
Unregisters the callback function.
[in] | recorder | The handle to the streamrecorder |
0
on success, otherwise a negative error value STREAMRECORDER_ERROR_NONE | Successful |
STREAMRECORDER_ERROR_INVALID_PARAMETER | Invalid parameter |