revert the copyrigh, only when commit feature, add the copyright field
正在显示
5 个修改的文件
包含
29 行增加
和
4 行删除
| @@ -31,6 +31,9 @@ vhost demo.srs.com { | @@ -31,6 +31,9 @@ vhost demo.srs.com { | ||
| 31 | gop_cache on; | 31 | gop_cache on; |
| 32 | queue_length 30; | 32 | queue_length 30; |
| 33 | forward 127.0.0.1:19350; | 33 | forward 127.0.0.1:19350; |
| 34 | + bandcheck { | ||
| 35 | + enabled off; | ||
| 36 | + } | ||
| 34 | hls { | 37 | hls { |
| 35 | enabled on; | 38 | enabled on; |
| 36 | hls_path ./objs/nginx/html; | 39 | hls_path ./objs/nginx/html; |
| @@ -200,6 +203,31 @@ vhost dev { | @@ -200,6 +203,31 @@ vhost dev { | ||
| 200 | } | 203 | } |
| 201 | } | 204 | } |
| 202 | 205 | ||
| 206 | +# vhost for bandwidth check | ||
| 207 | +# generally, the bandcheck vhost must be: bandcheck.srs.com, | ||
| 208 | +# or need to modify the vhost of client. | ||
| 209 | +vhost bandcheck.srs.com { | ||
| 210 | + enabled on; | ||
| 211 | + chunk_size 65000; | ||
| 212 | + # bandwidth check config. | ||
| 213 | + bandcheck { | ||
| 214 | + # whether support bandwidth check, | ||
| 215 | + # default: off. | ||
| 216 | + enabled on; | ||
| 217 | + # the key for server to valid, | ||
| 218 | + # if invalid key, server disconnect and abort the bandwidth check. | ||
| 219 | + key 35c9b402c12a7246868752e2878f7e0e; | ||
| 220 | + # the interval in seconds for bandwidth check, | ||
| 221 | + # server donot allow new test request. | ||
| 222 | + # default: 30 | ||
| 223 | + interval 30; | ||
| 224 | + # the max available check bandwidth in kbps. | ||
| 225 | + # to avoid attack of bandwidth check. | ||
| 226 | + # default: 1000 | ||
| 227 | + limit_kbps 4000; | ||
| 228 | + } | ||
| 229 | +} | ||
| 230 | + | ||
| 203 | # set the chunk size of vhost. | 231 | # set the chunk size of vhost. |
| 204 | vhost chunksize.vhost.com { | 232 | vhost chunksize.vhost.com { |
| 205 | # the default chunk size is 128, max is 65536, | 233 | # the default chunk size is 128, max is 65536, |
trunk/src/core/srs_core.cpp
100644 → 100755
| @@ -43,7 +43,7 @@ void srs_update_system_time_ms() | @@ -43,7 +43,7 @@ void srs_update_system_time_ms() | ||
| 43 | gettimeofday(&now, NULL); | 43 | gettimeofday(&now, NULL); |
| 44 | 44 | ||
| 45 | // we must convert the tv_sec/tv_usec to int64_t. | 45 | // we must convert the tv_sec/tv_usec to int64_t. |
| 46 | - _srs_system_time_us_cache = now.tv_sec * 1000 * 1000 + now.tv_usec; | 46 | + _srs_system_time_us_cache = ((int64_t)now.tv_sec) * 1000 * 1000 + (int64_t)now.tv_usec; |
| 47 | 47 | ||
| 48 | _srs_system_time_us_cache = srs_max(0, _srs_system_time_us_cache); | 48 | _srs_system_time_us_cache = srs_max(0, _srs_system_time_us_cache); |
| 49 | } | 49 | } |
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | The MIT License (MIT) | 2 | The MIT License (MIT) |
| 3 | 3 | ||
| 4 | Copyright (c) 2013 winlin | 4 | Copyright (c) 2013 winlin |
| 5 | -Copyright (c) 2013 wenjiegit | ||
| 6 | 5 | ||
| 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of |
| 8 | this software and associated documentation files (the "Software"), to deal in | 7 | this software and associated documentation files (the "Software"), to deal in |
trunk/src/core/srs_core_config.cpp
100644 → 100755
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | The MIT License (MIT) | 2 | The MIT License (MIT) |
| 3 | 3 | ||
| 4 | Copyright (c) 2013 winlin | 4 | Copyright (c) 2013 winlin |
| 5 | -Copyright (c) 2013 wenjiegit | ||
| 6 | 5 | ||
| 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of |
| 8 | this software and associated documentation files (the "Software"), to deal in | 7 | this software and associated documentation files (the "Software"), to deal in |
trunk/src/core/srs_core_config.hpp
100644 → 100755
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | The MIT License (MIT) | 2 | The MIT License (MIT) |
| 3 | 3 | ||
| 4 | Copyright (c) 2013 winlin | 4 | Copyright (c) 2013 winlin |
| 5 | -Copyright (c) 2013 wenjiegit | ||
| 6 | 5 | ||
| 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of |
| 8 | this software and associated documentation files (the "Software"), to deal in | 7 | this software and associated documentation files (the "Software"), to deal in |
-
请 注册 或 登录 后发表评论