mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 03:49:42 +00:00
Bug 1867099 (MOZ) - use non-deprecated rtc::ArrayView versions of SendRtp/SendRtcp from webrtc::Transport
This commit is contained in:
parent
3a16a1065e
commit
9c1a6793f4
@ -14,17 +14,15 @@ namespace mozilla {
|
||||
*/
|
||||
class NullTransport : public webrtc::Transport {
|
||||
public:
|
||||
virtual bool SendRtp(const uint8_t* packet, size_t length,
|
||||
const webrtc::PacketOptions& options) override {
|
||||
virtual bool SendRtp(rtc::ArrayView<const uint8_t> packet,
|
||||
const webrtc::PacketOptions& options) {
|
||||
(void)packet;
|
||||
(void)length;
|
||||
(void)options;
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool SendRtcp(const uint8_t* packet, size_t length) override {
|
||||
virtual bool SendRtcp(rtc::ArrayView<const uint8_t> packet) {
|
||||
(void)packet;
|
||||
(void)length;
|
||||
return true;
|
||||
}
|
||||
#if 0
|
||||
|
@ -245,12 +245,12 @@ class WebrtcSendTransport : public webrtc::Transport {
|
||||
public:
|
||||
explicit WebrtcSendTransport(MediaSessionConduit* aConduit)
|
||||
: mConduit(aConduit) {}
|
||||
bool SendRtp(const uint8_t* aPacket, size_t aLength,
|
||||
const webrtc::PacketOptions& aOptions) override {
|
||||
return mConduit->SendRtp(aPacket, aLength, aOptions);
|
||||
bool SendRtp(rtc::ArrayView<const uint8_t> aPacket,
|
||||
const webrtc::PacketOptions& aOptions) {
|
||||
return mConduit->SendRtp(aPacket.data(), aPacket.size(), aOptions);
|
||||
}
|
||||
bool SendRtcp(const uint8_t* aPacket, size_t aLength) override {
|
||||
return mConduit->SendSenderRtcp(aPacket, aLength);
|
||||
bool SendRtcp(rtc::ArrayView<const uint8_t> aPacket) {
|
||||
return mConduit->SendSenderRtcp(aPacket.data(), aPacket.size());
|
||||
}
|
||||
};
|
||||
|
||||
@ -261,12 +261,12 @@ class WebrtcReceiveTransport : public webrtc::Transport {
|
||||
public:
|
||||
explicit WebrtcReceiveTransport(MediaSessionConduit* aConduit)
|
||||
: mConduit(aConduit) {}
|
||||
bool SendRtp(const uint8_t* aPacket, size_t aLength,
|
||||
const webrtc::PacketOptions& aOptions) override {
|
||||
bool SendRtp(rtc::ArrayView<const uint8_t> aPacket,
|
||||
const webrtc::PacketOptions& aOptions) {
|
||||
MOZ_CRASH("Unexpected RTP packet");
|
||||
}
|
||||
bool SendRtcp(const uint8_t* aPacket, size_t aLength) override {
|
||||
return mConduit->SendReceiverRtcp(aPacket, aLength);
|
||||
bool SendRtcp(rtc::ArrayView<const uint8_t> aPacket) {
|
||||
return mConduit->SendReceiverRtcp(aPacket.data(), aPacket.size());
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user