mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
64 lines
1.7 KiB
C++
64 lines
1.7 KiB
C++
//
|
|
// Copyright (c) 2013-2022 The SRS Authors
|
|
//
|
|
// SPDX-License-Identifier: MIT or MulanPSL-2.0
|
|
//
|
|
|
|
#ifndef SRS_APP_RTC_API_HPP
|
|
#define SRS_APP_RTC_API_HPP
|
|
|
|
#include <srs_core.hpp>
|
|
|
|
#include <srs_protocol_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);
|
|
private:
|
|
virtual srs_error_t http_hooks_on_play(SrsRequest* req);
|
|
};
|
|
|
|
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);
|
|
private:
|
|
virtual srs_error_t http_hooks_on_publish(SrsRequest* req);
|
|
};
|
|
|
|
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
|
|
|