_mmplayer_gst_get_position(player, &pos_nsec); /* to update player->last_position */
- if (MMPLAYER_IS_HTTP_STREAMING(player)) {
+ if (MMPLAYER_IS_HTTP_STREAMING(player))
data_size = player->http_content_size;
- }
_mm_player_streaming_buffering(player->streamer, buffering_msg, data_size, player->last_position, player->duration);
- _mm_player_streaming_sync_property(player->streamer, player->pipeline->mainbin[MMPLAYER_M_AUTOPLUG].gst);
+ if (!player->streamer->is_adaptive_streaming) {
+ _mm_player_streaming_sync_property(player->streamer, player->pipeline->mainbin[MMPLAYER_M_AUTOPLUG].gst);
+ return;
+ }
- return;
+ /* adaptivedemux2 is used for buffering in uridecodebin3 */
+ if (!player->streamer->buffering_req.is_pre_buffering) {
+ LOGD("adaptive> set rebuffer time : %d ms", player->streamer->buffering_req.rebuffer_time);
+ g_object_set(player->pipeline->mainbin[MMPLAYER_M_ADAPTIVE_DEMUX].gst,
+ "low-watermark-time", (guint64)(player->streamer->buffering_req.rebuffer_time * GST_MSECOND),
+ NULL);
+ }
}
static int
player->pipeline->mainbin[MMPLAYER_M_ADAPTIVE_DEMUX].id = MMPLAYER_M_ADAPTIVE_DEMUX;
player->pipeline->mainbin[MMPLAYER_M_ADAPTIVE_DEMUX].gst = element;
- LOGD("set max variant limit: %d, %d %d", player->adaptive_info.limit.bandwidth,
- player->adaptive_info.limit.width, player->adaptive_info.limit.height);
+ MMPLAYER_FREEIF(player->type);
+
+ if (g_strrstr(factory_name, "hlsdemux")) {
+ player->type = g_strdup("application/x-hls");
+ player->profile.uri_type = MM_PLAYER_URI_TYPE_HLS;
+ } else if (g_strrstr(factory_name, "dashdemux")) {
+ player->type = g_strdup("application/dash+xml");
+ player->profile.uri_type = MM_PLAYER_URI_TYPE_DASH;
+ } else {
+ LOGE("not supported type");
+ return;
+ }
+ player->streamer->is_adaptive_streaming = TRUE;
+
+ if (player->streamer->buffering_req.prebuffer_time <= MIN_BUFFERING_TIME)
+ player->streamer->buffering_req.prebuffer_time = DEFAULT_PREBUFFERING_TIME;
+
+ LOGD("max variant limit: %d, %d, %d, prebuffer time: %d ms",
+ player->adaptive_info.limit.bandwidth,
+ player->adaptive_info.limit.width,
+ player->adaptive_info.limit.height,
+ player->streamer->buffering_req.prebuffer_time);
g_object_set(player->pipeline->mainbin[MMPLAYER_M_ADAPTIVE_DEMUX].gst,
- "max-bandwidth", player->adaptive_info.limit.bandwidth,
- "max-video-width", player->adaptive_info.limit.width,
- "max-video-height", player->adaptive_info.limit.height, NULL);
+ "max-bandwidth", player->adaptive_info.limit.bandwidth,
+ "max-video-width", player->adaptive_info.limit.width,
+ "max-video-height", player->adaptive_info.limit.height,
+ "low-watermark-time", (guint64)(player->streamer->buffering_req.prebuffer_time * GST_MSECOND),
+ NULL);
} else {
#ifdef __DEBUG__
LOGD("plugged element is demuxer. take it");
player->pipeline->mainbin[MMPLAYER_M_DEMUXED_S_BUFFER].id = MMPLAYER_M_DEMUXED_S_BUFFER;
player->pipeline->mainbin[MMPLAYER_M_DEMUXED_S_BUFFER].gst = element;
- if ((MMPLAYER_IS_HTTP_STREAMING(player)) ||
- (MMPLAYER_IS_HTTP_LIVE_STREAMING(player)) ||
- (MMPLAYER_IS_DASH_STREAMING(player))) {
+ if (MMPLAYER_IS_HTTP_STREAMING(player)) {
/* in case of multiqueue, max bytes size is defined with fixed value in mm_player_streaming.h*/
_mm_player_streaming_set_multiqueue(player->streamer, element);
_mm_player_streaming_sync_property(player->streamer, player->pipeline->mainbin[MMPLAYER_M_AUTOPLUG].gst);
streamer->buffering_state = MM_PLAYER_BUFFERING_IN_PROGRESS;
streamer->buffering_percent = -1;
- if (!streamer->buffering_req.is_pre_buffering) {
+ if (!streamer->buffering_req.is_pre_buffering && !streamer->is_adaptive_streaming) {
streamer->need_update = TRUE;
__streaming_adjust_min_threshold(streamer, position);
}
}
streamer->need_update = FALSE;
- __streaming_update_buffer_setting(streamer, buffering_msg, content_size, position, duration);
+ if (!streamer->is_adaptive_streaming)
+ __streaming_update_buffer_setting(streamer, buffering_msg, content_size, position, duration);
return;
}