}
-static bool __mp_get_supported_storage_cb();
-
void
_mp_app_storage_state_changed_cb(int storage_id, storage_state_e state, void *user_data)
{
}
-static void mp_app_now_playing_id_changed_cb(void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path)
-{
- startfunc;
-
- struct appdata *ad = data;
- MP_CHECK(ad);
-
- int playing_pid = mp_setting_get_nowplaying_id();
- ERROR_TRACE("wishjox playing_pid:%d", playing_pid);
-#ifndef MP_SOUND_PLAYER
- if (!playing_pid) {
- if (ad->player_state == PLAY_STATE_PAUSED) {
- DEBUG_TRACE("sound-player terminated.. show minicontroller");
-
- if (!ad->win_minicon) {
- mp_minicontroller_create(ad);
- }
- if (ad->win_minicon) {
- mp_minicontroller_show(ad);
- }
-#ifdef MP_FEATURE_LOCKSCREEN
- if (!ad->win_lockmini) {
- mp_lockscreenmini_create(ad);
- }
- if (ad->win_lockmini) {
- mp_lockscreenmini_show(ad);
- }
-#endif
- mp_setting_save_playing_info(ad);
- }
- } else
-#endif
- if (playing_pid != getpid()) {
- DEBUG_TRACE("other player activated : [pid:%d]", playing_pid);
- if (ad->player_state == PLAY_STATE_PLAYING) {
- ad->paused_by_other_player = TRUE;
- mp_play_control_play_pause(ad, false);
- }
-/*
- mp_minicontroller_destroy(ad);
-#ifdef MP_FEATURE_LOCKSCREEN
- mp_lockscreenmini_destroy(ad);
-#endif
-*/
- }
-
-}
-
bool mp_app_get_supported_storages_callback(int storageId, storage_type_e type, storage_state_e state, const char *path, void *userData)
{
if (type == STORAGE_TYPE_EXTERNAL) {
res = FALSE;
}
- char *path = app_get_data_path();
- char now_playing_id[1024] = {0};
-
- snprintf(now_playing_id, 1024, "%s%s", path, MP_NOW_PLAYING_ID_INI);
- free(path);
- ecore_file_monitor_add(now_playing_id, mp_app_now_playing_id_changed_cb, ad);
-
if (storage_set_state_changed_cb(ad->mmc_id, _mp_app_storage_state_changed_cb, ad) < 0) {
ERROR_TRACE("Fail to register storage state changed callback");
res = FALSE;
{
struct appdata *ad = (struct appdata *)data;
int retcode = -1;
- // TEMP_BLOCK
- //sound_manager_unset_available_route_changed_cb();
- //sound_manager_unset_active_device_changed_cb();
-
- //mp_media_info_unset_db_update_cb();
retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE);
if (retcode != SYSTEM_SETTINGS_ERROR_NONE) {
ERROR_TRACE("Error when ignore callback [%d]", retcode);
ERROR_TRACE("Error when ignore callback");
return FALSE;
}
- //mp_file_monitor_del(ECORE_FILE_MONITOR_TYPE_INOTIFY);
if (gNotiPipe) {
ecore_pipe_del(gNotiPipe);
if (state_for_playback == SOUND_STREAM_FOCUS_STATE_RELEASED) {
mp_player_mgr_pause(ad);
+ int current_pid = mp_setting_get_nowplaying_id();
+ if (current_pid && current_pid != getpid()) {
+ DEBUG_TRACE("Some other player playing currently");
+ if (ad->win_minicon) {
+ mp_minicontroller_destroy(ad);
+ }
+ if (ad->win_lockmini) {
+ mp_lockscreenmini_destroy(ad);
+ }
+ }
+
sound_manager_get_focus_reacquisition(ad->stream_info, &reacquire_state);
DEBUG_TRACE("reason for change is %d", reason_for_change);
if (reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_ALARM &&