mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
module-rtp: improve node name and description
Don't auto connect audio either. There are more meant as source/sink pairs.
This commit is contained in:
parent
fcac5298b9
commit
bf9236ec8d
2 changed files with 7 additions and 15 deletions
|
|
@ -826,7 +826,7 @@ short_packet:
|
|||
pw_log_warn("short packet received");
|
||||
return;
|
||||
unknown_ssrc:
|
||||
pw_log_warn("unknown SSRC %08x", ssrc);
|
||||
pw_log_debug("unknown SSRC %08x", ssrc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1069,7 +1069,7 @@ static struct service *make_service(struct impl *impl, const struct service_info
|
|||
struct service *s = NULL;
|
||||
char at[AVAHI_ADDRESS_STR_MAX];
|
||||
struct session *sess;
|
||||
int res;
|
||||
int res, ipv;
|
||||
struct pw_properties *props = NULL;
|
||||
const char *service_name, *str;
|
||||
AvahiStringList *l;
|
||||
|
|
@ -1143,22 +1143,15 @@ static struct service *make_service(struct impl *impl, const struct service_info
|
|||
avahi_address_snprint(at, sizeof(at), &s->info.address);
|
||||
pw_log_info("create session: %s %s:%u %s", s->info.name, at, s->info.port, s->info.type);
|
||||
|
||||
ipv = s->info.protocol == AVAHI_PROTO_INET ? 4 : 6;
|
||||
pw_properties_set(props, "sess.name", s->info.name);
|
||||
pw_properties_setf(props, "node.name", "%s (%s IP%d)",
|
||||
s->info.name, s->info.host_name,
|
||||
s->info.protocol == AVAHI_PROTO_INET ? 4 : 6);
|
||||
pw_properties_setf(props, PW_KEY_NODE_NAME, "rtp_session.%s.%s.ipv%d",
|
||||
s->info.name, s->info.host_name, ipv);
|
||||
pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION, "%s (IPv%d)",
|
||||
s->info.name, ipv);
|
||||
pw_properties_setf(props, "destination.ip", "%s", at);
|
||||
pw_properties_setf(props, "destination.port", "%u", s->info.port);
|
||||
|
||||
if ((str = strstr(s->info.name, "@"))) {
|
||||
str++;
|
||||
if (strlen(str) > 0)
|
||||
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, str);
|
||||
else
|
||||
pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION,
|
||||
"rtp-midi on %s", s->info.host_name);
|
||||
}
|
||||
|
||||
sess = make_session(impl, props);
|
||||
props = NULL;
|
||||
if (sess == NULL) {
|
||||
|
|
|
|||
|
|
@ -385,7 +385,6 @@ struct rtp_stream *rtp_stream_new(struct pw_core *core,
|
|||
case SPA_MEDIA_TYPE_audio:
|
||||
params[n_params++] = spa_format_audio_build(&b,
|
||||
SPA_PARAM_EnumFormat, &impl->info);
|
||||
flags |= PW_STREAM_FLAG_AUTOCONNECT;
|
||||
if (direction == SPA_DIRECTION_INPUT)
|
||||
impl->stream_events.process = process_audio_capture;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue