mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '3.0release' into 4.0release
This commit is contained in:
commit
913d920ec5
3 changed files with 9 additions and 5 deletions
|
@ -201,6 +201,7 @@ For previous versions, please read:
|
||||||
|
|
||||||
## V3 changes
|
## V3 changes
|
||||||
|
|
||||||
|
* v3.0, 2020-10-14, Fix [#1987][bug #1987], Fix Kbps resample bug. 3.0.145
|
||||||
* <strong>v3.0, 2020-10-10, [3.0 release1(3.0.144)][r3.0r1] released. 122674 lines.</strong>
|
* <strong>v3.0, 2020-10-10, [3.0 release1(3.0.144)][r3.0r1] released. 122674 lines.</strong>
|
||||||
* v3.0, 2020-10-10, Fix [#1780][bug #1780], build fail on Ubuntu20(focal). 3.0.144
|
* v3.0, 2020-10-10, Fix [#1780][bug #1780], build fail on Ubuntu20(focal). 3.0.144
|
||||||
* v3.0, 2020-09-14, Prevent stop ingest for multiple times. 3.0.143
|
* v3.0, 2020-09-14, Prevent stop ingest for multiple times. 3.0.143
|
||||||
|
@ -1763,6 +1764,7 @@ Winlin
|
||||||
[bug #1619]: https://github.com/ossrs/srs/issues/1619
|
[bug #1619]: https://github.com/ossrs/srs/issues/1619
|
||||||
[bug #1629]: https://github.com/ossrs/srs/issues/1629
|
[bug #1629]: https://github.com/ossrs/srs/issues/1629
|
||||||
[bug #1780]: https://github.com/ossrs/srs/issues/1780
|
[bug #1780]: https://github.com/ossrs/srs/issues/1780
|
||||||
|
[bug #1987]: https://github.com/ossrs/srs/issues/1987
|
||||||
[bug #yyyyyyyyyyyyy]: https://github.com/ossrs/srs/issues/yyyyyyyyyyyyy
|
[bug #yyyyyyyyyyyyy]: https://github.com/ossrs/srs/issues/yyyyyyyyyyyyy
|
||||||
|
|
||||||
[bug #1631]: https://github.com/ossrs/srs/issues/1631
|
[bug #1631]: https://github.com/ossrs/srs/issues/1631
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
#ifndef SRS_CORE_VERSION3_HPP
|
#ifndef SRS_CORE_VERSION3_HPP
|
||||||
#define SRS_CORE_VERSION3_HPP
|
#define SRS_CORE_VERSION3_HPP
|
||||||
|
|
||||||
#define SRS_VERSION3_REVISION 144
|
#define SRS_VERSION3_REVISION 145
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -166,22 +166,24 @@ void SrsKbps::set_io(ISrsProtocolStatistic* in, ISrsProtocolStatistic* out)
|
||||||
|
|
||||||
int SrsKbps::get_send_kbps()
|
int SrsKbps::get_send_kbps()
|
||||||
{
|
{
|
||||||
srs_utime_t duration = clk->now() - is.starttime;
|
int duration = srsu2ms(clk->now() - is.starttime);
|
||||||
if (duration <= 0) {
|
if (duration <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t bytes = get_send_bytes();
|
int64_t bytes = get_send_bytes();
|
||||||
return (int)(bytes * 8 / srsu2ms(duration));
|
return (int)(bytes * 8 / duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SrsKbps::get_recv_kbps()
|
int SrsKbps::get_recv_kbps()
|
||||||
{
|
{
|
||||||
srs_utime_t duration = clk->now() - os.starttime;
|
int duration = srsu2ms(clk->now() - os.starttime);
|
||||||
if (duration <= 0) {
|
if (duration <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t bytes = get_recv_bytes();
|
int64_t bytes = get_recv_bytes();
|
||||||
return (int)(bytes * 8 / srsu2ms(duration));
|
return (int)(bytes * 8 / duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SrsKbps::get_send_kbps_30s()
|
int SrsKbps::get_send_kbps_30s()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue