screen_consume_stream_buffers()

Updated: April 19, 2023

Cause a stream to become a consumer endpoint to another stream

Synopsis:

#include <screen/screen.h>
int screen_consume_stream_buffers(screen_stream_t stream,
                                  int count,
                                  screen_stream_t producer)

Arguments:

stream
The handle of the stream that's consuming buffer(s) of a producer.
count
The number of buffers that the consumer shares with the producer. Use a count of 0 to ensure that the number of buffers shared by the consumer matches that of the producer.
producer
The handle of the stream whose buffer is consumed.

Library:

libscreen

Description:

Function Type: Flushing Execution

This function is used when the consumer of a stream is in a different process. The function causes the local stream handle to have access to the same buffers as the remote stream. It also connects the local stream as a consumer endpoint of the remote stream.

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).