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

sdp exchange.

This commit is contained in:
xiaozhihong 2020-03-30 15:16:29 +08:00
parent ccd170a813
commit 49da2099c1
12 changed files with 1435 additions and 298 deletions

View file

@ -33,6 +33,7 @@ class SrsHttpHandler;
class SrsServer;
class SrsRtcServer;
class SrsJsonObject;
class SrsSdp;
#include <srs_app_st.hpp>
#include <srs_app_conn.hpp>
@ -167,17 +168,21 @@ public:
};
#ifdef SRS_AUTO_RTC
class SrsGoApiSdp : public ISrsHttpHandler
class SrsGoApiRtcPlay : public ISrsHttpHandler
{
public:
static uint32_t ssrc_num;
private:
SrsRtcServer* rtc_server;
public:
SrsGoApiSdp(SrsRtcServer* rtc_svr);
virtual ~SrsGoApiSdp();
SrsGoApiRtcPlay(SrsRtcServer* rtc_svr);
virtual ~SrsGoApiRtcPlay();
public:
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
private:
virtual srs_error_t do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r, SrsJsonObject* res);
srs_error_t exchange_sdp(const std::string& app, const std::string& stream, const SrsSdp& remote_sdp, SrsSdp& local_sdp);
srs_error_t check_remote_sdp(const SrsSdp& remote_sdp);
};
#endif