Implement a single command that allows viewing all information about a remotes properties/parameters and info variables. This patch creates a framework for accessing properties using a simple dotted variable access method or JSON/YAML path expressions. The root of the tree is a sequence of all globals objects, and accessing a the first one is simply 0 (or /0 is JSON/YAML path form). pipewire-0>>graph 0 id: 0 type: PipeWire:Interface:Core permissions: rwx version: 3 info: id: 0 cookie: 1602594817 user_name: panto host_name: nuc2 version: 0.2.96 name: pipewire-0 change_mask: props props: pipewire.core.name: pipewire-0 context.profile.modules: none pipewire.core.daemon: 1 link.max-buffers: 16 default.clock.rate: 48000 default.clock.quantum: 1024 default.clock.min-quantum: 32 default.clock.max-quantum: 8192 default.video.width: 640 default.video.height: 480 default.video.rate.num: 25 default.video.rate.denom: 1 mem.allow-mlock: true cpu.max-align: 32 object.id: 0 properties: pipewire.core.name: pipewire-0 Displaying a nodes information is simply: pipewire-0>>graph /32 id: 32 type: PipeWire:Interface:Node permissions: rwx version: 3 info: id: 32 max_input_ports: 128 max_output_ports: 0 n_input_ports: 2 n_output_ports: 2 state: suspended error: change_mask: "n_input_ports,n_output_ports,state,props,params" props: object.path: alsa:pcm:HDMI:3:playback api.alsa.path: "hw:0,3" api.alsa.pcm.card: 0 api.alsa.pcm.device: 3 api.alsa.pcm.subdevice: 0 api.alsa.pcm.stream: playback api.alsa.pcm.id: "HDMI 0" api.alsa.pcm.name: "HDMI 0" api.alsa.pcm.subname: "subdevice #0" api.alsa.pcm.class: generic api.alsa.pcm.subclass: generic-mix api.alsa.pcm.sync-id: 00000000:00000000:00000000:00000000 device.id: 26 factory.name: api.alsa.pcm.sink priority.master: 696 priority.session: 696 media.class: Audio/Sink node.name: alsa_card.pci-0000:00:03.0.playback.3.0 node.description: "Built-in Audio (HDMI 0)" factory.id: 17 client.id: 24 device.api: alsa node.driver: true factory.mode: merge audio.adapt.slave: library.name: audioconvert/libspa-audioconvert object.id: 32 params: EnumFormat: mediaType: audio mediaSubtype: raw format: default: S32LE alt0: S32LE alt1: S16LE rate: default: 48000 min: 32000 max: 48000 channels: 2 position: - FL - FR PropInfo: - id: volume name: Volume type: default: 1.000000 min: 0.000000 max: 10.000000 - id: mute name: Mute type: default: false alt0: false alt1: true - id: channelVolumes name: "Channel Volumes" type: default: 1.000000 min: 0.000000 max: 10.000000 Props: volume: 1.000000 mute: false channelVolumes: [] Format: {} EnumPortConfig: - direction: Input mode: dsp - direction: Output mode: dsp - direction: Input mode: convert - direction: Output mode: convert PortConfig: {} properties: object.path: alsa:pcm:HDMI:3:playback factory.id: 17 client.id: 24 device.id: 26 priority.session: 696 priority.master: 696 node.description: "Built-in Audio (HDMI 0)" node.name: alsa_card.pci-0000:00:03.0.playback.3.0 media.class: Audio/Sink To simply display the parameters of the same object: pipewire-0>>graph 32/info/params EnumFormat: mediaType: audio mediaSubtype: raw format: default: S32LE alt0: S32LE alt1: S16LE rate: default: 48000 min: 32000 max: 48000 channels: 2 position: - FL - FR PropInfo: - id: volume name: Volume type: default: 1.000000 min: 0.000000 max: 10.000000 - id: mute name: Mute type: default: false alt0: false alt1: true - id: channelVolumes name: "Channel Volumes" type: default: 1.000000 min: 0.000000 max: 10.000000 Props: volume: 1.000000 mute: false channelVolumes: [] Format: {} EnumPortConfig: - direction: Input mode: dsp - direction: Output mode: dsp - direction: Input mode: convert - direction: Output mode: convert PortConfig: {} The graph command also supports the following options: -y Select YAML format (this is the default) -j Select JSON format -n Display numeric instead of textual IDs -f Display full type info, i.e. instead of EnumFormat will display Spa:Enum:ParamId:EnumFormat Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> |
||
|---|---|---|
| doc | ||
| man | ||
| pipewire-alsa | ||
| pipewire-jack | ||
| pipewire-pulseaudio | ||
| po | ||
| spa | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| _config.yml | ||
| autogen.sh | ||
| check_missing_headers.sh | ||
| CODE_OF_CONDUCT.md | ||
| config.h.meson | ||
| COPYING | ||
| LICENSE | ||
| Makefile.in | ||
| meson.build | ||
| meson_options.txt | ||
| NEWS | ||
| PROTOCOL | ||
| pw-uninstalled.sh | ||
| README.md | ||
PipeWire
PipeWire is a server and user space API to deal with multimedia pipelines. This includes:
- Making available sources of video (such as from a capture devices or application provided streams) and multiplexing this with clients.
- Accessing sources of video for consumption.
- Generating graphs for audio and video processing.
Nodes in the graph can be implemented as separate processes, communicating with sockets and exchanging multimedia content using fd passing.
Building
Pipewire uses the Meson and Ninja build system to compile. You can run it with:
$ meson build
$ cd build
$ ninja
You can see the available meson options in meson_options.txt file.
If you're not familiar with these tools, the included autogen.sh script will
automatically run the correct meson/ninja commands, and output a Makefile.
It follows that there are two methods to build Pipewire, however both rely
on Meson and Ninja to actually perform the compilation:
$ ./autogen.sh
$ make
Running
If you want to run PipeWire without installing it on your system, there is a script that you can run. This puts you in an environment in which PipeWire can be run from the build directory, and ALSA, PulseAudio and JACK applications will use the PipeWire emulation libraries automatically in this environment. You can get into this environment with:
$ ./pw-uninstalled.sh