Add GetContributionSources to TransformableIncomingAudioFrame

RTPHeader is not exported, so the TransformableIncomingAudioFrame can't be mocked in chrome tests, using a getter instead.

Bug: chromium:1247260
Change-Id: I2af4e6a88b3f4772b3bb50ee0ae9d5c80fed3ae4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278785
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38352}
This commit is contained in:
Sergio Garcia Murillo 2022-10-11 12:34:44 +02:00 committed by WebRTC LUCI CQ
parent 5d17b7e05e
commit 15dfc5a567
2 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,8 @@ class TransformableAudioFrameInterface : public TransformableFrameInterface {
// information in the header as needed, for example to compile the list of
// csrcs.
virtual const RTPHeader& GetHeader() const = 0;
virtual rtc::ArrayView<const uint32_t> GetContributingSources() const = 0;
};
// Objects implement this interface to be notified with the transformed frame.

View File

@ -37,6 +37,9 @@ class TransformableIncomingAudioFrame
uint32_t GetSsrc() const override { return ssrc_; }
uint32_t GetTimestamp() const override { return header_.timestamp; }
const RTPHeader& GetHeader() const override { return header_; }
rtc::ArrayView<const uint32_t> GetContributingSources() const override {
return rtc::ArrayView<const uint32_t>(header_.arrOfCSRCs, header_.numCSRCs);
}
Direction GetDirection() const override { return Direction::kReceiver; }
private: