X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Ftdm_capture.c;h=1fd5bb48f30bba0e1d7b325d2415d19399be752e;hb=refs%2Fheads%2Fsandbox%2Fcyeon%2Fdevel;hp=982230f90350541fd5a1a1637a36140a47c0200e;hpb=7d6d085e992322f66c2610a3006f173c0acdde25;p=platform%2Fcore%2Fuifw%2Flibtdm.git diff --git a/src/tdm_capture.c b/src/tdm_capture.c index 982230f..1fd5bb4 100644 --- a/src/tdm_capture.c +++ b/src/tdm_capture.c @@ -9,7 +9,7 @@ * Taeheon Kim , * YoungJun Cho , * SooChan Lim , - * Boram Park + * Boram Park * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the @@ -60,10 +60,13 @@ _tdm_capture_print_list(struct list_head *list) TDM_RETURN_IF_FAIL(list != NULL); + str[0] = '\0'; p = str; LIST_FOR_EACH_ENTRY(b, list, link) { if (len > 0) { - int l = snprintf(p, len, " (%p)", b->buffer); + tbm_bo bo = tbm_surface_internal_get_bo(b->buffer, 0); + int flags = tbm_bo_get_flags(bo); + int l = snprintf(p, len, " (%p[bo_flags:%x])", b->buffer, flags); p += l; len -= l; } else @@ -134,8 +137,6 @@ _tdm_capture_thread_cb_done(tdm_private_display *private_display, void *object, first_entry = container_of((&private_capture->buffer_list)->next, capture_buffer, link); if (first_entry->buffer != buffer) TDM_ERR("buffer(%p) is skipped", first_entry->buffer); - } else { - TDM_NEVER_GET_HERE(); } if ((capture_buffer = _tdm_capture_find_tbm_buffer(&private_capture->buffer_list, buffer))) { @@ -169,7 +170,7 @@ _tdm_capture_cb_done(tdm_capture *capture_module, tbm_surface_h buffer, void *us capture_done.base.sync = 0; capture_done.buffer = buffer; - ret = tdm_thread_cb_call(private_capture, &capture_done.base); + ret = tdm_thread_cb_call(private_capture, &capture_done.base, 1); TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE); } @@ -594,6 +595,7 @@ tdm_capture_attach(tdm_capture *capture, tbm_surface_h buffer) if (tdm_debug_module & TDM_DEBUG_BUFFER) { TDM_INFO("capture(%p) attached:", private_capture); + _tdm_capture_print_list(&private_capture->pending_buffer_list); _tdm_capture_print_list(&private_capture->buffer_list); } @@ -644,6 +646,12 @@ tdm_capture_commit(tdm_capture *capture) LIST_ADDTAIL(&b->commit_link, &commit_buffer_list); } + if (tdm_debug_module & TDM_DEBUG_BUFFER) { + TDM_INFO("capture(%p) committed:", private_capture); + _tdm_capture_print_list(&private_capture->pending_buffer_list); + _tdm_capture_print_list(&private_capture->buffer_list); + } + ret = func_capture->capture_commit(private_capture->capture_module); TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE); @@ -655,12 +663,6 @@ tdm_capture_commit(tdm_capture *capture) if (ret != TDM_ERROR_NONE) { /* LCOV_EXCL_START */ - /* Not to call the user release handler when failed. - * Do we have to call this function here really? - * User better use set_done_handler to know when pp is done. Using - * buffer_release_handler is not good. - */ - tdm_buffer_remove_release_handler_internal(b->buffer); _pthread_mutex_unlock(&private_display->lock); tdm_buffer_unref_backend(b->buffer);