Move some RTP-related observers from common_types.h

These classes moved to rtp_rtcp_defines.h:

  BitrateStatisticsObserver
  SendSideDelayObserver
  SendPacketObserver

Bug: webrtc:5876
Change-Id: I38861f8de555aff0b22e7a67a5ac0090a5e98d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135464
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27870}
This commit is contained in:
Niels Möller
2019-05-07 14:39:05 +02:00
committed by Commit Bot
parent 8c513c7600
commit 449901db80
2 changed files with 31 additions and 31 deletions

View File

@ -516,5 +516,36 @@ class RtcpAckObserver {
virtual ~RtcpAckObserver() = default;
};
// Callback, used to notify an observer whenever new rates have been estimated.
class BitrateStatisticsObserver {
public:
virtual ~BitrateStatisticsObserver() {}
virtual void Notify(uint32_t total_bitrate_bps,
uint32_t retransmit_bitrate_bps,
uint32_t ssrc) = 0;
};
// Callback, used to notify an observer whenever the send-side delay is updated.
class SendSideDelayObserver {
public:
virtual ~SendSideDelayObserver() {}
virtual void SendSideDelayUpdated(int avg_delay_ms,
int max_delay_ms,
uint32_t ssrc) = 0;
};
// Callback, used to notify an observer whenever a packet is sent to the
// transport.
// TODO(asapersson): This class will remove the need for SendSideDelayObserver.
// Remove SendSideDelayObserver once possible.
class SendPacketObserver {
public:
virtual ~SendPacketObserver() {}
virtual void OnSendPacket(uint16_t packet_id,
int64_t capture_time_ms,
uint32_t ssrc) = 0;
};
} // namespace webrtc
#endif // MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_