mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pipewire: module-roc-{sink,source}: port to ROC v0.3.X
ROC 0.3 introduced breaking changes, so adjust the code. Also set the minimum supported ROC version to 0.3.0. Fixes #3667
This commit is contained in:
parent
5d62bf5c06
commit
333fd8d2ae
6 changed files with 11 additions and 12 deletions
|
|
@ -624,7 +624,7 @@ if build_module_raop
|
|||
endif
|
||||
summary({'raop-sink (requires OpenSSL)': build_module_raop}, bool_yn: true, section: 'Optional Modules')
|
||||
|
||||
roc_dep = dependency('roc', required: get_option('roc'))
|
||||
roc_dep = dependency('roc', version: '>= 0.3.0', required: get_option('roc'))
|
||||
summary({'ROC': roc_dep.found()}, bool_yn: true, section: 'Streaming between daemons')
|
||||
|
||||
pipewire_module_rtp_source = shared_library('pipewire-module-rtp-source',
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
static const char *const pulse_module_options =
|
||||
"sink=<name for the sink> "
|
||||
"sink_input_properties=<properties for the sink_input> "
|
||||
"resampler_profile=<empty>|disable|high|medium|low "
|
||||
"resampler_profile=<empty>|high|medium|low "
|
||||
"fec_code=<empty>|disable|rs8m|ldpc "
|
||||
"sess_latency_msec=<target network latency in milliseconds> "
|
||||
"local_ip=<local receiver ip> "
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
static const char *const pulse_module_options =
|
||||
"source_name=<name for the source> "
|
||||
"source_properties=<properties for the source> "
|
||||
"resampler_profile=<empty>|disable|high|medium|low "
|
||||
"resampler_profile=<empty>|high|medium|low "
|
||||
"fec_code=<empty>|disable|rs8m|ldpc "
|
||||
"sess_latency_msec=<target network latency in milliseconds> "
|
||||
"local_ip=<local receiver ip> "
|
||||
|
|
|
|||
|
|
@ -259,11 +259,11 @@ static int roc_sink_setup(struct module_roc_sink_data *data)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
memset(&sender_config, 0, sizeof(sender_config));
|
||||
spa_zero(sender_config);
|
||||
|
||||
sender_config.frame_sample_rate = data->rate;
|
||||
sender_config.frame_channels = ROC_CHANNEL_SET_STEREO;
|
||||
sender_config.frame_encoding = ROC_FRAME_ENCODING_PCM_FLOAT;
|
||||
sender_config.frame_encoding.rate = data->rate;
|
||||
sender_config.frame_encoding.channels = ROC_CHANNEL_LAYOUT_STEREO;
|
||||
sender_config.frame_encoding.format = ROC_FORMAT_PCM_FLOAT32;
|
||||
sender_config.fec_encoding = data->fec_code;
|
||||
|
||||
info.rate = data->rate;
|
||||
|
|
|
|||
|
|
@ -268,9 +268,10 @@ static int roc_source_setup(struct module_roc_source_data *data)
|
|||
}
|
||||
|
||||
spa_zero(receiver_config);
|
||||
receiver_config.frame_sample_rate = data->rate;
|
||||
receiver_config.frame_channels = ROC_CHANNEL_SET_STEREO;
|
||||
receiver_config.frame_encoding = ROC_FRAME_ENCODING_PCM_FLOAT;
|
||||
|
||||
receiver_config.frame_encoding.rate = data->rate;
|
||||
receiver_config.frame_encoding.channels = ROC_CHANNEL_LAYOUT_STEREO;
|
||||
receiver_config.frame_encoding.format = ROC_FORMAT_PCM_FLOAT32;
|
||||
receiver_config.resampler_profile = data->resampler_profile;
|
||||
|
||||
info.rate = data->rate;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ static inline int pw_roc_parse_resampler_profile(roc_resampler_profile *out, con
|
|||
{
|
||||
if (!str || !*str)
|
||||
*out = ROC_RESAMPLER_PROFILE_DEFAULT;
|
||||
else if (spa_streq(str, "disable"))
|
||||
*out = ROC_RESAMPLER_PROFILE_DISABLE;
|
||||
else if (spa_streq(str, "high"))
|
||||
*out = ROC_RESAMPLER_PROFILE_HIGH;
|
||||
else if (spa_streq(str, "medium"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue