1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Rename SrsRtcOutgoingInfo to SrsRtcPlayStreamStatistic

This commit is contained in:
winlin 2020-07-24 10:08:01 +08:00
parent 0131472ae5
commit bf3b917f1f
4 changed files with 25 additions and 25 deletions

View file

@ -88,6 +88,7 @@ enum SrsRtcConnectionStateType
CLOSED = 5,
};
// The security transport, use DTLS/SRTP to protect the data.
class SrsSecurityTransport : public ISrsDtlsCallback
{
private:
@ -127,8 +128,7 @@ private:
};
// A group of RTP packets for outgoing(send to players).
// TODO: FIXME: Rename to stat for RTP packets.
class SrsRtcOutgoingInfo
class SrsRtcPlayStreamStatistic
{
public:
#if defined(SRS_DEBUG)
@ -160,8 +160,8 @@ public:
// The number of padded packet.
int nn_paddings;
public:
SrsRtcOutgoingInfo();
virtual ~SrsRtcOutgoingInfo();
SrsRtcPlayStreamStatistic();
virtual ~SrsRtcPlayStreamStatistic();
};
// A RTC play stream, client pull and play stream from SRS.
@ -184,8 +184,8 @@ private:
private:
// Whether palyer started.
bool is_started;
// statistic send packets.
SrsRtcOutgoingInfo info;
// The statistic for consumer to send packets to player.
SrsRtcPlayStreamStatistic info;
public:
SrsRtcPlayStream(SrsRtcConnection* s, SrsContextId parent_cid);
virtual ~SrsRtcPlayStream();
@ -205,7 +205,7 @@ public:
public:
virtual srs_error_t cycle();
private:
srs_error_t send_packets(SrsRtcStream* source, const std::vector<SrsRtpPacket2*>& pkts, SrsRtcOutgoingInfo& info);
srs_error_t send_packets(SrsRtcStream* source, const std::vector<SrsRtpPacket2*>& pkts, SrsRtcPlayStreamStatistic& info);
public:
void nack_fetch(std::vector<SrsRtpPacket2*>& pkts, uint32_t ssrc, uint16_t seq);
public:
@ -328,7 +328,7 @@ private:
std::string peer_id_;
private:
// The timeout of session, keep alive by STUN ping pong.
srs_utime_t sessionStunTimeout;
srs_utime_t session_timeout;
srs_utime_t last_stun_time;
private:
// For each RTC session, we use a specified cid for debugging logs.
@ -404,7 +404,7 @@ public:
// Simulate the NACK to drop nn packets.
void simulate_nack_drop(int nn);
void simulate_player_drop_packet(SrsRtpHeader* h, int nn_bytes);
srs_error_t do_send_packets(const std::vector<SrsRtpPacket2*>& pkts, SrsRtcOutgoingInfo& info);
srs_error_t do_send_packets(const std::vector<SrsRtpPacket2*>& pkts, SrsRtcPlayStreamStatistic& info);
private:
srs_error_t on_binding_request(SrsStunPacket* r);
// publish media capabilitiy negotiate