Commit graph

8 commits

Author SHA1 Message Date
Tony Herre
36500ab634 Move RTPTimestamp offset handling out of encoded transform delegate
Keep the logic managing whether audio RTP timestamps have the random
start offset added or not inside ChannelSend, so that the
ChannelSendFrameTransformerDelegate doesn't need to worry about it.
Crucially, this means that frames moved between senders by encoded
transforms clients will always use the correct offset for the channel
where we actually get sent.

Also rename TS variables throughout both classes to be explicit over
whether the offset has been added or not.

Bug: chromium:1464847
Change-Id: I19955ec4c1cb834161b00dd74622725a070b713a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317900
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40655}
2023-08-29 12:28:41 +00:00
Tony Herre
097a4decc2 Make all encodedaudioframes inherit from TransformableAudioFrameI'face
Make outgoing encoded audio frames inherit from the same Audio interface
that incoming frames inherit from, to align them and make it possible to
eg clone frames regardless of their direction.

Also begin removing GetHeader() from the Audio interface, replacing it
with getters for the specific values we actually need to propagate in
the API: sequence number and CSRCs. This makes it much easier to treat
incoming and outgoing frames the same, even if they don't have full
RtpHeaders prepared at the point of the transform.

Bug: chromium:1453226
Change-Id: Ib5b39b30dea8a378b3b26efb1589dfd64741d201
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308141
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40309}
2023-06-19 18:54:47 +00:00
Tove Petersson
1e2d951762 Add a clone method to the audio frame transformer API.
This will clone an encoded audio frame into a sender frame.

Bug: webrtc:14949
Change-Id: Ie62d9f5ec457541b335bde8f2f6e9b6d24704cf6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294560
Commit-Queue: Tove Petersson <tovep@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39480}
2023-03-06 08:22:25 +00:00
Artem Titov
b0ea637ec2 Use backticks not vertical bars to denote variables in comments for /audio
Bug: webrtc:12338
Change-Id: Ief89269aa39d0cb6749a1c6cc995ce8830ca327f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226942
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34564}
2021-07-27 15:36:40 +00:00
Artem Titov
d15a575ec3 Use SequenceChecker from public API
Bug: webrtc:12419
Change-Id: I00cca16a0ec70246156ba00b97aa7ae5ccbf5364
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205323
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33220}
2021-02-10 15:04:55 +00:00
Markus Handell
6287280d64 Migrate audio/ to use webrtc::Mutex
Bug: webrtc:11567
Change-Id: Ic6a753f09aafb508690f4b8dadd4c99433fcfeb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176741
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31635}
2020-07-06 14:21:38 +00:00
Philipp Hancke
b9d468573a insertable streams: include rtp_timestamp offset for audio
includes the (random) rtp start offset in the timestamp passed to the frame transformer callback

Bug: chromium:1069278
Change-Id: I7d10130404d93df7cee3b8f87a0b780801a51415
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173329
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31067}
2020-04-14 14:54:07 +00:00
Marina Ciocea
65674d83e1 Transform encoded frames in ChannelSend.
This change is part of the implementation of the Insertable Streams Web
API: https://github.com/alvestrand/webrtc-media-streams/blob/master/explainer.md

Design doc for WebRTC library changes:
http://doc/1eiLkjNUkRy2FssCPLUp6eH08BZuXXoHfbbBP1ZN7EVk

Bug: webrtc:11380
Change-Id: I75444283ddb7f8db742687b497bf532c6dda47be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171871
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30952}
2020-03-31 21:59:26 +00:00