mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Live: Limit cached max frames by gop_cache_max_frames (#3236)
* add gop_cache_max_frames * Live: Limit cached max frames by gop_cache_max_frames. v5.0.93 Co-authored-by: wanglei <wanglei@unicloud.com> Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
parent
4ada0bc629
commit
ec76512e42
9 changed files with 75 additions and 7 deletions
|
@ -557,9 +557,12 @@ srs_error_t SrsRtmpConn::stream_service_cycle()
|
|||
srs_assert(source != NULL);
|
||||
|
||||
bool enabled_cache = _srs_config->get_gop_cache(req->vhost);
|
||||
srs_trace("source url=%s, ip=%s, cache=%d, is_edge=%d, source_id=%s/%s",
|
||||
req->get_stream_url().c_str(), ip.c_str(), enabled_cache, info->edge, source->source_id().c_str(), source->pre_source_id().c_str());
|
||||
int gcmf = _srs_config->get_gop_cache_max_frames(req->vhost);
|
||||
srs_trace("source url=%s, ip=%s, cache=%d/%d, is_edge=%d, source_id=%s/%s",
|
||||
req->get_stream_url().c_str(), ip.c_str(), enabled_cache, gcmf, info->edge, source->source_id().c_str(),
|
||||
source->pre_source_id().c_str());
|
||||
source->set_cache(enabled_cache);
|
||||
source->set_gop_cache_max_frames(gcmf);
|
||||
|
||||
switch (info->type) {
|
||||
case SrsRtmpConnPlay: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue