static int __set_callback(muse_player_event_e type, player_h player, void *callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
int set = 1;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(callback);
+
if (MUSE_PLAYER_EVENT_TYPE_BUFFERING == type) {
if (!_player_check_network_availability())
return PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE;
static int __unset_callback(muse_player_event_e type, player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
int set = 0;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGI("Event type : %d ", type);
PLAYER_NULL_ARG_CHECK(CALLBACK_INFO(pc));
int player_create(player_h *player)
{
- PLAYER_INSTANCE_CHECK(player);
-
int ret = PLAYER_ERROR_NONE;
int sock_fd = INVALID_DEFAULT_VALUE;
int pid = getpid();
int retry_count = CONNECTION_RETRY;
bool retry = false;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
pc = g_new0(player_cli_s, 1);
int player_destroy(player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_DESTROY;
player_cli_s *pc = (player_cli_s *)player;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int (*p_disp_destroy_evas_display)(void **) = NULL;
#endif
+
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER %p", pc);
/* clear cb and release mem */
int player_prepare_async(player_h player, player_prepared_cb callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PREPARE_ASYNC;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
if (pc->cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_PREPARE]) {
int player_prepare(player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PREPARE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER %p", pc);
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_unprepare(player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_UNPREPARE;
player_cli_s *pc = (player_cli_s *)player;
int (*p_disp_evas_display_retrieve_all_packets)(void *, bool) = NULL;
player_state_e state = PLAYER_STATE_NONE;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER %p", pc);
if (_get_current_state(pc, &state) != PLAYER_ERROR_NONE) {
int player_set_uri(player_h player, const char *uri)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(uri);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_URI;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
char path[MAX_URL_LEN] = {0, };
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(uri);
+
LOGD("ENTER");
if (_player_get_valid_path(uri, path) != PLAYER_ERROR_NONE)
int player_set_memory_buffer(player_h player, const void *data, int size)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(data);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEMORY_BUFFER;
player_cli_s *pc = (player_cli_s *)player;
tbm_bo_handle thandle;
tbm_fd tfd = INVALID_DEFAULT_VALUE;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(data);
+
LOGD("ENTER");
/* before setting mem buffer, player state have to be checked. */
int player_get_state(player_h player, player_state_e *pstate)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pstate);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pstate);
+
LOGD("ENTER");
ret = _get_current_state(pc, pstate);
int player_set_volume(player_h player, float left, float right)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(left >= 0 && left <= 1.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- PLAYER_CHECK_CONDITION(right >= 0 && right <= 1.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
- /* not support to set different value into each channel */
- PLAYER_CHECK_CONDITION(left == right, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_VOLUME;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(left, 0, 1.0);
+ PLAYER_RANGE_ARG_CHECK(right, 0, 1.0);
+
+ /* not support to set different value into each channel */
+ PLAYER_CHECK_CONDITION(left == right, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER %f", left);
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_get_volume(player_h player, float *left, float *right)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(left && right);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_VOLUME;
player_cli_s *pc = (player_cli_s *)player;
double volume = 0.0;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(left && right);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_set_sound_stream_info(player_h player, sound_stream_info_h stream_info)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SOUND_STREAM);
- PLAYER_INSTANCE_CHECK(player);
-
muse_player_api_e api = MUSE_PLAYER_API_SET_SOUND_STREAM_INFO;
player_cli_s *pc = (player_cli_s *)player;
bool is_available = false;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SOUND_STREAM);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(stream_info);
+
LOGD("ENTER");
/* check if stream_info is valid */
int player_set_audio_latency_mode(player_h player, audio_latency_mode_e latency_mode)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_LATENCY_MODE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(latency_mode, AUDIO_LATENCY_MODE_LOW, AUDIO_LATENCY_MODE_HIGH);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "latency_mode", (int)latency_mode);
int player_get_audio_latency_mode(player_h player, audio_latency_mode_e *platency_mode)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(platency_mode);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_LATENCY_MODE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int latency_mode = -1;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(platency_mode);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_start(player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_START;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER %p", pc);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int (*p_disp_set_evas_display_visible)(void *, bool) = NULL;
int player_stop(player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_STOP;
player_cli_s *pc = (player_cli_s *)player;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int (*p_disp_set_evas_display_visible)(void *, bool) = NULL;
#endif
+
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER %p", pc);
/* check player state */
int player_pause(player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PAUSE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER %p", pc);
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
static int _set_play_position(player_h player, int64_t pos, bool accurate, player_seek_completed_cb callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(pos >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_PLAY_POSITION;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(pos >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER %p", pc);
if (!pc->cb_info) {
int player_set_play_position(player_h player, int milliseconds, bool accurate, player_seek_completed_cb callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(milliseconds >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
int64_t pos = (int64_t)(milliseconds * G_GINT64_CONSTANT(1000000));
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(milliseconds >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
ret = _set_play_position(player, pos, accurate, callback, user_data);
int player_set_play_position_nsec(player_h player, int64_t nanoseconds, bool accurate, player_seek_completed_cb callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(nanoseconds >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
int64_t pos = nanoseconds;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(nanoseconds >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
ret = _set_play_position(player, pos, accurate, callback, user_data);
static int _get_play_position(player_h player, int64_t *pos)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pos);
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_PLAY_POSITION;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pos);
+
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
if (ret == PLAYER_ERROR_NONE) {
int player_get_play_position(player_h player, int *milliseconds)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(milliseconds);
-
int ret = PLAYER_ERROR_NONE;
int64_t pos = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(milliseconds);
+
/* LOGD("ENTER"); */
ret = _get_play_position(player, &pos);
int player_get_play_position_nsec(player_h player, int64_t *nanoseconds)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(nanoseconds);
-
int ret = PLAYER_ERROR_NONE;
int64_t pos = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(nanoseconds);
+
/* LOGD("ENTER"); */
ret = _get_play_position(player, &pos);
int player_set_mute(player_h player, bool muted)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_MUTE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int mute = (int)muted;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "mute", mute);
int player_is_muted(player_h player, bool *muted)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(muted);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_MUTED;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int mute = -1;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(muted);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_set_looping(player_h player, bool looping)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_LOOPING;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "looping", (int)looping);
int player_is_looping(player_h player, bool *plooping)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(plooping);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_LOOPING;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int looping = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(plooping);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
static int _get_duration(player_h player, int64_t *duration)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(duration);
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_DURATION;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(duration);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_get_duration(player_h player, int *milliseconds)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(milliseconds);
-
int ret = PLAYER_ERROR_NONE;
int64_t duration = 0; /* nsec */
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(milliseconds);
+
LOGD("ENTER");
ret = _get_duration(player, &duration);
int player_get_duration_nsec(player_h player, int64_t *nanoseconds)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(nanoseconds);
-
int ret = PLAYER_ERROR_NONE;
int64_t duration = 0; /* nsec */
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(nanoseconds);
+
LOGD("ENTER");
ret = _get_duration(player, &duration);
int _player_convert_display_type(player_display_type_e type, player_private_display_type_e *out_type)
{
int ret = PLAYER_ERROR_NONE;
+
PLAYER_NULL_ARG_CHECK(out_type);
switch (type) {
int player_set_display(player_h player, player_display_type_e type, player_display_h display)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY;
player_cli_s *pc = (player_cli_s *)player;
pid_t pid = getpid();
pid_t tid = syscall(SYS_gettid);
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
LOGD("Check if API is called in main thread. pid [%d], tid [%d]", pid, tid);
int player_set_display_mode(player_h player, player_display_mode_e mode)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(PLAYER_DISPLAY_MODE_LETTER_BOX <= mode && mode < PLAYER_DISPLAY_MODE_NUM, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_MODE;
player_cli_s *pc = (player_cli_s *)player;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int (*p_disp_set_evas_display_disp_mode)(void *, int) = NULL;
#endif
- LOGD("ENTER");
+
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(mode, PLAYER_DISPLAY_MODE_LETTER_BOX, PLAYER_DISPLAY_MODE_DST_ROI);
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
+ LOGD("ENTER");
+
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_evas_display_disp_mode, "disp_set_evas_display_disp_mode");
int player_get_display_mode(player_h player, player_display_mode_e *pmode)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pmode);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_DISPLAY_MODE;
player_cli_s *pc = (player_cli_s *)player;
int (*p_disp_get_evas_display_disp_mode)(void *, int *) = NULL;
#endif
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pmode);
+
LOGD("ENTER");
+
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int player_set_video_roi_area(player_h player, double x_scale, double y_scale,
double w_scale, double h_scale)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_VIDEO_ROI_AREA;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
+
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
PLAYER_CHECK_CONDITION(CALLBACK_INFO(pc) != NULL && EVAS_HANDLE(pc) == NULL,
PLAYER_ERROR_INVALID_OPERATION, "Display type is EVAS, video display interface is not supported");
int player_get_video_roi_area(player_h player, double *x_scale, double *y_scale,
double *w_scale, double *h_scale)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(x_scale && y_scale && w_scale && h_scale);
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_ROI_AREA;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
double scale_x = 0, scale_y = 0, scale_w = 0, scale_h = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(x_scale && y_scale && w_scale && h_scale);
+
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
if (ret == PLAYER_ERROR_NONE) {
int player_set_display_roi_area(player_h player, int x, int y, int width, int height)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(width > 0 && height > 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_ROI_AREA;
player_cli_s *pc = (player_cli_s *)player;
int (*p_disp_set_evas_display_roi_area)(void *, int, int, int, int) = NULL;
#endif
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(width > 0 && height > 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
int player_set_playback_rate(player_h player, float rate)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(rate >= -5.0 && rate <= 5.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_PLAYBACK_RATE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(rate, -5.0, 5.0);
+
LOGD("ENTER");
if (rate != 0) {
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_DOUBLE, "rate", (double)rate);
int player_set_display_rotation(player_h player, player_display_rotation_e rotation)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(PLAYER_DISPLAY_ROTATION_NONE <= rotation && rotation <= PLAYER_DISPLAY_ROTATION_270, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_ROTATION;
player_cli_s *pc = (player_cli_s *)player;
int (*p_disp_set_evas_display_rotation)(void *, int) = NULL;
#endif
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(rotation, PLAYER_DISPLAY_ROTATION_NONE, PLAYER_DISPLAY_ROTATION_270);
+
LOGD("ENTER");
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
int player_get_display_rotation(player_h player, player_display_rotation_e *protation)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(protation);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_DISPLAY_ROTATION;
int (*p_disp_get_evas_display_rotation)(void *, int *) = NULL;
#endif
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(protation);
+
LOGD("ENTER");
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
int player_set_display_visible(player_h player, bool visible)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_VISIBLE;
int (*p_disp_set_evas_display_visible)(void *, bool) = NULL;
#endif
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
int player_is_display_visible(player_h player, bool *pvisible)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pvisible);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_IS_DISPLAY_VISIBLE;
int (*p_disp_get_evas_display_visible)(void *, bool *) = NULL;
#endif
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pvisible);
+
LOGD("ENTER");
PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
int player_get_content_info(player_h player, player_content_info_e key, char **pvalue)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pvalue);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_CONTENT_INFO;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
char value[MUSE_MSG_MAX_LENGTH] = { 0, };
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pvalue);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "key", (int)key);
int player_get_codec_info(player_h player, char **paudio_codec, char **pvideo_codec)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(paudio_codec || pvideo_codec);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_CODEC_INFO;
player_cli_s *pc = (player_cli_s *)player;
char audio_codec[MUSE_MSG_MAX_LENGTH] = { 0, };
bool ret_val = TRUE;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(paudio_codec || pvideo_codec);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_get_audio_stream_info(player_h player, int *psample_rate, int *pchannel, int *pbit_rate)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(psample_rate || pchannel || pbit_rate);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_STREAM_INFO;
player_cli_s *pc = (player_cli_s *)player;
int channel = 0;
int bit_rate = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(psample_rate || pchannel || pbit_rate);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_get_video_stream_info(player_h player, int *pfps, int *pbit_rate)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pfps || pbit_rate);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_STREAM_INFO;
player_cli_s *pc = (player_cli_s *)player;
int fps = 0;
int bit_rate = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pfps || pbit_rate);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_get_video_size(player_h player, int *pwidth, int *pheight)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pwidth && pheight);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_SIZE;
player_cli_s *pc = (player_cli_s *)player;
int width = 0;
int height = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pwidth && pheight);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_get_album_art(player_h player, void **palbum_art, int *psize)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(palbum_art && psize);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_ALBUM_ART;
player_cli_s *pc = (player_cli_s *)player;
int key = INVALID_DEFAULT_VALUE;
void *jobj = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(palbum_art && psize);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_audio_effect_get_equalizer_bands_count(player_h player, int *pcount)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pcount);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int count;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pcount);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_audio_effect_set_equalizer_all_bands(player_h player, int *band_levels, int length)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(band_levels);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(band_levels);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_audio_effect_set_equalizer_band_level(player_h player, int index, int level)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_audio_effect_get_equalizer_band_level(player_h player, int index, int *plevel)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(plevel);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int level;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(plevel);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "index", index);
int player_audio_effect_get_equalizer_level_range(player_h player, int *pmin, int *pmax)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pmin && pmax);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int min = 0, max = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pmin && pmax);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_audio_effect_get_equalizer_band_frequency(player_h player, int index, int *pfrequency)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pfrequency);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int frequency;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pfrequency);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "index", index);
int player_audio_effect_get_equalizer_band_frequency_range(player_h player, int index, int *prange)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(prange);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int range;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(prange);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "index", index);
int player_audio_effect_equalizer_clear(player_h player)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_audio_effect_equalizer_is_available(player_h player, bool *pavailable)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pavailable);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int available;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pavailable);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_set_subtitle_path(player_h player, const char *path)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_PATH;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
char subtitle_path[MAX_URL_LEN] = {0, };
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
if (path && _player_get_valid_path(path, subtitle_path) != PLAYER_ERROR_NONE)
int player_set_subtitle_position_offset(player_h player, int milliseconds)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "milliseconds", milliseconds);
int player_capture_video(player_h player, player_video_captured_cb callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_CAPTURE_VIDEO;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(callback);
+
LOGD("ENTER");
if (pc->cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_CAPTURE]) {
LOGE("PLAYER_ERROR_VIDEO_CAPTURE_FAILED (0x%08x) : capturing...", PLAYER_ERROR_VIDEO_CAPTURE_FAILED);
int player_set_streaming_cookie(player_h player, const char *cookie, int size)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(cookie);
- PLAYER_CHECK_CONDITION(size >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_COOKIE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(cookie);
+ PLAYER_CHECK_CONDITION(size >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_set_streaming_user_agent(player_h player, const char *user_agent, int size)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(user_agent);
- PLAYER_CHECK_CONDITION(size >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_USER_AGENT;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(user_agent);
+ PLAYER_CHECK_CONDITION(size >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_get_streaming_download_progress(player_h player, int *start, int *end)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(start && end);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int start_pos = 0, end_pos = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(start && end);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_set_media_packet_audio_frame_decoded_cb(player_h player, media_format_h format,
player_audio_extract_option_e opt, player_media_packet_audio_decoded_cb callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_PACKET_AUDIO_FRAME_DECODED_CB;
int channel = 0;
int samplerate = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(callback);
+ PLAYER_RANGE_ARG_CHECK(opt, PLAYER_AUDIO_EXTRACT_DEFAULT, PLAYER_AUDIO_EXTRACT_NO_SYNC_AND_DEINTERLEAVE);
+
LOGD("ENTER");
if (format) {
return __unset_callback(MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED, player);
}
-int player_set_media_stream_buffer_status_cb(player_h player, player_stream_type_e stream_type, player_media_stream_buffer_status_cb callback, void *user_data)
+int player_set_media_stream_buffer_status_cb(player_h player,
+ player_stream_type_e stream_type, player_media_stream_buffer_status_cb callback, void *user_data)
{
+ muse_player_event_e type;
+
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
- muse_player_event_e type;
LOGD("ENTER");
int player_unset_media_stream_buffer_status_cb(player_h player, player_stream_type_e stream_type)
{
- PLAYER_INSTANCE_CHECK(player);
muse_player_event_e type;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
if (stream_type == PLAYER_STREAM_TYPE_VIDEO) {
return __unset_callback(type, player);
}
-int player_set_media_stream_seek_cb(player_h player, player_stream_type_e stream_type, player_media_stream_seek_cb callback, void *user_data)
+int player_set_media_stream_seek_cb(player_h player,
+ player_stream_type_e stream_type, player_media_stream_seek_cb callback, void *user_data)
{
+ muse_player_event_e type;
+
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
- muse_player_event_e type;
LOGD("ENTER");
int player_unset_media_stream_seek_cb(player_h player, player_stream_type_e stream_type)
{
- PLAYER_INSTANCE_CHECK(player);
muse_player_event_e type;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
if (stream_type == PLAYER_STREAM_TYPE_VIDEO) {
/* TODO Implement raw data socket channel */
int player_push_media_stream(player_h player, media_packet_h packet)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(packet);
int ret = PLAYER_ERROR_NONE;
int packet_ret = MEDIA_PACKET_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
char *codec_data = NULL;
unsigned int codec_data_size = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(packet);
+
LOGD("ENTER");
if(media_packet_get_buffer_data_ptr(packet, (void **)&buf) != MEDIA_PACKET_ERROR_NONE) {
int player_set_media_stream_info(player_h player, player_stream_type_e type, media_format_h format)
{
- PLAYER_INSTANCE_CHECK(player);
g_return_val_if_fail(format, PLAYER_ERROR_INVALID_OPERATION);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
int bit = 0;
int frame_rate = 0;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
media_format_ref(format);
int player_set_media_stream_buffer_max_size(player_h player, player_stream_type_e type, unsigned long long max_size)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(PLAYER_STREAM_TYPE_DEFAULT <= type && type <= PLAYER_STREAM_TYPE_TEXT, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- PLAYER_CHECK_CONDITION(max_size > 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(type, PLAYER_STREAM_TYPE_AUDIO, PLAYER_STREAM_TYPE_VIDEO);
+ PLAYER_CHECK_CONDITION(max_size > 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_get_media_stream_buffer_max_size(player_h player, player_stream_type_e type, unsigned long long *pmax_size)
{
int ret = PLAYER_ERROR_NONE;
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pmax_size);
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MAX_SIZE;
char *ret_buf = NULL;
unsigned long long max_size;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pmax_size);
+ PLAYER_RANGE_ARG_CHECK(type, PLAYER_STREAM_TYPE_AUDIO, PLAYER_STREAM_TYPE_VIDEO);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "type", type);
int player_set_media_stream_buffer_min_threshold(player_h player, player_stream_type_e type, unsigned int percent)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(PLAYER_STREAM_TYPE_DEFAULT <= type && type <= PLAYER_STREAM_TYPE_TEXT, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(type, PLAYER_STREAM_TYPE_DEFAULT, PLAYER_STREAM_TYPE_TEXT);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_get_media_stream_buffer_min_threshold(player_h player, player_stream_type_e type, unsigned int *ppercent)
{
int ret = PLAYER_ERROR_NONE;
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(ppercent);
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
char *ret_buf = NULL;
- uint percent;
+ unsigned int percent;
+
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(ppercent);
LOGD("ENTER");
int player_get_track_count(player_h player, player_stream_type_e type, int *pcount)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pcount);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_COUNT;
char *ret_buf = NULL;
int count;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pcount);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "type", type);
int player_get_current_track(player_h player, player_stream_type_e type, int *pindex)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pindex);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_CURRENT_TRACK;
char *ret_buf = NULL;
int index;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pindex);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "type", type);
int player_select_track(player_h player, player_stream_type_e type, int index)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SELECT_TRACK;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "type", type, MUSE_TYPE_INT, "index", index);
int player_get_track_language_code(player_h player, player_stream_type_e type, int index, char **pcode)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pcode);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_LANGUAGE_CODE;
char code[MUSE_MSG_MAX_LENGTH] = { 0, };
int code_len = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pcode);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "type", type, MUSE_TYPE_INT, "index", index);
int player_foreach_adaptive_variant(player_h player, player_adaptive_variant_cb callback, void *user_data)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_ADAPTIVE_VARIANT_INFO;
char *token = NULL;
char *ptr = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(callback);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_set_max_adaptive_variant_limit(player_h player, int bandwidth, int width, int height)
{
int ret = PLAYER_ERROR_NONE;
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(bandwidth >= -1 && width >= -1 && height >= -1,
- PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MAX_ADAPTIVE_VARIANT_LIMIT;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(bandwidth >= -1 && width >= -1 && height >= -1,
+ PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_get_max_adaptive_variant_limit(player_h player, int *pbandwidth, int *pwidth, int *pheight)
{
int ret = PLAYER_ERROR_NONE;
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(pbandwidth || pwidth || pheight);
-
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_GET_MAX_ADAPTIVE_VARIANT_LIMIT;
char *ret_buf = NULL;
int bandwidth = -1, width = -1, height = -1;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(pbandwidth || pwidth || pheight);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_set_audio_only(player_h player, bool audio_only)
{
int ret = PLAYER_ERROR_NONE;
- PLAYER_INSTANCE_CHECK(player);
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_ONLY;
char *ret_buf = NULL;
player_state_e state = PLAYER_STATE_NONE;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER audio_only: %d", audio_only);
/* check player state */
int player_is_audio_only(player_h player, bool *paudio_only)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(paudio_only);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_AUDIO_ONLY;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int audio_only = 0;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(paudio_only);
+
LOGD("ENTER");
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
{
#define MIN_BUFFER_TIME -1
int ret = PLAYER_ERROR_NONE;
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(prebuffer_ms >= MIN_BUFFER_TIME && rebuffer_ms >= MIN_BUFFER_TIME, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
player_cli_s *pc = (player_cli_s *)player;
muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_BUFFERING_TIME;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(prebuffer_ms >= MIN_BUFFER_TIME && rebuffer_ms >= MIN_BUFFER_TIME,
+ PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_get_streaming_buffering_time(player_h player, int *prebuffer_ms, int *rebuffer_ms)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(prebuffer_ms || rebuffer_ms);
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_STREAMING_BUFFERING_TIME;
player_cli_s *pc = (player_cli_s *)player;
int prebuffering_time = 0, rebuffering_time = 0;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(prebuffer_ms || rebuffer_ms);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_360_is_content_spherical(player_h player, bool *is_spherical)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(is_spherical);
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_IS_CONTENT_SPHERICAL;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = 0;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(is_spherical);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_360_set_enabled(player_h player, bool enabled)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ENABLED;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = (int)enabled;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER %d", enabled);
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "val", val);
int player_360_is_enabled(player_h player, bool *enabled)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(enabled);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_IS_ENABLED;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = 0;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(enabled);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_360_set_direction_of_view(player_h player, float yaw, float pitch)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(yaw >= (float)-M_PI && yaw <= (float)M_PI, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- PLAYER_CHECK_CONDITION(pitch >= (float)-M_PI / 2 && pitch <= (float)M_PI / 2, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_DIRECTION_OF_VIEW;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(yaw, (float)-M_PI, (float)M_PI);
+ PLAYER_RANGE_ARG_CHECK(pitch, ((float)-M_PI / 2), ((float)M_PI / 2));
+
LOGD("ENTER %f %f", yaw, pitch);
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_360_get_direction_of_view(player_h player, float *yaw, float *pitch)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(yaw && pitch);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_GET_DIRECTION_OF_VIEW;
player_cli_s *pc = (player_cli_s *)player;
double pitch_val = -1;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(yaw && pitch);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_360_set_zoom(player_h player, float level)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(level >= 1.0 && level <= 10.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ZOOM;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(level, 1.0, 10.0);
+
LOGD("ENTER %f", level);
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_DOUBLE, "level", (double)level);
int player_360_get_zoom(player_h player, float *level)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(level);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_GET_ZOOM;
player_cli_s *pc = (player_cli_s *)player;
double zoom = -1;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(level);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_360_set_field_of_view(player_h player, int horizontal_degrees, int vertical_degrees)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(horizontal_degrees >= 1 && horizontal_degrees <= 360, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- PLAYER_CHECK_CONDITION(vertical_degrees >= 1 && vertical_degrees <= 180, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_FIELD_OF_VIEW;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(horizontal_degrees, 1, 360);
+ PLAYER_RANGE_ARG_CHECK(vertical_degrees, 1, 180);
+
LOGD("ENTER %d %d", horizontal_degrees, vertical_degrees);
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_360_get_field_of_view(player_h player, int *horizontal_degrees, int *vertical_degrees)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(horizontal_degrees && vertical_degrees);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_GET_FIELD_OF_VIEW;
player_cli_s *pc = (player_cli_s *)player;
int v_val = -1;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(horizontal_degrees && vertical_degrees);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_360_set_zoom_with_field_of_view(player_h player, float level, int horizontal_degrees, int vertical_degrees)
{
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
- PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
-
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(horizontal_degrees >= 1 && horizontal_degrees <= 360, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- PLAYER_CHECK_CONDITION(vertical_degrees >= 1 && vertical_degrees <= 180, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- PLAYER_CHECK_CONDITION(level >= 1.0 && level <= 10.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ZOOM_WITH_FIELD_OF_VIEW;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(horizontal_degrees, 1, 360);
+ PLAYER_RANGE_ARG_CHECK(vertical_degrees, 1, 180);
+ PLAYER_RANGE_ARG_CHECK(level, 1.0, 10.0);
+
LOGD("ENTER %f %d %d", level, horizontal_degrees, vertical_degrees);
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
int player_set_replaygain_enabled(player_h player, bool enabled)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_REPLAYGAIN_ENABLED;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = (int)enabled;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "val", val);
int player_is_replaygain_enabled(player_h player, bool *enabled)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(enabled);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_REPLAYGAIN_ENABLED;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = -1;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(enabled);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_audio_pitch_set_enabled(player_h player, bool enabled)
{
- PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PITCH_SET_ENABLED;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = (int)enabled;
+ PLAYER_INSTANCE_CHECK(player);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "val", val);
int player_audio_pitch_is_enabled(player_h player, bool *enabled)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(enabled);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PITCH_IS_ENABLED;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = -1;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(enabled);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
int player_audio_pitch_set_value(player_h player, float value)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_CHECK_CONDITION(value >= 0.5 && value <= 2.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
-
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PITCH_SET_VALUE;
player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(value, 0.5, 2.0);
+
LOGD("ENTER %1.3f", value);
PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_DOUBLE, "pitch", (double)value);
int player_audio_pitch_get_value(player_h player, float *value)
{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(value);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PITCH_GET_VALUE;
player_cli_s *pc = (player_cli_s *)player;
double pitch = 0.0;
char *ret_buf = NULL;
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(value);
+
LOGD("ENTER");
PLAYER_SEND_MSG(api, pc, ret_buf, ret);