Implement RtpParameters.transaction_id for PC RtpSenderInterface
The transaction_id field should be refreshed for every getParameters() call and checked at each setParameters() call. This also checks that getParameters() was ever called to return a proper error code. Bug: webrtc:7580 Change-Id: I6c6fe289542e486fc422cdc61577982b0529d4c1 Reviewed-on: https://webrtc-review.googlesource.com/70820 Commit-Queue: Florent Castelli <orphis@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23120}
This commit is contained in:

committed by
Commit Bot

parent
e6256055e7
commit
5faf36ef3c
@ -23,6 +23,7 @@
|
||||
#include "api/proxy.h"
|
||||
#include "api/rtcerror.h"
|
||||
#include "api/rtpparameters.h"
|
||||
#include "rtc_base/deprecation.h"
|
||||
#include "rtc_base/refcount.h"
|
||||
#include "rtc_base/scoped_ref_ptr.h"
|
||||
|
||||
@ -53,7 +54,13 @@ class RtpSenderInterface : public rtc::RefCountInterface {
|
||||
// tracks.
|
||||
virtual std::vector<std::string> stream_ids() const = 0;
|
||||
|
||||
virtual RtpParameters GetParameters() const = 0;
|
||||
// TODO(orphis): Transitional implementation
|
||||
// Remove the const implementation and make the non-const pure virtual once
|
||||
// when external code depending on this has updated
|
||||
virtual RtpParameters GetParameters() { return RtpParameters(); }
|
||||
RTC_DEPRECATED virtual RtpParameters GetParameters() const {
|
||||
return const_cast<RtpSenderInterface*>(this)->GetParameters();
|
||||
}
|
||||
// Note that only a subset of the parameters can currently be changed. See
|
||||
// rtpparameters.h
|
||||
virtual RTCError SetParameters(const RtpParameters& parameters) = 0;
|
||||
@ -76,7 +83,7 @@ BEGIN_SIGNALING_PROXY_MAP(RtpSender)
|
||||
PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
|
||||
PROXY_CONSTMETHOD0(std::string, id)
|
||||
PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
|
||||
PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
|
||||
PROXY_METHOD0(RtpParameters, GetParameters);
|
||||
PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&)
|
||||
PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender);
|
||||
END_PROXY_MAP()
|
||||
|
Reference in New Issue
Block a user