CURRENT_STATUS_STREAMING_PLAYBACK_RATE,
CURRENT_STATUS_SWITCH_SUBTITLE,
CURRENT_STATUS_NEXT_URI,
+ CURRENT_STATUS_GAPLESS,
};
#define MAX_HANDLE 20
static void set_next_uri(char * uri)
{
#ifndef TIZEN_TV
- player_set_gapless(g_player[0], TRUE);
if (player_set_next_uri(g_player[0], uri) != PLAYER_ERROR_NONE)
g_print("fail to set next uri");
#else
g_print(" ==> [Player_Test] Width: [%d ] , Height: [%d ] \n", w, h);
}
+static void set_gapless(bool gapless)
+{
+#ifndef TIZEN_TV
+ if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
+ if (player_set_gapless(g_player[0], gapless) != PLAYER_ERROR_NONE)
+ g_print("failed set_gapless\n");
+ } else {
+ int i = 0;
+ for (i = 0; i < g_handle_num; i++) {
+ if (player_set_gapless(g_player[i], gapless) != PLAYER_ERROR_NONE)
+ g_print("failed to set_gapless\n");
+ }
+ }
+#else
+ g_print("not support at TV profile");
+#endif
+}
+
static void set_looping(bool looping)
{
if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
g_menu_state = CURRENT_STATUS_NEXT_URI;
} else if (strncmp(cmd, "gu", 2) == 0) {
get_next_uri();
+ } else if (strncmp(cmd, "sg", 2) == 0) {
+ g_menu_state = CURRENT_STATUS_GAPLESS;
} else {
g_print("unknown menu \n");
}
g_print("[Video Capture] C. Capture \n");
g_print("[next uri] su. set next uri. \t");
g_print("gu. get next uri. \t");
+ g_print("sg. set gapless. \n");
g_print("[etc] sp. Set Progressive Download\t");
g_print("gp. Get Progressive Download status\n");
g_print("mp. memory playback\n");
g_print("no track\n");
} else if (g_menu_state == CURRENT_STATUS_NEXT_URI) {
g_print("*** input next uri.\n");
+ } else if (g_menu_state == CURRENT_STATUS_GAPLESS) {
+ g_print("*** input gapless value.(0:disable, 1: enable) \n");
} else {
g_print("*** unknown status.\n");
quit_program();
reset_menu_state();
}
break;
+ case CURRENT_STATUS_GAPLESS:
+ {
+ int gapless = atoi(cmd);
+ set_gapless(gapless);
+ reset_menu_state();
+ }
+ break;
case CURRENT_STATUS_DISPLAY_SURFACE_CHANGE:
{
int type = atoi(cmd);