RTC: Refine code

pull/1925/head
winlin 5 years ago
parent 1114c6a46a
commit 87ffb7071a

@ -3128,8 +3128,8 @@ srs_error_t SrsRtcConnection::create_publisher(SrsRequest* req, SrsRtcStreamDesc
}
if (_srs_rtc_hijacker) {
if ((err = _srs_rtc_hijacker->on_before_publish(this, publisher, req)) != srs_success) {
return srs_error_wrap(err, "on before publish");
if ((err = _srs_rtc_hijacker->on_create_publish(this, publisher, req)) != srs_success) {
return srs_error_wrap(err, "on create publish");
}
}

@ -497,9 +497,9 @@ public:
public:
// Initialize the hijacker.
virtual srs_error_t initialize() = 0;
// When create publisher.
virtual srs_error_t on_before_publish(SrsRtcConnection* session, SrsRtcPublishStream* publisher, SrsRequest* req) = 0;
// When start publisher by RTC.
// When create publisher, SDP is done, DTLS is not ready.
virtual srs_error_t on_create_publish(SrsRtcConnection* session, SrsRtcPublishStream* publisher, SrsRequest* req) = 0;
// When start publisher by RTC, SDP and DTLS are done.
virtual srs_error_t on_start_publish(SrsRtcConnection* session, SrsRtcPublishStream* publisher, SrsRequest* req) = 0;
// When stop publish by RTC.
virtual void on_stop_publish(SrsRtcConnection* session, SrsRtcPublishStream* publisher, SrsRequest* req) = 0;

Loading…
Cancel
Save