* @brief Create and send message. Does not wait server result.
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
- * @param[in] player The server side handle of media player.
* @param[in] fd socket fd
- * @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
- * @param[in] param the name of param is key, must be local variable. never be pointer.
+ * @param[in] type1 The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
+ * @param[in] param1 the name of param is key, must be local variable. never be pointer.
+ * @param[in] type2 The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
+ * @param[in] param2 the name of param is key, must be local variable. never be pointer.
*/
#define player_msg_create_handle(api, fd, type1, param1, type2, param2) \
do { \
Name: capi-media-player
Summary: A Media Player API
-Version: 0.3.56
+Version: 0.3.57
Release: 0
Group: Multimedia/API
License: Apache-2.0
if (!CALLBACK_INFO(pc))
return PLAYER_ERROR_INVALID_STATE;
-#ifdef TIZEN_FEATURE_EVAS_RENDERER
- if (EVAS_HANDLE(pc)) {
- player_unset_media_packet_video_frame_decoded_cb(player);
- if (mm_evas_renderer_destroy(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
- LOGW("fail to unset evas client");
- __player_unset_retrieve_buffer_cb(player);
- }
-#endif
+
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);
if (EVAS_HANDLE(pc)) {
LOGW("evas client already exists");
+ if (CALLBACK_INFO(pc))
+ player_unset_media_packet_video_frame_decoded_cb(player);
if (mm_evas_renderer_destroy(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
LOGW("fail to unset evas client");
+ __player_unset_retrieve_buffer_cb(player);
+ g_free(pc->cb_info->evas_info);
/* need to set display information again to new handle */
EVAS_INFO(pc)->update_needed = TRUE;
}
+
if (mm_evas_renderer_create(&EVAS_HANDLE(pc), obj) != MM_ERROR_NONE) {
LOGW("fail to set evas client");
return PLAYER_ERROR_INVALID_OPERATION;
player_set_subtitle_updated_cb(g_player[0], subtitle_updated_cb, (void *)g_player[0]);
}
if (g_current_surface_type == -1) {
- player_set_display(g_player[0], PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(selected_win_id));
- g_current_surface_type = PLAYER_DISPLAY_TYPE_OVERLAY;
+ g_print("You must set display surface type before setting prepare.\n");
+ return;
}
if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
}
}
}
- /* attention! surface(evas) -> unprepare -> surface(evas) : evas object will disappear. */
- reset_display();
- g_current_surface_type = -1;
+
memset(g_subtitle_uri, 0, sizeof(g_subtitle_uri));
player_state_e state;
if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
int i = 0;
if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
- player_unprepare(g_player[0]);
- for (i = 0; i < g_handle_num; i++) {
- player_destroy(g_player[i]);
- g_player[i] = 0;
- }
+ player_destroy(g_player[0]);
+ g_player[0] = 0;
} else {
for (i = 0; i < g_handle_num; i++) {
if (g_player[i] != NULL) {
void quit_program()
{
- int i = 0;
if (g_pcm_fd)
fclose(g_pcm_fd);
- for (i = 0; i < g_handle_num; i++) {
- if (g_player[i] != NULL) {
- player_unprepare(g_player[i]);
- player_destroy(g_player[i]);
- g_player[i] = 0;
- }
+ if (g_player[0] != NULL || g_player[1] != NULL) {
+ _player_unprepare();
+ _player_destroy();
}
+
elm_exit();
if (g_audio_fmt)
} else if (len == 2) {
if (strncmp(cmd, "pr", 2) == 0) {
/* sync */
- _player_prepare(FALSE);
+ if (g_current_surface_type == -1) {
+ g_print("You must set display surface type before setting prepare. please 'pr' after setting display surface type.\n");
+ g_menu_state = CURRENT_STATUS_DISPLAY_SURFACE_CHANGE;
+ } else
+ _player_prepare(FALSE);
} else if (strncmp(cmd, "pa", 2) == 0) {
/* async */
+ if (g_current_surface_type == -1) {
+ g_print("You must set display surface type before setting prepare. please 'pr' after setting display surface type.\n");
+ g_menu_state = CURRENT_STATUS_DISPLAY_SURFACE_CHANGE;
+ } else
_player_prepare(TRUE);
} else if (strncmp(cmd, "un", 2) == 0) {
_player_unprepare();