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

Refactor RTC publisher queue, rename sender to player

This commit is contained in:
winlin 2020-05-03 13:37:04 +08:00
parent ef64c5e2bd
commit 9c8b7279f0
4 changed files with 65 additions and 110 deletions

View file

@ -194,8 +194,7 @@ public:
SrsRtpPacket2* at(int index);
};
// TODO: FIXME: Rename to RTC player or subscriber.
class SrsRtcSenderThread : virtual public ISrsCoroutineHandler, virtual public ISrsReloadHandler
class SrsRtcPlayer : virtual public ISrsCoroutineHandler, virtual public ISrsReloadHandler
{
protected:
SrsCoroutine* trd;
@ -221,8 +220,8 @@ private:
int mw_msgs;
bool realtime;
public:
SrsRtcSenderThread(SrsRtcSession* s, int parent_cid);
virtual ~SrsRtcSenderThread();
SrsRtcPlayer(SrsRtcSession* s, int parent_cid);
virtual ~SrsRtcPlayer();
public:
srs_error_t initialize(const uint32_t& vssrc, const uint32_t& assrc, const uint16_t& v_pt, const uint16_t& a_pt);
// interface ISrsReloadHandler
@ -303,13 +302,13 @@ public:
class SrsRtcSession
{
friend class SrsDtlsSession;
friend class SrsRtcSenderThread;
friend class SrsRtcPlayer;
friend class SrsRtcPublisher;
private:
SrsRtcServer* rtc_server;
SrsRtcSessionStateType session_state;
SrsDtlsSession* dtls_session;
SrsRtcSenderThread* sender;
SrsRtcPlayer* player;
SrsRtcPublisher* publisher;
bool is_publisher_;
private: