Make a stream frame available to its consumers
#include <screen/screen.h>
int screen_post_stream(screen_stream_t stream,
                       screen_buffer_t buf,
                       int count,
                       const int *dirty_rects,
                       int flags)
Function Type: Apply Execution
In addition to the area(s) defined by dirty_rects, consumers may use all the pixels in the buffer. Consumers may also retrieve data from the buffer at times other than when screen_post_stream() is called.
The function may cause the SCREEN_PROPERTY_RENDER_BUFFERS of the stream to change. Avoid having other threads in the application read this property while one thread is running screen_post_stream() on the same stream. If this happens, the property may reflect out-of-date information that can lead to artifacts.
0 if the area of the rendering buffer that is marked dirty has been updated and a new set of rendering buffers was returned, or -1 if an error occurred (errno is set).