mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #133, add rtsp listener and handler.
This commit is contained in:
parent
78f34ad46f
commit
e81e090239
10 changed files with 209 additions and 8 deletions
|
@ -48,6 +48,7 @@ class SrsHttpHeartbeat;
|
|||
class SrsKbps;
|
||||
class SrsConfDirective;
|
||||
class ISrsUdpHandler;
|
||||
class ISrsRtspHandler;
|
||||
|
||||
// listener type for server to identify the connection,
|
||||
// that is, use different type to process the connection.
|
||||
|
@ -61,6 +62,8 @@ enum SrsListenerType
|
|||
SrsListenerHttpStream = 2,
|
||||
// UDP stream, MPEG-TS over udp.
|
||||
SrsListenerMpegTsOverUdp = 3,
|
||||
// TCP stream, RTSP stream.
|
||||
SrsListenerRtsp = 4,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -88,6 +91,21 @@ public:
|
|||
};
|
||||
|
||||
#ifdef SRS_AUTO_STREAM_CASTER
|
||||
/**
|
||||
* the tcp listener, for rtsp server.
|
||||
*/
|
||||
class SrsRtspListener : public SrsListener
|
||||
{
|
||||
private:
|
||||
ISrsRtspHandler* caster;
|
||||
public:
|
||||
SrsRtspListener(SrsServer* server, SrsListenerType type, SrsConfDirective* c);
|
||||
virtual ~SrsRtspListener();
|
||||
// interface ISrsThreadHandler.
|
||||
public:
|
||||
virtual int cycle();
|
||||
};
|
||||
|
||||
/**
|
||||
* the udp listener, for udp server.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue