It is expressed in
: https://developer.gnome.org/glib/stable/glib-Threads.html#g-cond-wait-until
Change-Id: Id5d35f6a403df01c7a976dff7a3b825217f9ba34
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Name: libmm-player
Summary: Multimedia Framework Player Library
Name: libmm-player
Summary: Multimedia Framework Player Library
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
GList *l = NULL;
MMPLAYER_RETURN_VAL_IF_FAIL(player, NULL);
gboolean ret = TRUE;
GList *l = NULL;
MMPLAYER_RETURN_VAL_IF_FAIL(player, NULL);
gboolean ret = TRUE;
/* check DRC, if it is, destroy the prev bo list to create again */
if (player->video_bo_size != size) {
/* check DRC, if it is, destroy the prev bo list to create again */
if (player->video_bo_size != size) {
+ if (player->ini.video_bo_timeout > 0)
+ end_time = g_get_monotonic_time() + player->ini.video_bo_timeout * G_TIME_SPAN_SECOND;
+
while (TRUE) {
/* get bo from list*/
for (l = g_list_first(player->video_bo_list); l; l = g_list_next(l)) {
while (TRUE) {
/* get bo from list*/
for (l = g_list_first(player->video_bo_list); l; l = g_list_next(l)) {
return tbm_bo_ref(tmp->bo);
}
}
return tbm_bo_ref(tmp->bo);
}
}
- if (!ret) {
- LOGE("failed to get bo in %d timeout", player->ini.video_bo_timeout);
- MMPLAYER_VIDEO_BO_UNLOCK(player);
- return NULL;
- }
if (player->ini.video_bo_timeout <= 0) {
MMPLAYER_VIDEO_BO_WAIT(player);
} else {
if (player->ini.video_bo_timeout <= 0) {
MMPLAYER_VIDEO_BO_WAIT(player);
} else {
- gint64 timeout = g_get_monotonic_time() + player->ini.video_bo_timeout * G_TIME_SPAN_SECOND;
- ret = MMPLAYER_VIDEO_BO_WAIT_UNTIL(player, timeout);
+ ret = MMPLAYER_VIDEO_BO_WAIT_UNTIL(player, end_time);
+ if (!ret) {
+ LOGE("failed to get bo in %d timeout", player->ini.video_bo_timeout);
+ break;
+ }
+
+ MMPLAYER_VIDEO_BO_UNLOCK(player);
+ return NULL;