PipeWire Wim Taymans Principal Software Engineer FOSDEM 2019 - - PowerPoint PPT Presentation

pipewire
SMART_READER_LITE
LIVE PREVIEW

PipeWire Wim Taymans Principal Software Engineer FOSDEM 2019 - - PowerPoint PPT Presentation

PipeWire Wim Taymans Principal Software Engineer FOSDEM 2019 PipeWire | Wim Taymans 1 What is it Multimedia sharing and processing engine PipeWire | Wim Taymans 6 The multimedia stack App Browser Skype GStreamer VLC Ardour wayland


slide-1
SLIDE 1

PipeWire | Wim Taymans

1

PipeWire

Wim Taymans Principal Software Engineer FOSDEM 2019

slide-2
SLIDE 2

PipeWire | Wim Taymans

6

What is it

Multimedia sharing and processing engine

slide-3
SLIDE 3

PipeWire | Wim Taymans

7

The multimedia stack

Kernel V4l2 alsa bluetooth va-api DRM GStreamer Browser Skype App Pulseaudio JACK VLC Ardour wayland

slide-4
SLIDE 4

PipeWire | Wim Taymans

8

PipeWire

Kernel V4l2 alsa bluetooth va-api DRM PipeWire Daemon GStreamer VLC App1 App2 App JACK Wayland Session Manager

slide-5
SLIDE 5

PipeWire | Wim Taymans

21

Features

  • Exchange media with devices and other apps
  • Zero copy, shared memory, memfd, dmabuf, eventfd
  • Security per application
  • Visible objects (R), methods (WX), ..
  • RT capable, low latency (<1.5ms)
  • All media types + generic control streams
  • Simple JACK-like scheduler + feedback loops
  • Extensible: types, protocol, ...
  • External session manager implements policy
slide-6
SLIDE 6

PipeWire | Wim Taymans

22

Session manager

  • Setup of devices
  • DSP processing, effects, mixers, ..
  • Security of clients
  • What they can see, default permissions
  • Management of links/nodes in the graph
  • What nodes and effects to link to (profiles, roles, ..)
  • Suspend of idle devices, volume restore, …
  • The things you want to configure
slide-7
SLIDE 7

PipeWire | Wim Taymans

23

V4l2 capture/sharing

PipeWire-0 Client1 Client2 To screen ... Kernel V4l2 alsa bluetooth va-api DRM

slide-8
SLIDE 8

PipeWire | Wim Taymans

24

Video capture

  • Systemd socket activation in Fedora 29
  • Gstreamer pipewiresrc
  • Device Monitor
  • Autovideosrc → Should work in cheese
slide-9
SLIDE 9

PipeWire | Wim Taymans

25

slide-10
SLIDE 10

PipeWire | Wim Taymans

26

Portal

Wayland screen sharing

PipeWire-0 Mutter Screen Recording Remote Desktop

slide-11
SLIDE 11

PipeWire | Wim Taymans

28

slide-12
SLIDE 12

PipeWire | Wim Taymans

29

Audio Support

  • Pro Audio model like JACK is choosen
  • 1 format (float32)
  • 1 buffer size (but is dynamic in PipeWire)
  • Channels are split into mono streams
  • All nodes are woken up in each cycle in turn
  • Sinks have an audio adapter in front to mix, merge,

resample, split and convert the channels

  • Sinks are created/destroyed dynamically
  • Multiple sinks/sources
  • Automatic clock slaving
slide-13
SLIDE 13

PipeWire | Wim Taymans

30

Audio setup

PipeWire-0

Hw:0

Kernel V4l2 alsa bluetooth va-api DRM Session Manager

Hw:0 a2dp Hw:1

slide-14
SLIDE 14

PipeWire | Wim Taymans

31

Pro audio

PipeWire-0

Hw:0 Hw:0 Scope Ardour

slide-15
SLIDE 15

PipeWire | Wim Taymans

32

Audio stream

  • Takes input from client (asynchronously)
  • Does conversion
  • Resample
  • channelmix/volume
  • Format conversion
  • Channel splitting into DSP
  • Decouples server buffer size from client requested

latency

  • Flush/drain
slide-16
SLIDE 16

PipeWire | Wim Taymans

33

Audio server

PipeWire-0

Hw:0

Media player ... Alsa app Session Manager JACK app

slide-17
SLIDE 17

PipeWire | Wim Taymans

34

API support

  • PulseAudio apps
  • Replacement libpulse.so, libpulse-mainloop-glib.so
  • Built with streams API
  • ALSA apps
  • PipeWire plugin
  • Built with streams API
slide-18
SLIDE 18

PipeWire | Wim Taymans

35

JACK support

  • Integration with device reservation API
  • When JACK claims device, replace our device with

JACK client and we simply become a jack client.

  • For sandboxed apps
  • Replacement libjack.so
  • Built on top of native PipeWire
slide-19
SLIDE 19

PipeWire | Wim Taymans

36

slide-20
SLIDE 20

PipeWire | Wim Taymans

37

slide-21
SLIDE 21

PipeWire | Wim Taymans

38

slide-22
SLIDE 22

PipeWire | Wim Taymans

39

Latest changes (work branch)

  • Unit tests + benchmarks + api cleanups
  • Client permission API
  • MIT relicensed
  • DLL for resampling and audio timing in devices
  • Cursor and bitmap metadata
  • Device objects + profiles
  • Work on pavucontrol (peaks resampler, profiles,

volumes,...)

slide-23
SLIDE 23

PipeWire | Wim Taymans

43

Future plans

  • More Latency/timing handling between nodes
  • More session policy (dynamic samplerate, compressed

formats, ...)

  • Merging devices/clock slaving
  • Transport
  • Video path/effects…
  • JACK handover
  • Implement missing pulseaudio features
  • See https://github.com/PipeWire/pipewire/wiki/TODO
slide-24
SLIDE 24

PipeWire | Wim Taymans

44

http://pipewire.org http://pipewire.org https://github.com/PipeWire/pipewire https://github.com/PipeWire/pipewire Questions? Questions?