}
static void
-__mmplayer_gst_handle_async(mm_player_t* player, gboolean async, enum MMPlayerSinkType type)
+__mmplayer_gst_set_async(mm_player_t* player, gboolean async, enum MMPlayerSinkType type)
{
MMPlayerGstElement *videobin = NULL, *audiobin = NULL, *textbin = NULL;
if (is_drop) {
LOGD("Drop subtitle text after getting EOS\n");
- __mmplayer_gst_handle_async(player, FALSE, MMPLAYER_TEXT_SINK);
+ __mmplayer_gst_set_async(player, FALSE, MMPLAYER_TEXT_SINK);
g_object_set(textbin[MMPLAYER_T_IDENTITY].gst, "drop-probability", (gfloat)1.0, NULL);
player->is_subtitle_force_drop = TRUE;
LOGD("Enable subtitle data path without drop\n");
g_object_set(textbin[MMPLAYER_T_IDENTITY].gst, "drop-probability", (gfloat)0.0, NULL);
- __mmplayer_gst_handle_async(player, TRUE, MMPLAYER_TEXT_SINK);
+ __mmplayer_gst_set_async(player, TRUE, MMPLAYER_TEXT_SINK);
LOGD("non-connected with external display");
if (player->es_player_push_mode || MMPLAYER_IS_HTTP_PD(player)) {
/* disable the async state transition because there could be no data in the pipeline */
- __mmplayer_gst_handle_async(player, FALSE, MMPLAYER_SINK_ALL);
+ __mmplayer_gst_set_async(player, FALSE, MMPLAYER_SINK_ALL);
}
/* set gst state */
if (player->es_player_push_mode || MMPLAYER_IS_HTTP_PD(player)) {
/* enable the async state transition as default operation */
- __mmplayer_gst_handle_async(player, TRUE, MMPLAYER_SINK_ALL);
+ __mmplayer_gst_set_async(player, TRUE, MMPLAYER_SINK_ALL);
}
/* return if set_state has failed */
/* For PD mode */
#define PLAYER_PD_EXT_MAX_SIZE_BYTE 1024 * 1024 * 3
+#define PLAYER_PD_STATE_CHANGE_TIME 20 /* sec */
#define PLAYER_SPHERICAL_DEFAULT_YAW 0 /* sync from video360 plugin */
#define PLAYER_SPHERICAL_DEFAULT_PITCH 0
return MM_ERROR_PLAYER_NOT_SUPPORTED_FORMAT;
}
- if (MMPLAYER_IS_STREAMING(player))
+ if (MMPLAYER_IS_HTTP_PD(player))
+ MMPLAYER_STATE_CHANGE_TIMEOUT(player) = PLAYER_PD_STATE_CHANGE_TIME;
+ else if (MMPLAYER_IS_STREAMING(player))
MMPLAYER_STATE_CHANGE_TIMEOUT(player) = player->ini.live_state_change_timeout;
else
MMPLAYER_STATE_CHANGE_TIMEOUT(player) = player->ini.localplayback_state_change_timeout;
MMPLAYER_RETURN_VAL_IF_FAIL(timeout, MM_ERROR_COMMON_INVALID_ARGUMENT);
if (MMPLAYER_IS_HTTP_PD(player))
- *timeout = player->ini.live_state_change_timeout*2;
+ /* consider the timeout both download pipeline and playback pipeline */
+ *timeout = player->ini.live_state_change_timeout + PLAYER_PD_STATE_CHANGE_TIME;
else if (MMPLAYER_IS_STREAMING(player))
*timeout = player->ini.live_state_change_timeout;
else