Modifying MediaChannel to accept CopyOnWriteBuffer by value.
MediaChannel accepted the RtpPacket buffers through non-const pointer. This is both unclear and introduces questions regarding if the buffer is actually copied or not. This change modifies the method to accept by value to reduce ambiguity. Usage of the non-const data() method which could potentially copy the buffer contents is also reduced in favor of cdata() which never copies. Bug: None Change-Id: I3b2daef0d31cb6aacceb46c86da3a40ce836242b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127340 Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Seth Hampson <shampson@webrtc.org> Commit-Queue: Amit Hilbuch <amithi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27090}
This commit is contained in:
@ -201,9 +201,9 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
|
||||
bool CanInsertDtmf() override;
|
||||
bool InsertDtmf(uint32_t ssrc, int event, int duration) override;
|
||||
|
||||
void OnPacketReceived(rtc::CopyOnWriteBuffer* packet,
|
||||
void OnPacketReceived(rtc::CopyOnWriteBuffer packet,
|
||||
int64_t packet_time_us) override;
|
||||
void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet,
|
||||
void OnRtcpReceived(rtc::CopyOnWriteBuffer packet,
|
||||
int64_t packet_time_us) override;
|
||||
void OnNetworkRouteChanged(const std::string& transport_name,
|
||||
const rtc::NetworkRoute& network_route) override;
|
||||
|
||||
Reference in New Issue
Block a user