Merge changes I6a7a55f2,I5d502d31 into tizen_3.0
authorJaeKyung Lee <jk79.lee@samsung.com>
Mon, 13 Jun 2016 00:53:49 +0000 (17:53 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 13 Jun 2016 00:53:49 +0000 (17:53 -0700)
* changes:
  [UTC][player][Non-ACR][add TCs for setting audio_policy]
  [UTC][player][ACR-481][add test negative case for PLAYER_ERROR_SOUND_POLICY]

1  2 
src/utc/player/utc-media-player.c

index 7f009d6,6d87f04..56b9d2f
mode 100755,100644..100755
@@@ -72,6 -70,49 +73,28 @@@ static void wait_for_async(
      g_main_context_unref(context);
  }
  
 -static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
 -{
 -    unsigned int size_of_path = 0;
 -
 -    if (type == STORAGE_TYPE_INTERNAL) {
 -        size_of_path = strlen(path) + strlen(audio) + 6;
 -        audio_path = (char*)malloc(size_of_path);
 -        snprintf(audio_path, size_of_path, "%s/res/%s", path, audio);
 -
 -        size_of_path = strlen(path) + strlen(media) + 6;
 -        media_path = (char*)malloc(size_of_path);
 -        snprintf(media_path, size_of_path, "%s/res/%s", path, media);
 -
 -        size_of_path = strlen(path) + strlen(subtitle) + 6;
 -        subtitle_path = (char*)malloc(size_of_path);
 -        snprintf(subtitle_path, size_of_path, "%s/res/%s", path, subtitle);
 -
 -        return false;
 -    }
 -    return true;
 -}
+ void focus_cb(sound_stream_info_h stream_info, sound_stream_focus_change_reason_e reason, const char *extra_info, void *user_data)
+ {
+   g_print("FOCUS callback is called, reason(%d), extra_info(%s), userdata(%p)", reason, extra_info, user_data);
+   return;
+ }
+ static void set_sound_stream_info()
+ {
+   sound_device_list_h device_list = NULL;
+   int ret = SOUND_MANAGER_ERROR_NONE;
+   if (g_stream_info_h) {
+     g_print("stream information is already set, please destory handle and try again\n");
+     return;
+   }
+   if (sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, focus_cb, player, &g_stream_info_h)) {
+     g_print("failed to create stream_information()\n");
+     return;
+   }
+   return;
+ }
  
  /**
   * @function          utc_media_player_startup