blob: d913ebbbc02ff39077d2fe32d056214e2962b95f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
[[index]](tutorial-index.md) [[next]](tutorial2.md)
# Getting started (Tutorial 1)
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.
```c
#include <pipewire/pipewire.h>
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;
}
```
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:
```
gcc -Wall test1.c -o test1 $(pkg-config --cflags --libs libpipewire-0.3)
```
then run it with:
```
# ./test1
Compiled with libpipewire 0.3.5
Linked with libpipewire 0.3.5
#
```
[[index]](tutorial-index.md) [[next]](tutorial2.md)
|