2021-05-25 13:08:04 +10:00
|
|
|
/** \page page_tutorial1 Tutorial - Part 1: Getting started
|
2020-06-11 15:32:52 +02:00
|
|
|
|
2021-05-25 13:08:04 +10:00
|
|
|
|
|
|
|
|
\ref page_tutorial "Index" | \ref page_tutorial2
|
2020-06-11 09:51:32 +02:00
|
|
|
|
|
|
|
|
In this tutorial we show the basics of a simple PipeWire application.
|
|
|
|
|
Use this tutorial to get started and help you set up your development
|
|
|
|
|
environment.
|
|
|
|
|
|
|
|
|
|
## Initialization
|
|
|
|
|
|
|
|
|
|
Let get started with the simplest application.
|
|
|
|
|
|
2021-05-25 13:08:04 +10:00
|
|
|
\code{.c}
|
2021-05-07 09:15:06 +10:00
|
|
|
#include <pipewire/pipewire.h>
|
2020-06-11 09:51:32 +02:00
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
{
|
|
|
|
|
pw_init(&argc, &argv);
|
|
|
|
|
|
|
|
|
|
fprintf(stdout, "Compiled with libpipewire %s\n"
|
|
|
|
|
"Linked with libpipewire %s\n",
|
|
|
|
|
pw_get_headers_version(),
|
|
|
|
|
pw_get_library_version());
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2021-05-25 13:08:04 +10:00
|
|
|
\endcode
|
2020-06-11 09:51:32 +02:00
|
|
|
|
|
|
|
|
Before you can use any PipeWire functions, you need to call `pw_init()`.
|
|
|
|
|
|
|
|
|
|
## Compilation
|
|
|
|
|
|
|
|
|
|
To compile the simple test application, copy it into a test1.c file and
|
|
|
|
|
use:
|
|
|
|
|
|
2021-05-25 13:08:04 +10:00
|
|
|
gcc -Wall test1.c -o test1 $(pkg-config --cflags --libs libpipewire-0.3)
|
2020-06-11 09:51:32 +02:00
|
|
|
|
|
|
|
|
then run it with:
|
|
|
|
|
|
2021-05-25 13:08:04 +10:00
|
|
|
# ./test1
|
|
|
|
|
Compiled with libpipewire 0.3.5
|
|
|
|
|
Linked with libpipewire 0.3.5
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
\ref page_tutorial "Index" | \ref page_tutorial2
|
2020-06-11 09:51:32 +02:00
|
|
|
|
2021-05-25 13:08:04 +10:00
|
|
|
*/
|