mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code, use simple rtmp client.
This commit is contained in:
parent
e4c852945f
commit
bc27481886
6 changed files with 145 additions and 184 deletions
|
@ -56,6 +56,8 @@ class SrsQueueRecvThread;
|
|||
class SrsPublishRecvThread;
|
||||
class SrsSecurity;
|
||||
class ISrsWakable;
|
||||
class SrsCommonMessage;
|
||||
class SrsPacket;
|
||||
|
||||
/**
|
||||
* the simple rtmp client stub, use SrsRtmpClient and provides high level APIs.
|
||||
|
@ -66,6 +68,7 @@ private:
|
|||
SrsRequest* req;
|
||||
SrsTcpClient* transport;
|
||||
SrsRtmpClient* client;
|
||||
SrsKbps* kbps;
|
||||
int stream_id;
|
||||
public:
|
||||
SrsSimpleRtmpClient();
|
||||
|
@ -77,8 +80,16 @@ private:
|
|||
virtual int connect_app(std::string vhost);
|
||||
public:
|
||||
virtual void close();
|
||||
public:
|
||||
virtual int publish();
|
||||
virtual int play();
|
||||
virtual void kbps_sample(const char* label, int64_t age);
|
||||
public:
|
||||
virtual int rtmp_write_packet(char type, u_int32_t timestamp, char* data, int size);
|
||||
virtual int recv_message(SrsCommonMessage** pmsg);
|
||||
virtual int decode_message(SrsCommonMessage* msg, SrsPacket** ppacket);
|
||||
public:
|
||||
virtual void set_recv_timeout(int64_t timeout);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue