Commit graph

168 commits

Author SHA1 Message Date
Pauli Virtanen 336caa9db3 doc: add tutorials as Doxygen examples 2021-10-10 00:35:46 +03:00
Pauli Virtanen 98a0e54d5f doc: link examples to Doxygen docs
Include examples to the documentation, using Doxygen's example system.
2021-10-10 00:35:46 +03:00
Björn Daase cf38b7bdc4 fix codespell issues 2021-10-07 15:26:18 +00:00
Pauli Virtanen 7123fadc37 doc: further Doxygen tweaks
Make Doxygen see also macros defined inside struct declarations,
and to include also opaque structs.

Keep members in the order they are in the .h file, since Doxygen's
case-insensitive sort by name jumbles things.
2021-10-06 19:06:42 +00:00
Pauli Virtanen 75d76172fa doc: fix meson dependency list
Meson doesn't accept directories in input dependency list.
2021-10-05 20:31:35 +00:00
Pauli Virtanen 04f3948bb1 doc: avoid duplicate file listings in groups 2021-10-04 20:55:04 +03:00
Pauli Virtanen 49901f2d61 doc: add brief explanations for all groups 2021-10-04 20:55:04 +03:00
Pauli Virtanen 125051a700 doc: reorganize some \pages, and fix some group names
Move \pages having to do with the API usage to the API section.
Better group names for some groups.
2021-10-04 20:39:56 +03:00
Pauli Virtanen f9cdc617a8 doc: don't generate Doxygen file list
The file list duplicates the Module structure, and is just confusing
since it also contains the .c files.
2021-10-04 20:37:35 +03:00
Pauli Virtanen 601560e343 doc: hide various Doxygen generated dot graphs
The Doxygen autogenerated graphs are very useful and take up lots of
space being on the top, so disable them.

Also disable references/referenced by relations, which add clutter.

Also hide most macro values.
2021-10-03 15:39:27 +03:00
Pauli Virtanen 8159797f89 doc: reorganize Doxygen groups/modules to make more sense
The Doxygen "Modules" page is not very illuminative, as different parts
of the API are mixed together and not all parts are included.

Try to address this:

Put all parts of the public API to some Doxygen group, usually one group
per header file. Use short, systematic names.

Make these groups sub-groups of a few top-level groups, roughly
corresponding to the different logical parts of the API (core, impl,
stream, filter, spa, utilities).
2021-10-03 15:39:27 +03:00
Pauli Virtanen 43a84c4a2c doc: include files in Doxygen groups
File is included in all groups for which it contains \addtogroup
2021-10-03 15:02:39 +03:00
Pauli Virtanen cd94eff5f2 doc: add Doxygen filter that adds docs to struct *method macros
Add an input filter that tries to link e.g.

 #define pw_core_add_listener(...) pw_core_method(c,add_listener,...)

to the corresponding declaration in struct pw_core_methods.
2021-10-03 00:40:52 +03:00
Pauli Virtanen 4cb24531b3 doc: ignore symbols due to Doxygen mis-parsing
Ignore some symbols appearing as "Variables", which seem to be due to
some mis-parsing.
2021-10-03 00:40:52 +03:00
Pauli Virtanen c345d1e11d doc: make Doxygen to show only symbols defined in headers
Make Doxygen data structure etc. lists less cluttered by hiding
non-public stuff.

Add a Doxygen input filter that marks symbols declared in C files
private, so that they won't appear in the output unless the symbol is
also declared in a header.

The "spa static inline" hack is then also not needed any more.
2021-10-03 00:40:52 +03:00
Wim Taymans d90799c14e doc: add link to wiki 2021-09-30 13:31:08 +02:00
Peter Hutterer e3b216c026 media-session: add log topics to all modules
Media-session itself uses ms.core, there are only two files that could
have a sub-topic but right now they don't use it (match-rules and
metadata).

The modules use the ms.mod.* namespace, so it's trivial to filter on
those.
2021-09-28 09:35:39 +02:00
Peter Hutterer 52bd80aaa4 log: add topic loggers and a default topic
pw_log_log/logv now go through the topic-based logger using the
"default" topic. Log topics themselves can be allocated by the call
sites. The simplest way to use a topic from e.g. a module:

    PW_LOG_TOPIC_STATIC(mod_topic, "mod.foo");
    #define PW_LOG_TOPIC_DEFAULT mod_topic
    ...
    void pipewire__module_init() {
  	  PW_LOG_TOPIC_INIT(mod_topic);
  	  ...
    }

With the #define all pw_log_foo() are now routed through the custom
topic. For the cases where the log topic must be specified, a
pw_logt_foo() set of macros is available.

Log topics are enabled through the PIPEWIRE_DEBUG environment variable
which now supports globs, e.g. PIPEWIRE_DEBUG="*:I;mod.access:D"
to enable global INFO but DEBUG for the access module.

Namespaces documented are "pw", "mod" and "conn", for pipewire-internal
stuff, modules and connection dumping. The latter is special-cased to
avoid spamming the log files, it requires an expcit "conn.<glob>"
pattern to enable.

The "default" topic always exists and is the fallback for any
pw_log_foo() invocation that does not use a topic.
2021-09-28 09:35:38 +02:00
Peter Hutterer 92c7c8354d pipewire: don't log the location if PIPEWIRE_LOG_LINE=false
Default remains enabled, but sometimes it's easier to not have this.
2021-09-28 07:24:23 +00:00
Peter Hutterer 9a6b929eb1 doc: document the two other log enviroment variables 2021-09-28 07:24:23 +00:00
Peter Hutterer e46a30562f Promote media-session to its own subdirectory
media-session is past the point of being a mere example, let's promote
it out of the subdirectory.

pw-reserve is moved to tools/
2021-09-22 08:53:08 +02:00
Peter Hutterer 6f43aba91d doc: check if the media_session_sources variable exists
When building with -Dexamples=disabled, the whole src/examples is
skipped, so we never declare that variable.

Fixes #1551
2021-09-22 13:58:11 +10:00
Peter Hutterer e1672f9762 pipewire: allow for log level names in PIPEWIRE_DEBUG
Allow one of "XEWIDT" to refer to none, errors, warnings, info, debug
and trace, respectively because they're immediately recognizable. Well,
except maybe the X.

PIPEWIRE_DEBUG="I" is equivalent to PIPEWIRE_DEBUG="3" for example.
2021-09-10 07:38:20 +00:00
Wim Taymans 954befccff doc: define HAVE_DOT to generate dot files
Fixes #1585
2021-09-09 13:01:29 +02:00
Peter Hutterer 0596b388fe doc: fix example for the PIPEWIRE_DEBUG format 2021-09-09 09:31:52 +10:00
Peter Hutterer 2306124f49 doc: fix listing of the new No DSP media-session module
And copy the text from the comment into the public documentation, better
than just having an empty page there.
2021-09-07 07:52:45 +00:00
Peter Hutterer 7d13c7750d doc: document the portal negotation process with graphs
This is a multi-step process involving 4 processes and two modules.
Let's add some graphs to make this slightly easier to comprehend for
those not familiar with how portals work.
2021-09-06 07:29:28 +00:00
Peter Hutterer 83ed6e0be3 doc: swap two @ doxygen tags for the backslash ones 2021-09-06 07:29:28 +00:00
columbarius 63521c1063 doc: add section about v4l2 dmabuf sharing 2021-09-03 09:34:26 +00:00
Simon Ser 7a618390ec doc: add warning about mapping DMA-BUFs
A list of reasons why DMA-BUFs have to be treated specially. This
should make it clearer why mmaping DMA-BUFs should be avoided and hint
clients on how treat them correctly

Co-authored-by: columbarius <co1umbarius@protonmail.com>
2021-09-03 09:34:26 +00:00
columbarius 112d50c8b9 doc: clarify format negotiation
Describing different behaviour for modifier-less and modifier-aware case
and how a EnumFormat with modifier should be fixated. Also adding a Note
about `SPA_PARAM_BUFFERS_blocks`, which is important for multiplane
DMA-BUFS.
2021-09-03 09:34:26 +00:00
Nils Tonnätt dd12910769 Revert "[Meson] Fix all deprecation warnings"
This reverts commit f7e1175ef0.
2021-08-08 19:18:40 +00:00
Nils Tonnätt f7e1175ef0 [Meson] Fix all deprecation warnings 2021-08-06 07:56:16 +00:00
Pauli Virtanen 76bae0cac4 media-session: add bluez-autoswitch module
Add module that switches bluez device profile to HFP/HSP if an input
stream (non-monitor, autoconnect) appears, and the current default
output device is bluez one that does not have input route.

When all input streams are gone, switch all changed profiles back.

Pending restore state is saved to session manager state files, in order
to restore it if e.g. devices get disconnected.  This usually is not
currently necessary since the bluez5 plugin prefers to connect to A2DP
over HFP, but might matter in future with backchannel-enabled A2DP
codecs.
2021-08-05 11:27:06 +00:00
Peter Hutterer 127781cfc8 doc: ignore all function attributes in doxygen 2021-08-05 09:51:40 +00:00
Peter Hutterer d8f6033b9d spa: document the spa_interface and how it works 2021-08-05 09:51:40 +00:00
Peter Hutterer 1be939c672 doc: add a meson example to the tutorial
The vast majority of users will want to build with a build system, so
let's add a minimal example there to avoid guesswork.
2021-08-05 09:51:40 +00:00
Wim Taymans 4841156b74 doc: clarify JSON usage
Mention that the config format can be pure JSON or with some
simplifications and additions.
2021-08-04 11:47:31 +02:00
Peter Hutterer f0baffbc84 doc: ignore SPA_EXPORT and SPA_PRINTF_FUNC
This caused doxygen to include a rather random assortment of variables
and link to them from various pages (e.g. "arg", "res", "buffer", NAME,
etc.)
2021-08-04 07:49:53 +00:00
Peter Hutterer 5561531751 doc: document the core/implementation API split a bit better
Still missing a proper review of the linked objects, but at least this
now explains why those two are split.
2021-08-04 07:49:53 +00:00
Peter Hutterer 3370a56e3e doc: move the error reporting blurb to the library page
Let's keep the daemon page higher-level and leave API behaviors
elsewhere.
2021-08-04 07:49:53 +00:00
Peter Hutterer 710caf9d75 doc: fix a subsection name 2021-08-04 07:49:53 +00:00
Peter Hutterer 4c760e473d doc: add a nice graph to illustrate how the daemon a bit 2021-08-04 07:49:53 +00:00
Peter Hutterer 13ffc549c9 doc: add basic docs for the session manager 2021-08-04 07:49:53 +00:00
Peter Hutterer fc85b33e80 doc: drop the header priority in media-session.dox
This way the two subheaders won't show up in the sidebar
2021-08-02 08:27:51 +00:00
Peter Hutterer 310b4611c8 media-session: add stub docs for all media-session modules
Same basic approach as for the pipewire modules
2021-08-02 08:27:51 +00:00
Peter Hutterer 602bed7a98 doc: add minimal documentation for the alsa endpoint SM module 2021-08-02 08:27:51 +00:00
Peter Hutterer c2fef6caa2 doc: format the objects design page
Mostly replacing the lists so they actually render as lists
2021-08-02 08:27:51 +00:00
Peter Hutterer 25d15765b7 doc: better output formatting for the midi page 2021-08-02 08:27:51 +00:00
Peter Hutterer 8d39940350 doc: some more polishing of the access docs 2021-08-02 08:27:51 +00:00