Skip to content

Commit

Permalink
optimize parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mapengfei53 committed Apr 24, 2022
1 parent 03c3a1f commit 895acf2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion trunk/src/app/srs_app_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ srs_error_t SrsHlsController::on_publish(SrsRequest* req)
// This config item is used in SrsHls, we just log its value here.
bool hls_dts_directly = _srs_config->get_vhost_hls_dts_directly(req->vhost);

srs_trace("hls: win=%dms, frag=%dms, prefix=%s, path=%s, m3u8=%s, ts=%s, aof=%.2f, floor=%d, clean=%d, waitk=%d, dispose=%dms, dts_directly=%d, delay_cleanup=%d",
srs_trace("hls: win=%dms, frag=%dms, prefix=%s, path=%s, m3u8=%s, ts=%s, aof=%.2f, floor=%d, clean=%d, waitk=%d, dispose=%dms, dts_directly=%d, delay_cleanup=%dms",
srsu2msi(hls_window), srsu2msi(hls_fragment), entry_prefix.c_str(), path.c_str(), m3u8_file.c_str(), ts_file.c_str(),
hls_aof_ratio, ts_floor, cleanup, wait_keyframe, srsu2msi(hls_dispose), hls_dts_directly, srsu2msi(hls_delay_cleanup));

Expand Down
5 changes: 2 additions & 3 deletions trunk/src/app/srs_app_hybrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ srs_error_t SrsHybridServer::on_timer(srs_utime_t interval)

SrsTsFragment::SrsTsFragment(srs_utime_t time, std::string path)
{
die_at = srs_get_system_time();
delay_time = time;
die_at = srs_get_system_time() + time;
filepath = path;
}

Expand All @@ -403,7 +402,7 @@ SrsTsFragment::~SrsTsFragment()
bool SrsTsFragment::expired()
{
srs_utime_t now = srs_get_system_time();
if (now > die_at + delay_time) {
if (now > die_at) {
return true;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/src/app/srs_app_hybrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class SrsTsFragment
{
private:
srs_utime_t die_at;
srs_utime_t delay_time;
std::string filepath;
public:
SrsTsFragment(srs_utime_t time, std::string path);
Expand Down

0 comments on commit 895acf2

Please sign in to comment.