Enable setting the maximum bitrate limit in RtpSender.

This change allows the application to limit the bitrate of the outgoing
audio and video streams at runtime. The API roughly follows the WebRTC
API draft, defining the RTCRtpParameters structure witn exactly one
encoding (simulcast streams are not exposed in the API for now).
(https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters)

BUG=

Review URL: https://codereview.webrtc.org/1788583004

Cr-Commit-Position: refs/heads/master@{#12025}
This commit is contained in:
skvlad
2016-03-16 19:07:43 -07:00
committed by Commit bot
parent df6416aa50
commit dc1c62cd30
20 changed files with 551 additions and 12 deletions

View File

@ -18,6 +18,7 @@
#include "webrtc/api/mediastreaminterface.h"
#include "webrtc/api/proxy.h"
#include "webrtc/api/rtpparameters.h"
#include "webrtc/base/refcount.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/pc/mediasession.h"
@ -51,6 +52,9 @@ class RtpSenderInterface : public rtc::RefCountInterface {
virtual void Stop() = 0;
virtual RtpParameters GetParameters() const = 0;
virtual bool SetParameters(const RtpParameters& parameters) = 0;
protected:
virtual ~RtpSenderInterface() {}
};
@ -66,6 +70,8 @@ PROXY_CONSTMETHOD0(std::string, id)
PROXY_METHOD1(void, set_stream_id, const std::string&)
PROXY_CONSTMETHOD0(std::string, stream_id)
PROXY_METHOD0(void, Stop)
PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
END_PROXY()
} // namespace webrtc