return PLAYER_ERROR_INVALID_STATE;
player_msg_send(api, pc, ret_buf, ret);
- if (ret == PLAYER_ERROR_NONE) {
- set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_SEEK);
- set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_PREPARE);
- _player_release_internal_memory(pc);
- }
+
+ set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_SEEK);
+ set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_PREPARE);
+ _player_release_internal_memory(pc);
pc->cb_info->video_frame_pool_size = 0;
__player_remove_tsurf_list(pc);
g_free(ret_buf);
+
+ LOGD("LEAVE 0x%X", ret);
return ret;
}
CURRENT_STATUS_NEXT_URI,
CURRENT_STATUS_GAPLESS,
CURRENT_STATUS_GET_TRACK_INFO,
+ CURRENT_STATUS_POSITION_ACCURATE,
};
+typedef struct {
+ int pos;
+ bool accurate;
+} player_seek_pos_t;
+
#define MAX_HANDLE 20
/* for video display */
static appdata ad;
static player_h g_player[MAX_HANDLE] = { 0, };
-
+static player_seek_pos_t seek_info = {0};
int g_handle_num = 1;
int g_menu_state = CURRENT_STATUS_MAINMENU;
gboolean quit_pushing;
g_print(" ==> [Player_Test] player_get_play_position()%d return : %d\n", ret, position);
}
-static void set_position(int position)
+static void set_position(int position, bool accurate)
{
- if (player_set_play_position(g_player[0], position, TRUE, seek_completed_cb, g_player[0]) != PLAYER_ERROR_NONE)
+ if (player_set_play_position(g_player[0], position, accurate, seek_completed_cb, g_player[0]) != PLAYER_ERROR_NONE)
g_print("failed to set position\n");
}
g_print("*** input mute value.(0: Not Mute, 1: Mute) \n");
} else if (g_menu_state == CURRENT_STATUS_POSITION_TIME) {
g_print("*** input position value(msec)\n");
+ } else if (g_menu_state == CURRENT_STATUS_POSITION_ACCURATE) {
+ g_print("*** input accurate value(0/1)\n");
} else if (g_menu_state == CURRENT_STATUS_LOOPING) {
g_print("*** input looping value.(0: Not Looping, 1: Looping) \n");
} else if (g_menu_state == CURRENT_STATUS_DISPLAY_SURFACE_CHANGE) {
break;
case CURRENT_STATUS_POSITION_TIME:
{
- long position = atol(cmd);
- set_position(position);
+ seek_info.pos = atoi(cmd);
+ g_menu_state = CURRENT_STATUS_POSITION_ACCURATE;
+ }
+ break;
+ case CURRENT_STATUS_POSITION_ACCURATE:
+ {
+ seek_info.accurate = (atoi(cmd) != 0) ? (true) : (false);
+ set_position(seek_info.pos, seek_info.accurate);
reset_menu_state();
}
break;