mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Support statistic for HTTP-API, HTTP-Callback and Security (#2483) v4.0.144
* commit message for your changes. Lines starting * Update srs_app_rtc_api.cpp * add SrsRtcConnPlay and SrsRtcConnPublish, in enum SrsRtmpConnType * Update srs_rtmp_stack.cpp * Update srs_app_rtc_conn.cpp * Update srs_app_rtc_api.cpp * update utest * Update srs_utest_app.cpp
This commit is contained in:
parent
4332beed79
commit
86c67f7d95
11 changed files with 172 additions and 52 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <srs_app_pithy_print.hpp>
|
||||
#include <srs_app_log.hpp>
|
||||
#include <srs_app_threads.hpp>
|
||||
#include <srs_app_statistic.hpp>
|
||||
|
||||
#ifdef SRS_FFMPEG_FIT
|
||||
#include <srs_app_rtc_codec.hpp>
|
||||
|
@ -540,7 +541,8 @@ srs_error_t SrsRtcSource::on_publish()
|
|||
_srs_hybrid->timer100ms()->subscribe(this);
|
||||
}
|
||||
|
||||
// TODO: FIXME: Handle by statistic.
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
stat->on_stream_publish(req, _source_id.c_str());
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -576,7 +578,8 @@ void SrsRtcSource::on_unpublish()
|
|||
srs_freep(bridger_);
|
||||
}
|
||||
|
||||
// TODO: FIXME: Handle by statistic.
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
stat->on_stream_close(req);
|
||||
}
|
||||
|
||||
void SrsRtcSource::subscribe(ISrsRtcSourceEventHandler* h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue