libds-tizen: Add ds_tdm_buffer_queue 56/278156/1
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 16 Mar 2022 04:18:21 +0000 (13:18 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:58:19 +0000 (14:58 +0900)
commita8b54995b578abd5547803c605c0d430be775df6
treefb6bfe30f0f90c33cd16f003012046e3009276c8
parent014278c3fb19ac4c21a074ad1f745bd1595b3359
libds-tizen: Add ds_tdm_buffer_queue

A ds_tdm_buffer_queue is a buffer queue that is able to be acquired from
ds_tdm_output.

A ds_tdm_buffer_queue provides a handle of native queue to a user and
the user may pass it to a renderer. The renderer then should think of
native queue as tbm_surface_queue_h. With the tbm_surface_queue_h, the
renderer may dequeue a surface from it and draw on the dequeued buffer.
After finish drawing on the buffer, the renderer should enqueue it to
the tbm_surface_queue_h.

As soon as the renderer enqueues buffer to the tbm_surface_queue_h, the
user can recieve a notification that the buffer can be acquired from the
ds_tbm_buffer_queue using ds_tdm_buffer_queue_add_acquirable_listener().
Then user may acquire a buffer from the ds_tdm_buffer_queue and attach
it to a ds_output.

Note that although the renderer may enqueue a buffer on different thread
from the thread working on libds, but libds will call a callback
function which is registered using
ds_tdm_buffer_queue_add_acquirable_listener() on the thread working on
libds.

Change-Id: Ib50d2f11cdb27c0aa34b6beeecc73f012032c685
include/libds-tizen/backend/tdm.h
src/libds-tizen/backend/tdm/meson.build
src/libds-tizen/backend/tdm/output.c
src/libds-tizen/backend/tdm/tdm.h
src/libds-tizen/backend/tdm/tdm_buffer_queue.c [new file with mode: 0644]
src/libds-tizen/backend/tdm/tdm_buffer_queue.h [new file with mode: 0644]