mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-06 00:40:34 +00:00
![Peter Hutterer](/assets/img/avatar_default.png)
While doxygen can handle markdown pages, support for it is very limited: markdown pages can only be included as a whole page, they get an automatic title (custom titles are possible but aren't standard markdown) and it's not possible to use \subpage without messing with the markdown again. Any markdown page will thus end up as separate item in the doxygen output, not really suitable for generating a good page hiearchy. Let's switch the tutorial to use doxygen directly instead of markdown, short of using code/endcode instead of markdown's ``` there isn't that much difference anyway but it allows us to structure things nicer in the online docs.
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
/** \page page_tutorial1 Tutorial - Part 1: Getting started
|
|
|
|
|
|
\ref page_tutorial "Index" | \ref page_tutorial2
|
|
|
|
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.
|
|
|
|
\code{.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;
|
|
}
|
|
\endcode
|
|
|
|
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
|
|
#
|
|
|
|
\ref page_tutorial "Index" | \ref page_tutorial2
|
|
|
|
*/
|