gst_date_time_unref(datetime);\
} \
} \
- } while(0)
+ } while (0)
#define MMPLAYER_UPDATE_TAG_UINT64(gsttag, attribute, playertag) \
do { \
if (buffer_percent == MAX_BUFFER_PERCENT) {
LOGD("Ignored all the previous buffering msg!(got %d%%)", buffer_percent);
+ __mmplayer_update_buffer_setting(player, NULL); /* update buffering size for next buffering */
player->streamer->buffering_state = MM_PLAYER_BUFFERING_DEFAULT;
}
MMPLAYER_CMD_UNLOCK(player);
caps = gst_pad_query_caps(pad, NULL);
MMPLAYER_CHECK_NULL(caps);
- str = gst_caps_get_structure (caps, 0);
+ str = gst_caps_get_structure(caps, 0);
name = gst_structure_get_string(str, "media");
if (!name) {
LOGE("cannot get mimetype from structure.");
buffer_handle = &(streamer->buffer_handle[BUFFER_TYPE_DEMUXED]);
low_watermark = streaming_get_min_watermark(buffer_handle->buffer_high_watermark, buffer_handle->buffering_time);
+ LOGD("sync : %1.3f ~ %1.3f", low_watermark, buffer_handle->buffer_high_watermark);
g_object_set(G_OBJECT(decodebin),
"max-size-bytes", buffer_handle->buffering_bytes,
"max-size-time", (guint64)(buffer_handle->buffering_time * GST_MSECOND),
MMPLAYER_RETURN_IF_FAIL(streamer);
MMPLAYER_RETURN_IF_FAIL(buffering_msg);
+ MMPLAYER_RETURN_IF_FAIL(GST_IS_MESSAGE(buffering_msg));
+ MMPLAYER_RETURN_IF_FAIL((GST_MESSAGE_TYPE(buffering_msg) == GST_MESSAGE_BUFFERING));
/* update when buffering has started. */
if (!(streamer->buffering_state & MM_PLAYER_BUFFERING_IN_PROGRESS)) {
if (streamer->buffering_percent == MAX_BUFFER_PERCENT) {
streamer->buffering_state = MM_PLAYER_BUFFERING_DEFAULT;
streamer->buffering_req.is_pre_buffering = FALSE;
+ streamer->need_update = TRUE;
} else if (streamer->buffering_state & MM_PLAYER_BUFFERING_COMPLETE) {
streamer->buffering_state = MM_PLAYER_BUFFERING_COMPLETE; /* have to keep state to ignore remained msg till get 100% msg */
streamer->buffering_req.is_pre_buffering = FALSE;
guint64 content_size, gint64 position, gint64 duration)
{
MMPLAYER_FENTER();
-
MMPLAYER_RETURN_IF_FAIL(streamer);
- MMPLAYER_RETURN_IF_FAIL(buffering_msg);
- MMPLAYER_RETURN_IF_FAIL(GST_IS_MESSAGE(buffering_msg));
- MMPLAYER_RETURN_IF_FAIL((GST_MESSAGE_TYPE(buffering_msg) == GST_MESSAGE_BUFFERING));
- if (position > (gint64)(streamer->buffering_req.prebuffer_time * GST_MSECOND))
- streamer->buffering_req.is_pre_buffering = FALSE;
+ if (buffering_msg) {
+ if (position > (gint64)(streamer->buffering_req.prebuffer_time * GST_MSECOND))
+ streamer->buffering_req.is_pre_buffering = FALSE;
- streaming_update_buffering_status(streamer, buffering_msg, position);
+ streaming_update_buffering_status(streamer, buffering_msg, position);
- if (!streamer->need_update)
- return;
+ if (!streamer->need_update)
+ return;
+ }
streamer->need_update = FALSE;
streaming_update_buffer_setting(streamer, buffering_msg, content_size, position, duration);