[0.6.103] adjust the pd timeout 82/190882/4 accepted/tizen/4.0/unified/20181012.083427 submit/tizen_4.0/20181011.094748
authorEunhae Choi <eunhae1.choi@samsung.com>
Mon, 8 Oct 2018 08:15:52 +0000 (17:15 +0900)
committereunhae choi <eunhae1.choi@samsung.com>
Mon, 8 Oct 2018 09:04:07 +0000 (09:04 +0000)
- 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
src/mm_player_priv.c

index 5f67666b6dcbc0a6630abe564c0135518f63b6df..360535782330791747fc3cf4537a53570ac3ac18 100644 (file)
@@ -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
index b9467ea1a96df72224b57ca0cb8d48645d76945a..0b00d3d59420bb2dfa3b65b80dd9c4afe5a70d14 100644 (file)
 
 /* 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;