1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge SRS3

This commit is contained in:
winlin 2020-01-25 15:05:52 +08:00
commit bbc7023f85
4 changed files with 41 additions and 0 deletions

23
trunk/conf/dash.conf Normal file
View file

@ -0,0 +1,23 @@
# the config for srs to delivery dash
# @see https://github.com/ossrs/srs/wiki/v1_CN_SampleDASH
# @see full.conf for detail config.
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
dash {
enabled on;
dash_fragment 30;
dash_update_period 150;
dash_timeshift 300;
dash_path ./objs/nginx/html;
dash_mpd_file [app]/[stream].mpd;
}
}

View file

@ -6,6 +6,11 @@ listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
hls {
enabled on;

View file

@ -813,7 +813,16 @@ srs_error_t SrsDvrSegmentPlan::on_publish()
void SrsDvrSegmentPlan::on_unpublish()
{
srs_error_t err = srs_success;
SrsDvrPlan::on_unpublish();
if ((err = segment->close()) != srs_success) {
srs_warn("ignore err %s", srs_error_desc(err).c_str());
srs_freep(err);
}
dvr_enabled = false;
}
srs_error_t SrsDvrSegmentPlan::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* format)