mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
use simple rtmp client for raw connect app
This commit is contained in:
parent
24b3899972
commit
adb8f243bf
4 changed files with 182 additions and 163 deletions
|
@ -44,6 +44,7 @@ class SrsPithyPrint;
|
|||
class ISrsHttpResponseReader;
|
||||
class SrsFlvDecoder;
|
||||
class SrsTcpClient;
|
||||
class SrsSimpleRtmpClient;
|
||||
|
||||
#include <srs_app_st.hpp>
|
||||
#include <srs_app_listener.hpp>
|
||||
|
@ -85,11 +86,7 @@ class SrsDynamicHttpConn : public SrsHttpConn
|
|||
private:
|
||||
std::string output;
|
||||
SrsPithyPrint* pprint;
|
||||
private:
|
||||
SrsRequest* req;
|
||||
SrsTcpClient* transport;
|
||||
SrsRtmpClient* client;
|
||||
int stream_id;
|
||||
SrsSimpleRtmpClient* sdk;
|
||||
public:
|
||||
SrsDynamicHttpConn(IConnectionManager* cm, st_netfd_t fd, SrsHttpServeMux* m);
|
||||
virtual ~SrsDynamicHttpConn();
|
||||
|
@ -99,14 +96,6 @@ public:
|
|||
virtual int proxy(ISrsHttpResponseWriter* w, ISrsHttpMessage* r, std::string o);
|
||||
private:
|
||||
virtual int do_proxy(ISrsHttpResponseReader* rr, SrsFlvDecoder* dec);
|
||||
virtual int rtmp_write_packet(char type, u_int32_t timestamp, char* data, int size);
|
||||
private:
|
||||
// connect to rtmp output url.
|
||||
// @remark ignore when not connected, reconnect when disconnected.
|
||||
virtual int connect();
|
||||
virtual int connect_app(std::string ep_server, int ep_port);
|
||||
// close the connected io and rtmp to ready to be re-connect.
|
||||
virtual void close();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue