* @since_tizen 2.3
* @remarks The default sound type of the player is #SOUND_TYPE_MEDIA.
* To get the current sound type, use sound_manager_get_current_sound_type().
+ * @remarks If stream_info already exists by calling sound_manager_create_stream_info(),
+ * It will return error since 3.0.
*
* @param[in] player The handle to the media player
* @param[in] type The sound type
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error
* @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create().
* @see sound_manager_get_current_sound_type()
*/
* @since_tizen 2.3.1
* @remarks The default sound type of the player is #SOUND_TYPE_MEDIA.
* To get the current sound type, use sound_manager_get_current_sound_type().
+ * @remarks If stream_info already exists by calling player_set_audio_policy_info(),
+ * It will return error.
*
* @param[in] player The handle to the media player
* @param[in] type The sound type
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error
* @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create().
* @see sound_manager_get_current_sound_type()
*/
PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE);
+ bool sig_value = false;
+
+ /* check if focus is released */
+ mm_sound_get_signal_value(MM_SOUND_SIGNAL_RELEASE_INTERNAL_FOCUS, &sig_value);
+ if(sig_value)
+ return PLAYER_ERROR_SOUND_POLICY;
+
LOGI("[%s] sound type = %d", __FUNCTION__, type);
int ret = mm_player_set_attribute(handle->mm_handle, NULL, "sound_volume_type", type, (char *)NULL);
#include <Ecore.h>
#include <Ecore_Wayland.h>
#endif
-/* #define _USE_X_DIRECT_ */
-#ifdef _USE_X_DIRECT_
-#include <X11/Xlib.h>
-#endif
#define PACKAGE "player_test"
#define MAX_STRING_LEN 2048
#define MMTS_SAMPLELIST_INI_DEFAULT_PATH "/opt/etc/mmts_filelist.ini"
int w = 0;
int h = 0;
- printf("[%s][%d] name=%s\n", __func__, __LINE__, name);
+ g_print("[%s][%d] name=%s\n", __func__, __LINE__, name);
eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
if (eo) {
elm_win_borderless_set(eo, EINA_TRUE);
evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
elm_win_screen_size_get(eo, NULL, NULL, &w, &h);
- printf("window size :%d,%d", w, h);
+ g_print("window size :%d,%d", w, h);
evas_object_resize(eo, w, h);
elm_win_autodel_set(eo, EINA_TRUE);
#ifdef HAVE_WAYLAND