modules: Allow roc source/sink to be used as native modules
Move the implementation of roc source and sink so that they can be used as pipewire native modules and make the pulse module implementation use those.
For testing,
On remote machine
pactl load-module module-roc-source source_name=roc-source sess_latency_msec=5000 resampler_profile=high
Note that for smooth playback, the sess_latency_msec
will have to be specified depending on network.
On local machine
pactl load-module module-roc-sink remote_ip=192.168.0.144 sink_name=roc-sink
gst-launch-1.0 -v filesrc location=jambi.mp3 ! mpegaudioparse ! mpg123audiodec ! audio/x-raw,format=S32LE,channels=2,rate=44100 ! pipewiresink
Do the necessary change in pavucontrol
.
Or add the following to pipewire-pulse.conf
, if not using pactl
.
On sender,
{ name = libpipewire-module-roc-sink
args = {
local.ip = 0.0.0.0
remote.ip = 192.168.0.144
remote.source.port = 10001
remote.repair.port = 10002
sink.props = {
node.name = "roc-sink"
}
}
}
On receiver,
{ name = libpipewire-module-roc-source
args = {
local.ip = 0.0.0.0
resampler.profile = medium
sess.latency.msec = 5000
local.source.port = 10001
local.repair.port = 10002
source.props = {
node.name = "roc-source"
}
}
}
Edited by Sanchayan Maity