webrtc/api/rtp_sender_interface.cc
Amit Hilbuch 2297d3311a Rejected simulcast layers will no longer appear in GetParameters().
Added a layer in RtpSender that bridges the gap between the layers
that the user sees and the layer that the media engine sees.
Media engine still maintains the invariant that the number of layers
cannot be changed, while RtpSender adds and removes layers between
the user GetParameters and SetParameters calls and the media engine.

Bug: webrtc:10251
Change-Id: I33839c1f9a9052cb6130253e5a582606f2cbe54a
Reviewed-on: https://webrtc-review.googlesource.com/c/122641
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26756}
2019-02-19 22:01:53 +00:00

45 lines
1.3 KiB
C++

/*
* Copyright 2018 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "api/rtp_sender_interface.h"
namespace webrtc {
void RtpSenderInterface::SetFrameEncryptor(
rtc::scoped_refptr<FrameEncryptorInterface> frame_encryptor) {}
rtc::scoped_refptr<FrameEncryptorInterface>
RtpSenderInterface::GetFrameEncryptor() const {
return nullptr;
}
std::vector<RtpEncodingParameters> RtpSenderInterface::init_send_encodings()
const {
return {};
}
rtc::scoped_refptr<DtlsTransportInterface> RtpSenderInterface::dtls_transport()
const {
return nullptr;
}
// TODO(amithi): Fix downstream dependencies and make GetParameters pure
// virtual.
RtpParameters RtpSenderInterface::GetParameters() {
const RtpSenderInterface* interface = this;
return interface->GetParameters();
}
RtpParameters RtpSenderInterface::GetParameters() const {
RtpSenderInterface* interface = const_cast<RtpSenderInterface*>(this);
return interface->GetParameters();
}
} // namespace webrtc