LOGD("LEAVE");
return ret;
}
+
+int player_set_audio_offload_enabled(player_h player, bool enabled)
+{
+ PLAYER_INSTANCE_CHECK(player);
+ int ret = PLAYER_ERROR_NONE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_OFFLOAD_ENABLED;
+ player_cli_s *pc = (player_cli_s *)player;
+ char *ret_buf = NULL;
+ int val = (int)enabled;
+
+ LOGD("ENTER");
+
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "val", val);
+ g_free(ret_buf);
+ return ret;
+}
+
+int player_is_audio_offload_enabled(player_h player, bool *enabled)
+{
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(enabled);
+ int ret = PLAYER_ERROR_NONE;
+ muse_player_api_e api = MUSE_PLAYER_API_IS_AUDIO_OFFLOAD_ENABLED;
+ player_cli_s *pc = (player_cli_s *)player;
+ char *ret_buf = NULL;
+ int val = -1;
+
+ LOGD("ENTER");
+
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret);
+ if (ret == PLAYER_ERROR_NONE) {
+ player_msg_get(val, ret_buf);
+ *enabled = (bool)val;
+ }
+
+ g_free(ret_buf);
+ return ret;
+}
TIZEN_PROFILE_COMMON = 0x10,
} tizen_profile_t;
+extern int player_set_audio_offload_enabled(player_h player, bool enabled);
+extern int player_is_audio_offload_enabled(player_h player, bool *enabled);
+
#ifdef USE_EVENT_HANDLER
static void event_handler_cb(enum libinput_event_type ev_t, int x, int y, void *data, float e[3]);
static void event_handler_set_dov_fov();
CURRENT_STATUS_AUDIO_CODEC_TYPE,
CURRENT_STATUS_VIDEO_CODEC_TYPE,
CURRENT_STATUS_REPLAYGAIN_ENABLE,
+ CURRENT_STATUS_AUDIO_OFFLOAD,
};
#define MAX_HANDLE 20
g_print(" ==> [Player_Test] replaygain = %d\n", *enable);
}
+static void set_audio_offload_enabled(bool enabled)
+{
+ bool is_enabled = false;
+
+ player_is_audio_offload_enabled(g_player[0], &is_enabled);
+ g_print("[Player_Test] offload setting %d -> %d\n", is_enabled, enabled);
+
+ if (player_set_audio_offload_enabled(g_player[0], enabled) != PLAYER_ERROR_NONE)
+ g_print("failed to set audio offload\n");
+}
+
#ifdef USE_EVENT_HANDLER
static void event_handler_cb(enum libinput_event_type ev_t, int x, int y, void *data, float e[3])
{
g_menu_state = CURRENT_STATUS_VIDEO360_SET_ZOOM;
} else if (strncmp(cmd, "lb", 2) == 0) {
get_buffering_position();
+ } else if (strncmp(cmd, "ol", 2) == 0) {
+ g_menu_state = CURRENT_STATUS_AUDIO_OFFLOAD;
} else {
g_print("unknown menu \n");
}
g_print("szz. Set Zoom with FOV\n");
g_print("[Replaygain] rgs. Set Replaygain\t\t");
g_print("rgg. Get replaygain\n");
+ g_print("[Offload] ol. Set audio offload\n");
g_print("[etc] sp. Set Progressive Download\t");
g_print("gp. Get Progressive Download status\t");
g_print("mp. memory playback\n");
g_print("*** set video codec type (1: HW, 2: SW) \n");
} else if (g_menu_state == CURRENT_STATUS_REPLAYGAIN_ENABLE) {
g_print("*** input replaygain value.(0:disable, 1: enable) \n");
+ } else if (g_menu_state == CURRENT_STATUS_AUDIO_OFFLOAD) {
+ g_print("*** input audio offload value.(0:disable, 1: enable) \n");
} else {
g_print("*** unknown status.\n");
quit_program();
reset_menu_state();
}
break;
+ case CURRENT_STATUS_AUDIO_OFFLOAD:
+ {
+ value1 = atoi(cmd);
+ set_audio_offload_enabled(value1);
+ reset_menu_state();
+ }
+ break;
}
g_timeout_add(100, timeout_menu_display, 0);