[0.6.113] disable max-size-time, use-rate-estimate in queue2 when PD mode 64/179464/2
authorGilbok Lee <gilbok.lee@samsung.com>
Fri, 18 May 2018 04:39:01 +0000 (13:39 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Wed, 23 May 2018 10:19:24 +0000 (19:19 +0900)
Change-Id: I89f2c32007f43191d4a1215f3bbff00f269e6340

packaging/libmm-player.spec
src/include/mm_player_streaming.h
src/mm_player_priv.c
src/mm_player_streaming.c

index f0c1fc3..11e1576 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.112
+Version:    0.6.113
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 4ea7638..b400b1a 100644 (file)
@@ -129,6 +129,7 @@ typedef struct {
        gboolean        is_buffering;
        gboolean        is_buffering_done;      /* get info from bus sync callback */
        gboolean        is_adaptive_streaming;
+       gboolean        is_pd_mode;
 
        gint            buffering_percent;
 
index 3bba785..628a956 100755 (executable)
@@ -98,6 +98,9 @@
 
 #define ADAPTIVE_VARIANT_DEFAULT_VALUE -1 /* auto */
 
+/* For PD mode */
+#define PLAYER_PD_EXT_MAX_SIZE_BYTE            1024 * 1024 * 3
+
 #define PLAYER_BUS_MSG_DEFAULT_TIMEOUT 500 /* bus msg wait timeout */
 #define PLAYER_BUS_MSG_PREPARE_TIMEOUT 10
 
@@ -6685,10 +6688,12 @@ __mmplayer_gst_create_pipeline(mm_player_t* player)
 
                pre_buffering_time = (pre_buffering_time > 0) ? (pre_buffering_time) : (player->ini.http_buffering_time);
 
+               player->streamer->is_pd_mode = TRUE;
+
                __mm_player_streaming_set_queue2(player->streamer,
                                element,
                                TRUE,
-                               player->ini.http_max_size_bytes + 52428800, // http_max_size_types + 5Mb
+                               player->ini.http_max_size_bytes + PLAYER_PD_EXT_MAX_SIZE_BYTE,
                                pre_buffering_time,
                                1.0,
                                player->ini.http_buffering_limit,
index 2e3071f..78e9b0a 100644 (file)
@@ -131,9 +131,11 @@ void __mm_player_streaming_initialize(mm_player_streaming_t* streamer)
        streamer->is_buffering = FALSE;
        streamer->is_buffering_done = FALSE;
        streamer->is_adaptive_streaming = FALSE;
-       streamer->buffering_percent = -1;
+       streamer->is_pd_mode = FALSE;
 
+       streamer->buffering_percent = -1;
        streamer->ring_buffer_size = DEFAULT_RING_BUFFER_SIZE;
+
        MMPLAYER_FLEAVE();
        return;
 }
@@ -164,6 +166,7 @@ void __mm_player_streaming_deinitialize(mm_player_streaming_t* streamer)
        streamer->is_buffering = FALSE;
        streamer->is_buffering_done = FALSE;
        streamer->is_adaptive_streaming = FALSE;
+       streamer->is_pd_mode = FALSE;
 
        streamer->buffering_percent = -1;
        streamer->ring_buffer_size = DEFAULT_RING_BUFFER_SIZE;
@@ -468,7 +471,7 @@ void __mm_player_streaming_set_queue2(mm_player_streaming_t* streamer,
                if (use_buffering) {
                        streamer->streaming_buffer_type = BUFFER_TYPE_MUXED;
 
-                       if (content_size > 0) {
+                       if (content_size > 0 || streamer->is_pd_mode) {
                                if (streamer->buffering_req.prebuffer_time > 0)
                                        streamer->buffering_req.is_pre_buffering = TRUE;
                                else