Add method SetTimestamp in TransformableAudioFrameInterface
This change will make it possible to let us modify timestamp in RTCEncodedAudioFrame. Change-Id: I97e9571c258fd718d6c211014f1476ca46c78097 Bug: webrtc:14709 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307501 Reviewed-by: Tony Herre <herre@google.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Palak Agarwal <agpalak@google.com> Cr-Commit-Position: refs/heads/main@{#40238}
This commit is contained in:
parent
3403acb3c6
commit
fc260a1878
@ -72,6 +72,7 @@ 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 void SetRTPTimestamp(uint32_t timestamp) { RTC_CHECK_NOTREACHED(); }
|
||||
|
||||
virtual rtc::ArrayView<const uint32_t> GetContributingSources() const = 0;
|
||||
};
|
||||
|
||||
@ -24,6 +24,7 @@ class MockTransformableAudioFrame : public TransformableAudioFrameInterface {
|
||||
MOCK_METHOD(uint32_t, GetSsrc, (), (const, override));
|
||||
MOCK_METHOD(uint32_t, GetTimestamp, (), (const, override));
|
||||
MOCK_METHOD(RTPHeader&, GetHeader, (), (const override));
|
||||
MOCK_METHOD(void, SetRTPTimestamp, (uint32_t), (override));
|
||||
MOCK_METHOD(rtc::ArrayView<const uint32_t>,
|
||||
GetContributingSources,
|
||||
(),
|
||||
|
||||
@ -33,6 +33,10 @@ class TransformableIncomingAudioFrame
|
||||
payload_.SetData(data.data(), data.size());
|
||||
}
|
||||
|
||||
void SetRTPTimestamp(uint32_t timestamp) override {
|
||||
header_.timestamp = timestamp;
|
||||
}
|
||||
|
||||
uint8_t GetPayloadType() const override { return header_.payloadType; }
|
||||
uint32_t GetSsrc() const override { return ssrc_; }
|
||||
uint32_t GetTimestamp() const override { return header_.timestamp; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user