From f96aabc0b9165fb8e7023b7effe5adf5f01f75e2 Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Mon, 8 Oct 2018 17:15:52 +0900 Subject: [PATCH] [0.6.103] adjust the pd timeout - start funct timeout is too long and it can cause crash - download timeout is 30 sec as before - playback timeout is changed from 30 sec to 20 sec and it is included in the API timeout Change-Id: I0afd3e2e0343b35d0d9d45f867f06035360e93cf --- packaging/libmm-player.spec | 2 +- src/mm_player_priv.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 5f67666..3605357 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -1,6 +1,6 @@ Name: libmm-player Summary: Multimedia Framework Player Library -Version: 0.6.102 +Version: 0.6.103 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index b9467ea..0b00d3d 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -102,6 +102,7 @@ /* For PD mode */ #define PLAYER_PD_EXT_MAX_SIZE_BYTE 1024 * 1024 * 3 +#define PLAYER_PD_STATE_CHANGE_TIME 20 /* sec */ #define SPATIAL_AUDIO_CAPS "audio/x-raw,format=S16LE,channels=4" @@ -9249,7 +9250,9 @@ _mmplayer_realize(MMHandleType hplayer) 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; @@ -14172,7 +14175,10 @@ int _mmplayer_get_timeout(MMHandleType hplayer, int *timeout) MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED); MMPLAYER_RETURN_VAL_IF_FAIL(timeout, MM_ERROR_COMMON_INVALID_ARGUMENT); - if (MMPLAYER_IS_STREAMING(player)) + if (MMPLAYER_IS_HTTP_PD(player)) + /* 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 *timeout = player->ini.localplayback_state_change_timeout; -- 2.34.1