Deprecate a few unused methods in RtpRtcpInterface
Bug: none Change-Id: Ifbf2040f3ce03a1381f6fbf59cb752c7bc2dc1aa Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176571 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Magnus Flodman <mflodman@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31474}
This commit is contained in:

committed by
Commit Bot

parent
a48dd43fe1
commit
6434864c3f
@ -33,6 +33,24 @@ class RtpRtcp : public Module, public RtpRtcpInterface {
|
||||
static std::unique_ptr<RtpRtcp> DEPRECATED_Create(
|
||||
const Configuration& configuration);
|
||||
|
||||
// (TMMBR) Temporary Max Media Bit Rate
|
||||
RTC_DEPRECATED virtual bool TMMBR() const = 0;
|
||||
|
||||
RTC_DEPRECATED virtual void SetTMMBRStatus(bool enable) = 0;
|
||||
|
||||
// Returns -1 on failure else 0.
|
||||
RTC_DEPRECATED virtual int32_t AddMixedCNAME(uint32_t ssrc,
|
||||
const char* cname) = 0;
|
||||
|
||||
// Returns -1 on failure else 0.
|
||||
RTC_DEPRECATED virtual int32_t RemoveMixedCNAME(uint32_t ssrc) = 0;
|
||||
|
||||
// Returns remote CName.
|
||||
// Returns -1 on failure else 0.
|
||||
RTC_DEPRECATED virtual int32_t RemoteCNAME(
|
||||
uint32_t remote_ssrc,
|
||||
char cname[RTCP_CNAME_SIZE]) const = 0;
|
||||
|
||||
// (De)registers RTP header extension type and id.
|
||||
// Returns -1 on failure else 0.
|
||||
RTC_DEPRECATED virtual int32_t RegisterSendRtpHeaderExtension(
|
||||
@ -47,6 +65,12 @@ class RtpRtcp : public Module, public RtpRtcpInterface {
|
||||
const uint8_t* data,
|
||||
uint16_t length) = 0;
|
||||
|
||||
// Returns statistics of the amount of data sent.
|
||||
// Returns -1 on failure else 0.
|
||||
RTC_DEPRECATED virtual int32_t DataCountersRTP(
|
||||
size_t* bytes_sent,
|
||||
uint32_t* packets_sent) const = 0;
|
||||
|
||||
// Requests new key frame.
|
||||
// using PLI, https://tools.ietf.org/html/rfc4585#section-6.3.1.1
|
||||
void SendPictureLossIndication() { SendRTCP(kRtcpPli); }
|
||||
|
@ -117,10 +117,6 @@ class MockRtpRtcpInterface : public RtpRtcpInterface {
|
||||
SetCNAME,
|
||||
(const char cname[RTCP_CNAME_SIZE]),
|
||||
(override));
|
||||
MOCK_METHOD(int32_t,
|
||||
RemoteCNAME,
|
||||
(uint32_t remote_ssrc, char cname[RTCP_CNAME_SIZE]),
|
||||
(const, override));
|
||||
MOCK_METHOD(int32_t,
|
||||
RemoteNTP,
|
||||
(uint32_t * received_ntp_secs,
|
||||
@ -129,11 +125,6 @@ class MockRtpRtcpInterface : public RtpRtcpInterface {
|
||||
uint32_t* rtcp_arrival_time_frac,
|
||||
uint32_t* rtcp_timestamp),
|
||||
(const, override));
|
||||
MOCK_METHOD(int32_t,
|
||||
AddMixedCNAME,
|
||||
(uint32_t ssrc, const char cname[RTCP_CNAME_SIZE]),
|
||||
(override));
|
||||
MOCK_METHOD(int32_t, RemoveMixedCNAME, (uint32_t ssrc), (override));
|
||||
MOCK_METHOD(int32_t,
|
||||
RTT,
|
||||
(uint32_t remote_ssrc,
|
||||
@ -144,10 +135,6 @@ class MockRtpRtcpInterface : public RtpRtcpInterface {
|
||||
(const, override));
|
||||
MOCK_METHOD(int64_t, ExpectedRetransmissionTimeMs, (), (const, override));
|
||||
MOCK_METHOD(int32_t, SendRTCP, (RTCPPacketType packet_type), (override));
|
||||
MOCK_METHOD(int32_t,
|
||||
DataCountersRTP,
|
||||
(size_t * bytes_sent, uint32_t* packets_sent),
|
||||
(const, override));
|
||||
MOCK_METHOD(void,
|
||||
GetSendStreamDataCounters,
|
||||
(StreamDataCounters*, StreamDataCounters*),
|
||||
@ -167,8 +154,6 @@ class MockRtpRtcpInterface : public RtpRtcpInterface {
|
||||
(int64_t bitrate, std::vector<uint32_t> ssrcs),
|
||||
(override));
|
||||
MOCK_METHOD(void, UnsetRemb, (), (override));
|
||||
MOCK_METHOD(bool, TMMBR, (), (const, override));
|
||||
MOCK_METHOD(void, SetTMMBRStatus, (bool enable), (override));
|
||||
MOCK_METHOD(int32_t,
|
||||
SendNACK,
|
||||
(const uint16_t* nack_list, uint16_t size),
|
||||
|
@ -197,7 +197,7 @@ void ModuleRtpRtcpImpl2::Process() {
|
||||
if (rtcp_sender_.TimeToSendRTCPReport())
|
||||
rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport);
|
||||
|
||||
if (TMMBR() && rtcp_receiver_.UpdateTmmbrTimers()) {
|
||||
if (rtcp_sender_.TMMBR() && rtcp_receiver_.UpdateTmmbrTimers()) {
|
||||
rtcp_receiver_.NotifyTmmbrUpdated();
|
||||
}
|
||||
}
|
||||
@ -463,19 +463,6 @@ int32_t ModuleRtpRtcpImpl2::SetCNAME(const char* c_name) {
|
||||
return rtcp_sender_.SetCNAME(c_name);
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl2::AddMixedCNAME(uint32_t ssrc, const char* c_name) {
|
||||
return rtcp_sender_.AddMixedCNAME(ssrc, c_name);
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl2::RemoveMixedCNAME(const uint32_t ssrc) {
|
||||
return rtcp_sender_.RemoveMixedCNAME(ssrc);
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl2::RemoteCNAME(const uint32_t remote_ssrc,
|
||||
char c_name[RTCP_CNAME_SIZE]) const {
|
||||
return rtcp_receiver_.CNAME(remote_ssrc, c_name);
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl2::RemoteNTP(uint32_t* received_ntpsecs,
|
||||
uint32_t* received_ntpfrac,
|
||||
uint32_t* rtcp_arrival_time_secs,
|
||||
@ -532,30 +519,6 @@ bool ModuleRtpRtcpImpl2::RtcpXrRrtrStatus() const {
|
||||
return rtcp_sender_.RtcpXrReceiverReferenceTime();
|
||||
}
|
||||
|
||||
// TODO(asapersson): Replace this method with the one below.
|
||||
int32_t ModuleRtpRtcpImpl2::DataCountersRTP(size_t* bytes_sent,
|
||||
uint32_t* packets_sent) const {
|
||||
StreamDataCounters rtp_stats;
|
||||
StreamDataCounters rtx_stats;
|
||||
rtp_sender_->packet_sender.GetDataCounters(&rtp_stats, &rtx_stats);
|
||||
|
||||
if (bytes_sent) {
|
||||
// TODO(http://crbug.com/webrtc/10525): Bytes sent should only include
|
||||
// payload bytes, not header and padding bytes.
|
||||
*bytes_sent = rtp_stats.transmitted.payload_bytes +
|
||||
rtp_stats.transmitted.padding_bytes +
|
||||
rtp_stats.transmitted.header_bytes +
|
||||
rtx_stats.transmitted.payload_bytes +
|
||||
rtx_stats.transmitted.padding_bytes +
|
||||
rtx_stats.transmitted.header_bytes;
|
||||
}
|
||||
if (packets_sent) {
|
||||
*packets_sent =
|
||||
rtp_stats.transmitted.packets + rtx_stats.transmitted.packets;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
|
||||
StreamDataCounters* rtp_counters,
|
||||
StreamDataCounters* rtx_counters) const {
|
||||
@ -603,15 +566,6 @@ void ModuleRtpRtcpImpl2::DeregisterSendRtpHeaderExtension(
|
||||
rtp_sender_->packet_generator.DeregisterRtpHeaderExtension(uri);
|
||||
}
|
||||
|
||||
// (TMMBR) Temporary Max Media Bit Rate.
|
||||
bool ModuleRtpRtcpImpl2::TMMBR() const {
|
||||
return rtcp_sender_.TMMBR();
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl2::SetTMMBRStatus(const bool enable) {
|
||||
rtcp_sender_.SetTMMBRStatus(enable);
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl2::SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set) {
|
||||
rtcp_sender_.SetTmmbn(std::move(bounding_set));
|
||||
}
|
||||
|
@ -58,8 +58,6 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface,
|
||||
static std::unique_ptr<ModuleRtpRtcpImpl2> Create(
|
||||
const Configuration& configuration);
|
||||
|
||||
// TODO(tommi): Make implementation private?
|
||||
|
||||
// Returns the number of milliseconds until the module want a worker thread to
|
||||
// call Process.
|
||||
int64_t TimeUntilNextProcess() override;
|
||||
@ -169,10 +167,6 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface,
|
||||
// Set RTCP CName.
|
||||
int32_t SetCNAME(const char* c_name) override;
|
||||
|
||||
// Get remote CName.
|
||||
int32_t RemoteCNAME(uint32_t remote_ssrc,
|
||||
char c_name[RTCP_CNAME_SIZE]) const override;
|
||||
|
||||
// Get remote NTP.
|
||||
int32_t RemoteNTP(uint32_t* received_ntp_secs,
|
||||
uint32_t* received_ntp_frac,
|
||||
@ -180,10 +174,6 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface,
|
||||
uint32_t* rtcp_arrival_time_frac,
|
||||
uint32_t* rtcp_timestamp) const override;
|
||||
|
||||
int32_t AddMixedCNAME(uint32_t ssrc, const char* c_name) override;
|
||||
|
||||
int32_t RemoveMixedCNAME(uint32_t ssrc) override;
|
||||
|
||||
// Get RoundTripTime.
|
||||
int32_t RTT(uint32_t remote_ssrc,
|
||||
int64_t* rtt,
|
||||
@ -197,10 +187,6 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface,
|
||||
// Normal SR and RR are triggered via the process function.
|
||||
int32_t SendRTCP(RTCPPacketType rtcpPacketType) override;
|
||||
|
||||
// Statistics of the amount of data sent and received.
|
||||
int32_t DataCountersRTP(size_t* bytes_sent,
|
||||
uint32_t* packets_sent) const override;
|
||||
|
||||
void GetSendStreamDataCounters(
|
||||
StreamDataCounters* rtp_counters,
|
||||
StreamDataCounters* rtx_counters) const override;
|
||||
@ -218,11 +204,6 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface,
|
||||
void SetRemb(int64_t bitrate_bps, std::vector<uint32_t> ssrcs) override;
|
||||
void UnsetRemb() override;
|
||||
|
||||
// (TMMBR) Temporary Max Media Bit Rate.
|
||||
bool TMMBR() const override;
|
||||
|
||||
void SetTMMBRStatus(bool enable) override;
|
||||
|
||||
void SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set) override;
|
||||
|
||||
size_t MaxRtpPacketSize() const override;
|
||||
|
@ -324,11 +324,6 @@ class RtpRtcpInterface : public RtcpFeedbackSenderInterface {
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t SetCNAME(const char* cname) = 0;
|
||||
|
||||
// Returns remote CName.
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t RemoteCNAME(uint32_t remote_ssrc,
|
||||
char cname[RTCP_CNAME_SIZE]) const = 0;
|
||||
|
||||
// Returns remote NTP.
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t RemoteNTP(uint32_t* received_ntp_secs,
|
||||
@ -337,12 +332,6 @@ class RtpRtcpInterface : public RtcpFeedbackSenderInterface {
|
||||
uint32_t* rtcp_arrival_time_frac,
|
||||
uint32_t* rtcp_timestamp) const = 0;
|
||||
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t AddMixedCNAME(uint32_t ssrc, const char* cname) = 0;
|
||||
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t RemoveMixedCNAME(uint32_t ssrc) = 0;
|
||||
|
||||
// Returns current RTT (round-trip time) estimate.
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t RTT(uint32_t remote_ssrc,
|
||||
@ -359,11 +348,6 @@ class RtpRtcpInterface : public RtcpFeedbackSenderInterface {
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t SendRTCP(RTCPPacketType rtcp_packet_type) = 0;
|
||||
|
||||
// Returns statistics of the amount of data sent.
|
||||
// Returns -1 on failure else 0.
|
||||
virtual int32_t DataCountersRTP(size_t* bytes_sent,
|
||||
uint32_t* packets_sent) const = 0;
|
||||
|
||||
// Returns send statistics for the RTP and RTX stream.
|
||||
virtual void GetSendStreamDataCounters(
|
||||
StreamDataCounters* rtp_counters,
|
||||
@ -393,11 +377,6 @@ class RtpRtcpInterface : public RtcpFeedbackSenderInterface {
|
||||
// Stops sending REMB on next and following sender/receiver reports.
|
||||
void UnsetRemb() override = 0;
|
||||
|
||||
// (TMMBR) Temporary Max Media Bit Rate
|
||||
virtual bool TMMBR() const = 0;
|
||||
|
||||
virtual void SetTMMBRStatus(bool enable) = 0;
|
||||
|
||||
// (NACK)
|
||||
|
||||
// Sends a Negative acknowledgement packet.
|
||||
|
Reference in New Issue
Block a user