2021-05-31 04:59:21 +00:00
|
|
|
//
|
|
|
|
// Copyright (c) 2013-2021 Winlin
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
//
|
2020-05-17 11:46:18 +00:00
|
|
|
|
|
|
|
#ifndef SRS_APP_RTC_API_HPP
|
|
|
|
#define SRS_APP_RTC_API_HPP
|
|
|
|
|
|
|
|
#include <srs_core.hpp>
|
|
|
|
|
|
|
|
#include <srs_http_stack.hpp>
|
|
|
|
|
|
|
|
class SrsRtcServer;
|
|
|
|
class SrsRequest;
|
|
|
|
class SrsSdp;
|
|
|
|
|
|
|
|
class SrsGoApiRtcPlay : public ISrsHttpHandler
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
SrsRtcServer* server_;
|
|
|
|
public:
|
|
|
|
SrsGoApiRtcPlay(SrsRtcServer* server);
|
|
|
|
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 check_remote_sdp(const SrsSdp& remote_sdp);
|
|
|
|
};
|
|
|
|
|
|
|
|
class SrsGoApiRtcPublish : public ISrsHttpHandler
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
SrsRtcServer* server_;
|
|
|
|
public:
|
|
|
|
SrsGoApiRtcPublish(SrsRtcServer* server);
|
|
|
|
virtual ~SrsGoApiRtcPublish();
|
|
|
|
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 check_remote_sdp(const SrsSdp& remote_sdp);
|
|
|
|
};
|
|
|
|
|
|
|
|
class SrsGoApiRtcNACK : public ISrsHttpHandler
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
SrsRtcServer* server_;
|
|
|
|
public:
|
|
|
|
SrsGoApiRtcNACK(SrsRtcServer* server);
|
|
|
|
virtual ~SrsGoApiRtcNACK();
|
|
|
|
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);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|