Reland "Implement RtpParameters.transaction_id for PC RtpSenderInterface"
This is a reland of 5faf36ef3c582350fba5ef97a3549e440d81a283
The issue in Chrome has been fixed and this should be safe to reland.
TBR=deadbeef
Original change's description:
> 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}
Bug: webrtc:7580
Change-Id: Iabd41fb21afdf452c039d5513824ae334f8d1d3f
Reviewed-on: https://webrtc-review.googlesource.com/76980
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23247}
diff --git a/api/rtpsenderinterface.h b/api/rtpsenderinterface.h
index 01279a5..8c7e751 100644
--- a/api/rtpsenderinterface.h
+++ b/api/rtpsenderinterface.h
@@ -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 @@
// 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 @@
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()