mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #133, rtsp extract tcp/udp listener.
This commit is contained in:
parent
4807f7850d
commit
40fbfd8560
17 changed files with 876 additions and 300 deletions
|
@ -50,27 +50,7 @@ class SrsRawAacStreamCodec;
|
|||
|
||||
#include <srs_app_st.hpp>
|
||||
#include <srs_kernel_ts.hpp>
|
||||
|
||||
/**
|
||||
* the udp packet handler.
|
||||
*/
|
||||
class ISrsUdpHandler
|
||||
{
|
||||
public:
|
||||
ISrsUdpHandler();
|
||||
virtual ~ISrsUdpHandler();
|
||||
public:
|
||||
/**
|
||||
* when udp listener got a udp packet, notice server to process it.
|
||||
* @param type, the client type, used to create concrete connection,
|
||||
* for instance RTMP connection to serve client.
|
||||
* @param from, the udp packet from address.
|
||||
* @param buf, the udp packet bytes, user should copy if need to use.
|
||||
* @param nb_buf, the size of udp packet bytes.
|
||||
* @remark user should never use the buf, for it's a shared memory bytes.
|
||||
*/
|
||||
virtual int on_udp_packet(sockaddr_in* from, char* buf, int nb_buf) = 0;
|
||||
};
|
||||
#include <srs_app_listener.hpp>
|
||||
|
||||
/**
|
||||
* the queue for mpegts over udp to send packets.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue