mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Disable simulator API by default.
This commit is contained in:
parent
fe01a504b6
commit
db503975fb
5 changed files with 18 additions and 0 deletions
|
@ -1492,6 +1492,7 @@ srs_error_t SrsGoApiRtcPublish::exchange_sdp(SrsRequest* req, const SrsSdp& remo
|
|||
return err;
|
||||
}
|
||||
|
||||
#ifdef SRS_SIMULATOR
|
||||
SrsGoApiRtcNACK::SrsGoApiRtcNACK(SrsRtcServer* server)
|
||||
{
|
||||
server_ = server;
|
||||
|
@ -1549,6 +1550,7 @@ srs_error_t SrsGoApiRtcNACK::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|||
return srs_success;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
SrsGoApiClients::SrsGoApiClients()
|
||||
{
|
||||
|
|
|
@ -203,6 +203,7 @@ private:
|
|||
srs_error_t check_remote_sdp(const SrsSdp& remote_sdp);
|
||||
};
|
||||
|
||||
#ifdef SRS_SIMULATOR
|
||||
class SrsGoApiRtcNACK : public ISrsHttpHandler
|
||||
{
|
||||
private:
|
||||
|
@ -216,6 +217,7 @@ private:
|
|||
virtual srs_error_t do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r, SrsJsonObject* res);
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class SrsGoApiClients : public ISrsHttpHandler
|
||||
{
|
||||
|
|
|
@ -3397,9 +3397,12 @@ srs_error_t SrsRtcServer::listen_api()
|
|||
if ((err = http_api_mux->handle("/rtc/v1/publish/", new SrsGoApiRtcPublish(this))) != srs_success) {
|
||||
return srs_error_wrap(err, "handle publish");
|
||||
}
|
||||
|
||||
#ifdef SRS_SIMULATOR
|
||||
if ((err = http_api_mux->handle("/rtc/v1/nack/", new SrsGoApiRtcNACK(this))) != srs_success) {
|
||||
return srs_error_wrap(err, "handle nack");
|
||||
}
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue