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

add stream caster for post flv over http.

This commit is contained in:
winlin 2015-05-03 10:56:20 +08:00
parent 4d18073dab
commit f0c24eeacc
10 changed files with 203 additions and 3 deletions

View file

@ -66,6 +66,8 @@ enum SrsListenerType
SrsListenerMpegTsOverUdp = 3,
// TCP stream, RTSP stream.
SrsListenerRtsp = 4,
// HTTP stream, FLV over HTTP POST.
SrsListenerFlv = 5,
};
/**
@ -123,6 +125,24 @@ public:
virtual int on_tcp_client(st_netfd_t stfd);
};
/**
* the tcp listener, for http flv server.
*/
class SrsHttpFlvListener : virtual public SrsListener, virtual public ISrsTcpHandler
{
private:
SrsTcpListener* listener;
ISrsTcpHandler* caster;
public:
SrsHttpFlvListener(SrsServer* server, SrsListenerType type, SrsConfDirective* c);
virtual ~SrsHttpFlvListener();
public:
virtual int listen(std::string ip, int port);
// ISrsTcpHandler
public:
virtual int on_tcp_client(st_netfd_t stfd);
};
/**
* the udp listener, for udp server.
*/