mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-07-04 00:06:43 -04:00
module-rtp: Cleanup default raw / raop formats
This places the default formats into a single place, which makes it easier to keep track of them.
This commit is contained in:
parent
505b3c6807
commit
6c3fd1f07f
6 changed files with 8 additions and 7 deletions
|
|
@ -149,7 +149,7 @@ PW_LOG_TOPIC(mod_topic, "mod." NAME);
|
|||
|
||||
#define MAX_PORT_RETRY 128
|
||||
|
||||
#define RAOP_FORMAT "S16LE"
|
||||
#define RAOP_FORMAT DEFAULT_RAOP_AUDIO_FORMAT
|
||||
#define RAOP_STRIDE (2*DEFAULT_CHANNELS)
|
||||
#define RAOP_RATE 44100
|
||||
#define RAOP_LATENCY_MS 250
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ PW_LOG_TOPIC(mod_topic, "mod." NAME);
|
|||
"( sess.min-ptime=<minimum packet time in milliseconds, default:2> ) " \
|
||||
"( sess.max-ptime=<maximum packet time in milliseconds, default:20> ) " \
|
||||
"( sess.media=<string, the media type audio|midi|opus, default midi> ) " \
|
||||
"( audio.format=<format, default:"DEFAULT_FORMAT"> ) " \
|
||||
"( audio.format=<format, default:"DEFAULT_RAW_AUDIO_FORMAT"> ) " \
|
||||
"( audio.rate=<sample rate, default:"SPA_STRINGIFY(DEFAULT_RATE)"> ) " \
|
||||
"( audio.channels=<number of channels, default:"SPA_STRINGIFY(DEFAULT_CHANNELS)"> ) "\
|
||||
"( audio.position=<channel map, default:"DEFAULT_POSITION"> ) " \
|
||||
|
|
@ -1624,7 +1624,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
|
||||
if (spa_streq(str, "audio")) {
|
||||
struct spa_dict_item items[] = {
|
||||
{ "audio.format", DEFAULT_FORMAT },
|
||||
{ "audio.format", DEFAULT_RAW_AUDIO_FORMAT },
|
||||
{ "audio.rate", SPA_STRINGIFY(DEFAULT_RATE) },
|
||||
{ "audio.channels", SPA_STRINGIFY(DEFAULT_CHANNELS) },
|
||||
{ "audio.position", DEFAULT_POSITION } };
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ PW_LOG_TOPIC(mod_topic, "mod." NAME);
|
|||
"( sess.min-ptime=<minimum packet time in milliseconds, default:2> ) " \
|
||||
"( sess.max-ptime=<maximum packet time in milliseconds, default:20> ) " \
|
||||
"( sess.media=<string, the media type audio|midi|opus, default audio> ) " \
|
||||
"( audio.format=<format, default:"DEFAULT_FORMAT"> ) " \
|
||||
"( audio.format=<format, default:"DEFAULT_RAW_AUDIO_FORMAT"> ) " \
|
||||
"( audio.rate=<sample rate, default:"SPA_STRINGIFY(DEFAULT_RATE)"> ) " \
|
||||
"( audio.channels=<number of channels, default:"SPA_STRINGIFY(DEFAULT_CHANNELS)"> ) " \
|
||||
"( audio.position=<channel map, default:"DEFAULT_POSITION"> ) " \
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ PW_LOG_TOPIC(mod_topic, "mod." NAME);
|
|||
"( sess.latency.msec=<target network latency, default "SPA_STRINGIFY(DEFAULT_SESS_LATENCY)"> ) "\
|
||||
"( sess.ignore-ssrc=<to ignore SSRC, default false> ) "\
|
||||
"( sess.media=<string, the media type audio|midi|opus, default audio> ) " \
|
||||
"( audio.format=<format, default:"DEFAULT_FORMAT"> ) " \
|
||||
"( audio.format=<format, default:"DEFAULT_RAW_AUDIO_FORMAT"> ) " \
|
||||
"( audio.rate=<sample rate, default:"SPA_STRINGIFY(DEFAULT_RATE)"> ) " \
|
||||
"( audio.channels=<number of channels, default:"SPA_STRINGIFY(DEFAULT_CHANNELS)"> ) " \
|
||||
"( audio.position=<channel map, default:"DEFAULT_POSITION"> ) " \
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ static int parse_audio_info(const struct pw_properties *props, struct spa_audio_
|
|||
{
|
||||
return spa_audio_info_raw_init_dict_keys(info,
|
||||
&SPA_DICT_ITEMS(
|
||||
SPA_DICT_ITEM(SPA_KEY_AUDIO_FORMAT, DEFAULT_FORMAT),
|
||||
SPA_DICT_ITEM(SPA_KEY_AUDIO_FORMAT, DEFAULT_RAW_AUDIO_FORMAT),
|
||||
SPA_DICT_ITEM(SPA_KEY_AUDIO_RATE, SPA_STRINGIFY(DEFAULT_RATE)),
|
||||
SPA_DICT_ITEM(SPA_KEY_AUDIO_POSITION, DEFAULT_POSITION)),
|
||||
&props->dict,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ extern "C" {
|
|||
|
||||
struct rtp_stream;
|
||||
|
||||
#define DEFAULT_FORMAT "S16BE"
|
||||
#define DEFAULT_RAW_AUDIO_FORMAT "S16BE"
|
||||
#define DEFAULT_RAOP_AUDIO_FORMAT "S16LE"
|
||||
#define DEFAULT_RATE 48000
|
||||
#define DEFAULT_CHANNELS 2
|
||||
#define DEFAULT_POSITION "[ FL FR ]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue