Wim Taymans
cfa0e7da0b
filter: add support for locked params
...
Lock the params so that they won't disappear.
2020-03-02 12:34:05 +01:00
Wim Taymans
77a8dcece9
stream: add support for locked params
...
Lock the IOBuffers param so that it won't disappear ever.
2020-03-02 12:28:48 +01:00
Wim Taymans
0ed86941ce
client-node: only return -ENOENT for unknown param
...
Always iterate all params because we are only supposed to
return -ENOENT for unknown params and if we start iterating at some
random start position we might be past the paran and report -ENOENT
wrongly.
2020-03-02 12:26:10 +01:00
Wim Taymans
847ee8f064
metadata: fix cleanup
...
When the global is destroyed, free the resource.
When the resource is freed, destroy the global.
Make sure any bound resources are freed when the global is destroyed
by calling pw_global_add_resource().
2020-03-02 10:49:04 +01:00
Wim Taymans
77cc58ba71
protocol-native: improve bool in set_active
2020-03-02 10:48:31 +01:00
Wim Taymans
33102abe4d
pw-cat: dump midi events in vebose mode
2020-03-01 20:39:46 +01:00
Wim Taymans
70fc09b891
midifile: add support for event dump
...
Make a method to dump event info to stdout.
2020-03-01 20:39:07 +01:00
Wim Taymans
3b1fc4acce
midifile: put some parsed data in the event
...
Put some of the data we parsed into the event.
2020-03-01 20:37:50 +01:00
Wim Taymans
5498483337
filter: add support for control ports
2020-03-01 20:36:55 +01:00
Wim Taymans
2982b9511e
pw-cat: simplify midi reading and writing
2020-02-28 20:35:28 +01:00
Wim Taymans
c3b550478a
pod: document that the choice array might have excess elements
...
The choice array might have excess elements when the type has been
changed, for example by fixation. This is not a problem and the
excess elements should simply be ignored.
2020-02-27 16:23:12 +01:00
Wim Taymans
a3582f0e0f
pw-cat: add midi recording
2020-02-27 15:37:12 +01:00
Wim Taymans
d31d6b59f1
port: debug the number of buffers as well
2020-02-27 13:47:40 +01:00
Wim Taymans
09186844c4
port: don't try to negotiate 0 buffers
...
Don't try to negotiate buffers when we are clearing the buffers.
2020-02-27 13:39:59 +01:00
Wim Taymans
d39dbceb2a
port: copy error string in update_state
...
update_state will free the error string later so we need to make
a copy of static strings.
2020-02-27 13:28:06 +01:00
Wim Taymans
b7dbf4bbc1
pw-cat: rework midifile a little
...
Move the code to read and write midi into the midifile helper
and simplify things a bit.
2020-02-27 12:42:21 +01:00
Wim Taymans
edbf1ff500
param_info: always copy the param_info
...
always copy the param_info so that we have the ID correct (even when
the flags remain unchanged)
2020-02-26 12:06:02 +01:00
Wim Taymans
bcdd47273d
jack: call buffer_size callback right after activate
...
Some jack clients expect this callback right after activate.
Should fix jackaudiosink in gstreamer.
2020-02-25 18:02:49 +01:00
Wim Taymans
65d72bb87c
improve error messages
...
Send create_object error messages to the new resource id so that
the client can better know what proxy is failing.
Use resource_remove when create_object fails because the core will
already send a remove_id on failure.
Try to send other errors to the proxy that made the request if
possible.
2020-02-25 16:38:13 +01:00
Wim Taymans
b96daabb2f
link-factory: send errors to the proxy of the new link
...
Sending the errors to the proxy id allows the client to know something
is wrong with the proxy and deal with it better.
Use the port global id in the error message.
2020-02-25 15:07:49 +01:00
Wim Taymans
278cc9f90a
resource: add function to send error to another resource
...
Make a function to send an error to another resource. This can be
used to send errors to proxies that now have a resource associated
with them, like in error cases.
2020-02-25 15:05:51 +01:00
Wim Taymans
1ab6167f35
port: add function to get port info
2020-02-25 15:05:31 +01:00
Wim Taymans
0b4d3aee46
pulse: add some return_*if_fail
2020-02-25 14:28:01 +01:00
Wim Taymans
d43f8011b8
utils: print error in spa_return_*if_fail()
...
These are really programming errors that need to be logged.
2020-02-25 14:25:00 +01:00
Wim Taymans
cc00e87bdd
param: fix types of params
2020-02-25 13:26:31 +01:00
Wim Taymans
f37b9ad67b
impl-node: fix reposition handling
...
We only need to sync clients when start/stop has been issued otherwise
we simply write the new position values in the driver segment.
Don't overwrite bar/video position info with invalid values.
2020-02-24 16:49:07 +01:00
Wim Taymans
a4d744e3cf
jack: improve sample_rate callback
...
Call the sample rate callback when we install it and we know the
sample rate. Otherwise, the sample rate callback might never be
triggered.
2020-02-24 15:39:19 +01:00
Wim Taymans
cde7fa797c
jack: improve timemaster install
...
When we get the driver activation try to install ourselves as
timemaster.
2020-02-24 15:38:21 +01:00
Wim Taymans
41989f4889
client-node: don't overwrite the chunk memory pointer
...
When the client uploads a buffer, copy all data fields except for
the chunk memory that we configured before.
If we overwrite the chunk memory, the users of the buffer would not
be able to find the chunk memory anymore and crash or fail.
2020-02-24 15:08:27 +01:00
Wim Taymans
9e44b957f0
jack: check arguments
...
Guard against some evil jack clients
2020-02-24 11:25:31 +01:00
Wim Taymans
9bec2e5d8a
pw-cat: improve midi errors
...
EINVAL for invalid events and file
ENOENT for unknown event
2020-02-24 10:20:33 +01:00
Wim Taymans
8ecef35e80
client-node: update n_buffers after we can process them
...
Make sure we don't configure the buffers before we manage to
completely process them or else we are left with an invalid list
of buffers.
See #209
2020-02-24 10:20:33 +01:00
Wim Taymans
e205523f0a
docs: update docs
2020-02-24 10:20:33 +01:00
Fabrice Fontaine
a269bc0bed
meson: add tests option
...
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-02-23 00:09:16 +01:00
Wim Taymans
792402849f
stream: print error
2020-02-22 13:50:20 +01:00
Wim Taymans
81a7908d44
filter: print error
2020-02-22 13:50:20 +01:00
Wim Taymans
9cdcd07c02
example: update example
2020-02-22 13:50:20 +01:00
Wim Taymans
e31bfc78ac
videotestsrc: mark as driver by default
2020-02-21 16:49:53 +01:00
Wim Taymans
f9dccccf91
spa-node: fix properties while loading.
...
Update the example in the config file to load a spa node
2020-02-21 16:27:00 +01:00
Wim Taymans
9e625441ad
videotestsrc: implement enum port-io
2020-02-21 16:25:55 +01:00
Wim Taymans
90968bbb40
testsrc: implement suspend
2020-02-21 16:24:41 +01:00
George Kiagiadakis
04b1881211
doc: add documentation about the design of media & session management objects
2020-02-21 14:15:27 +00:00
Pantelis Antoniou
b445bdea27
Fix change_mask string generation
...
The change_mask string generation was buggy and confusing.
Fix it with something more usable.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-02-21 15:14:31 +01:00
Wim Taymans
5517a96202
link: don't try to do things with destroyed ports
...
When a port is destroyed, mark it as destroyed and avoid doing things
with the port because it is likely to fail.
2020-02-21 15:08:28 +01:00
Wim Taymans
5074ca37ff
protocol-native: Improve errors
...
A missing XDG_RUNTIME_DIR results in ENOENT, like on the server
side.
A too long name results in ENAMETOOLONG, like on the server side.
When we can't find the socket, return EHOSTDOWN to make it more
obvious what is going.
2020-02-21 15:05:43 +01:00
Wim Taymans
b33bd68bac
improve error messages
...
Log an error when we send an error to the client so that we don't need
to log and error anymore.
Improve the error messages when we can
Move some warnings and errors to debug
2020-02-21 15:02:55 +01:00
Wim Taymans
ee617682c3
audioconvert: implement Portconfig query
2020-02-21 14:59:38 +01:00
Wim Taymans
918acd61ef
pw-cli: use core object to map id to proxy
...
We can use the core object to get a proxy for a given id. From there
we can find the user data and the associated global if any.
2020-02-21 11:47:34 +01:00
Pantelis Antoniou
4175191d19
Fix printf attribute compilation errors
...
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-02-21 11:30:49 +01:00
Pantelis Antoniou
7ead270265
Implement JSON/YAML command for graph tree traversal
...
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>
2020-02-21 11:30:49 +01:00