mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
module-rtp: resync after paused state
After the paused state, resync to the new clock time.
This commit is contained in:
parent
dd0d3ac264
commit
aa3b776f6f
1 changed files with 5 additions and 0 deletions
|
|
@ -382,6 +382,7 @@ static void stream_process(void *data)
|
||||||
if (!impl->sync) {
|
if (!impl->sync) {
|
||||||
pw_log_info("sync to timestamp %u", timestamp);
|
pw_log_info("sync to timestamp %u", timestamp);
|
||||||
impl->ring.readindex = impl->ring.writeindex = timestamp;
|
impl->ring.readindex = impl->ring.writeindex = timestamp;
|
||||||
|
memset(impl->buffer, 0, BUFFER_SIZE);
|
||||||
impl->sync = true;
|
impl->sync = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -421,6 +422,9 @@ static void on_stream_state_changed(void *d, enum pw_stream_state old,
|
||||||
case PW_STREAM_STATE_ERROR:
|
case PW_STREAM_STATE_ERROR:
|
||||||
pw_log_error("stream error: %s", error);
|
pw_log_error("stream error: %s", error);
|
||||||
break;
|
break;
|
||||||
|
case PW_STREAM_STATE_PAUSED:
|
||||||
|
impl->sync = false;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -502,6 +506,7 @@ static int make_socket(struct sockaddr_storage *src, socklen_t src_len,
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &val, sizeof(val)) < 0)
|
if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &val, sizeof(val)) < 0)
|
||||||
pw_log_warn("setsockopt(SO_PRIORITY) failed: %m");
|
pw_log_warn("setsockopt(SO_PRIORITY) failed: %m");
|
||||||
#endif
|
#endif
|
||||||
|
/* FIXME AES67 wants IPTOS_DSCP_AF41 */
|
||||||
val = IPTOS_LOWDELAY;
|
val = IPTOS_LOWDELAY;
|
||||||
if (setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof(val)) < 0)
|
if (setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof(val)) < 0)
|
||||||
pw_log_warn("setsockopt(IP_TOS) failed: %m");
|
pw_log_warn("setsockopt(IP_TOS) failed: %m");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue