mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Remove deprecated SendRtp and SendRtcp functions
and delete remaining usages. Bug: webrtc:15410 Change-Id: I912bedca80a5a446a3f770211d164a5eb0af02bb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320520 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40766}
This commit is contained in:
parent
090699a01b
commit
e14d122a7b
3 changed files with 8 additions and 30 deletions
|
@ -45,29 +45,9 @@ struct PacketOptions {
|
|||
|
||||
class Transport {
|
||||
public:
|
||||
// New style functions. Default implementations are to accomodate
|
||||
// subclasses that haven't been converted to new style yet.
|
||||
// TODO(bugs.webrtc.org/14870): Deprecate and remove old functions.
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
virtual bool SendRtp(rtc::ArrayView<const uint8_t> packet,
|
||||
const PacketOptions& options) {
|
||||
return SendRtp(packet.data(), packet.size(), options);
|
||||
}
|
||||
virtual bool SendRtcp(rtc::ArrayView<const uint8_t> packet) {
|
||||
return SendRtcp(packet.data(), packet.size());
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
// Old style functions.
|
||||
[[deprecated("Use ArrayView version")]] virtual bool
|
||||
SendRtp(const uint8_t* packet, size_t length, const PacketOptions& options) {
|
||||
return SendRtp(rtc::MakeArrayView(packet, length), options);
|
||||
}
|
||||
[[deprecated("Use ArrayView version")]] virtual bool SendRtcp(
|
||||
const uint8_t* packet,
|
||||
size_t length) {
|
||||
return SendRtcp(rtc::MakeArrayView(packet, length));
|
||||
}
|
||||
const PacketOptions& options) = 0;
|
||||
virtual bool SendRtcp(rtc::ArrayView<const uint8_t> packet) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~Transport() {}
|
||||
|
|
|
@ -427,10 +427,9 @@ void AndroidVoipClient::SendRtpPacket(const std::vector<uint8_t>& packet_copy) {
|
|||
}
|
||||
}
|
||||
|
||||
bool AndroidVoipClient::SendRtp(const uint8_t* packet,
|
||||
size_t length,
|
||||
bool AndroidVoipClient::SendRtp(rtc::ArrayView<const uint8_t> packet,
|
||||
const webrtc::PacketOptions& options) {
|
||||
std::vector<uint8_t> packet_copy(packet, packet + length);
|
||||
std::vector<uint8_t> packet_copy(packet.begin(), packet.end());
|
||||
voip_thread_->PostTask([this, packet_copy = std::move(packet_copy)] {
|
||||
SendRtpPacket(packet_copy);
|
||||
});
|
||||
|
@ -447,8 +446,8 @@ void AndroidVoipClient::SendRtcpPacket(
|
|||
}
|
||||
}
|
||||
|
||||
bool AndroidVoipClient::SendRtcp(const uint8_t* packet, size_t length) {
|
||||
std::vector<uint8_t> packet_copy(packet, packet + length);
|
||||
bool AndroidVoipClient::SendRtcp(rtc::ArrayView<const uint8_t> packet) {
|
||||
std::vector<uint8_t> packet_copy(packet.begin(), packet.end());
|
||||
voip_thread_->PostTask([this, packet_copy = std::move(packet_copy)] {
|
||||
SendRtcpPacket(packet_copy);
|
||||
});
|
||||
|
|
|
@ -118,10 +118,9 @@ class AndroidVoipClient : public webrtc::Transport,
|
|||
void Delete(JNIEnv* env);
|
||||
|
||||
// Implementation for Transport.
|
||||
bool SendRtp(const uint8_t* packet,
|
||||
size_t length,
|
||||
bool SendRtp(rtc::ArrayView<const uint8_t> packet,
|
||||
const webrtc::PacketOptions& options) override;
|
||||
bool SendRtcp(const uint8_t* packet, size_t length) override;
|
||||
bool SendRtcp(rtc::ArrayView<const uint8_t> packet) override;
|
||||
|
||||
// Slots for sockets to connect to.
|
||||
void OnSignalReadRTPPacket(rtc::AsyncPacketSocket* socket,
|
||||
|
|
Loading…
Reference in a new issue