summaryrefslogtreecommitdiffstats
path: root/debian/tests/manual-tests.md
blob: 6910d3b8e0b45c1a376c171e3e9bd26cdd89a91e (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Manual tests for PipeWire
=========================

Introspection (pipewire)
------------------------

Install `pipewire`.

Run `pw-cli dump`.

Video streams
-------------

Install `pipewire` and `pipewire-tests`.

Run `/usr/libexec/installed-tests/pipewire-0.3/examples/video-src`
(or `video-src-alloc`). It will print a node ID, for example 42.

In another terminal, run
`/usr/libexec/installed-tests/pipewire-0.3/examples/video-play 42`
or `/usr/libexec/installed-tests/pipewire-0.3/examples/export-sink 42`,
replacing 42 by the node ID you saw. You should get a window with an
animation.

Similarly, if you uncomment the lines

```
add-spa-lib videotestsrc videotestsrc/libspa-videotestsrc
create-object spa-node-factory factory.name=videotestsrc node.name=videotestsrc Spa:Pod:Object:Param:Props:patternType=1
```

in `/etc/pipewire/pipewire.conf`, then you should see a node in the output
of `pw-cli ls Node` with `node.name = "videotestsrc"`. Pass its node ID
to `video-play` to see a different animation.

V4L2 cameras
------------

If you have a camera, run
`/usr/libexec/installed-tests/pipewire-0.3/examples/local-v4l2` or
`/usr/libexec/installed-tests/pipewire-0.3/examples/spa/local-v4l2`.
You should get a camera stream displayed in a window (but this might
fail if it cannot negotiate a suitable capture resolution).

Audio sink
----------

Use `pw-play` to play a WAV file.

Audio test source
-----------------

If you uncomment the lines

```
add-spa-lib audiotestsrc audiotestsrc/libspa-audiotestsrc
create-object adapter factory.name=audiotestsrc node.name=my-test
```

in `/etc/pipewire/pipewire.conf`, then you should see a node in the output
of `pw-cli ls Node` with `node.name = "my-test"`. You can record from it
with `pw-record --target ${node id here} test.wav` (press Ctrl+C to
stop recording).

ALSA client plugin (pipewire-audio-client-libraries)
----------------------------------------------------

Install `pipewire-audio-client-libraries` and `alsa-utils`.
Make sure PulseAudio is not currently playing audio and is configured
to release the audio device when not in use.

`aplay -L` should list `pipewire`.

`aplay -D pipewire /usr/share/sounds/alsa/Front_Center.wav` should
play a sound.

JACK client library replacement (pipewire-audio-client-libraries)
-----------------------------------------------------------------

Install `pipewire`, `pipewire-audio-client-libraries`, `alsa-utils` and
`sndfile-tools`. Do not have a real JACK server running.
Make sure PulseAudio is not currently playing audio and is configured
to release the audio device when not in use.

`aplay -D jack /usr/share/sounds/alsa/Front_Center.wav` and
`sndfile-jackplay /usr/share/sounds/alsa/Front_Center.wav` should fail
with:

```
jack server is not running or cannot be started
```

`pw-jack aplay -D jack /usr/share/sounds/alsa/Front_Center.wav`
should succeed.

* TODO: Currently it prints

        aplay: set_params:1343: Sample format non available
        Available formats:
        - FLOAT_LE

    and segfaults.

`pw-jack sndfile-jackplay /usr/share/sounds/alsa/Front_Center.wav`
should succeed.

* TODO: Currently it prints
    `Cannot connect output port 0 (alsa_pcm:playback_1)` and plays
    silence for the length of the test file.

PulseAudio client library replacement (pipewire-audio-client-libraries)
-----------------------------------------------------------------------

Install `pipewire`, `pipewire-audio-client-libraries`, `alsa-utils` and
`pulseaudio-utils`. Make sure PulseAudio is not currently playing audio
and is configured to release the audio device when not in use.

Setup: let your pulseaudio service become idle, then
`pkill -STOP pulseaudio`.

`paplay /usr/share/sounds/alsa/Front_Center.wav` should hang (because
PulseAudio has been stopped).

`pw-pulse paplay /usr/share/sounds/alsa/Front_Center.wav` should play
the audio.

Teardown: `pkill -CONT pulseaudio` to return it to normal.

GStreamer elements (gstreamer1.0-pipewire)
------------------------------------------

Install `gstreamer1.0-tools` and `gstreamer1.0-pipewire`.
Make sure PulseAudio is not currently playing audio and is configured
to release the audio device when not in use.

Run: `gst-inspect-1.0 pipewire`. It should list `pipewiresrc`,
`pipewiresink` and `pipewiredeviceprovider`.

Run: `gst-inspect-1.0 pipewiresrc`. It should list details.

Run: `gst-inspect-1.0 pipewiresink`. It should list details.

Run: `gst-launch-1.0 audiotestsrc '!' pipewiresink`. It should beep
until you press Ctrl+C.

Run: `gst-launch-1.0 pipewiresrc '!' videoconvert '!' autovideosink`.
You should get a webcam image (if you have a webcam).