Commit graph

2 commits

Author SHA1 Message Date
Jakob Ivarsson
db208317eb Update RTP timestamp based on capture timestamp when audio send stream is resumed.
This removes the previous approach where we continued to update the timestamp when the capturer is running but the send stream is stopped in favor of a more general approach that also works when the capturer is paused.

Some assumptions for this change to be correct: input sample rate and frame size will be the same before/after the stream is paused.

Bug: webrtc:12397
Change-Id: I3b03741cd6d3285cbc9aee3893800729852e6cfa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291526
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39213}
2023-01-27 15:46:32 +00:00
Jakob Ivarsson
dcb09ff218 Reset encoder when audio send stream is stopped.
This is to clear any remaining buffers and other state such as the next packet timestamp.

Bug: webrtc:12397
Change-Id: I2ef9a6f7254d82a69a2896ec8aa619ced2694fb8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291327
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39206}
2023-01-26 15:20:02 +00:00