stream: improve docs about direction

This commit is contained in:
Wim Taymans 2022-06-02 13:06:03 +02:00
parent 6e6385e27d
commit 774ade1467

View file

@ -50,6 +50,14 @@ extern "C" {
* inputs and/or outputs you will need to use the pw_filter or make * inputs and/or outputs you will need to use the pw_filter or make
* a pw_node yourself and export it with \ref pw_core_export. * a pw_node yourself and export it with \ref pw_core_export.
* *
* Streams can also be used to:
*
* \li Implement a Sink in PipeWire. This is a PW_DIRECTION_INPUT stream.
* \li Implement a Source in PipeWire. This is a PW_DIRECTION_OUTPUT stream
*
* In this case, the PW_KEY_MEDIA_CLASS property needs to be set to
* "Audio/Sink" or "Audio/Source" respectively.
*
* \section sec_create Create * \section sec_create Create
* *
* Make a new stream with \ref pw_stream_new(). You will need to specify * Make a new stream with \ref pw_stream_new(). You will need to specify
@ -64,6 +72,16 @@ extern "C" {
* The stream is initially unconnected. To connect the stream, use * The stream is initially unconnected. To connect the stream, use
* \ref pw_stream_connect(). Pass the desired direction as an argument. * \ref pw_stream_connect(). Pass the desired direction as an argument.
* *
* The direction is:
* \li PW_DIRECTION_INPUT for a stream that *consumes* data. This can be a
* stream that captures from a Source or a when the stream is used to
* implement a Sink.
*
* \li PW_DIRECTION_OUTPUT for a stream that *produces* data. This can be a
* stream that plays to a Sink or when the stream is used to implement
* a Source.
*
* \subsection ssec_stream_target Stream target * \subsection ssec_stream_target Stream target
* *
* To make the newly connected stream automatically connect to an existing * To make the newly connected stream automatically connect to an existing