libds-tizen: Add ds_tdm_buffer_queue 42/278042/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:08:03 +0000 (14:08 +0900)
commitaa3d710937ec336e6fc7962f2927397d22e768e0
tree9361cbebcbb108be74cfd0deca6f005b2a5f9d5b
parent97cd1fa2babc9a6bc5ab30afcbc5a5621d7f3c5f
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: Ia5c477ceabda7e85f6441a73e76884b95eafa6fb
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]