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

108 commits

Author SHA1 Message Date
Winlin
0d76081430
API: Support new HTTP API for VALGRIND. v6.0.149 v7.0.6 (#4150)
New features for valgrind:

1. ST: Support /api/v1/valgrind for leaking check.
2. ST: Support /api/v1/valgrind?check=full|added|changed|new|quick

To use Valgrind to detect memory leaks in SRS, even though Valgrind
hooks are supported in ST, there are still many false positives. A more
reasonable approach is to have Valgrind report incremental memory leaks.
This way, global and static variables can be avoided, and detection can
be achieved without exiting the program. Follow these steps:

1. Compile SRS with Valgrind support: `./configure --valgrind=on &&
make`
2. Start SRS with memory leak detection enabled: `valgrind
--leak-check=full ./objs/srs -c conf/console.conf`
3. Trigger memory detection by using curl to access the API and generate
calibration data. There will still be many false positives, but these
can be ignored: `curl http://127.0.0.1:1985/api/v1/valgrind?check=added`
4. Perform load testing or test the suspected leaking functionality,
such as RTMP streaming: `ffmpeg -re -i doc/source.flv -c copy -f flv
rtmp://127.0.0.1/live/livestream`
5. Stop streaming and wait for SRS to clean up the Source memory,
approximately 30 seconds.
6. Perform incremental memory leak detection. The reported leaks will be
very accurate at this point: `curl
http://127.0.0.1:1985/api/v1/valgrind?check=added`

> Note: To avoid interference from the HTTP request itself on Valgrind,
SRS uses a separate coroutine to perform periodic checks. Therefore,
after accessing the API, you may need to wait a few seconds for the
detection to be triggered.

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
2024-08-21 15:39:01 +08:00
winlin
2a2da2253f Switch to 2013-2024. v6.0.109 2024-01-01 10:51:24 +08:00
winlin
29eff1a242 Refine LICENSE. 2023-10-23 14:33:19 +08:00
winlin
c46ef81ff2 SRS5: Update license date to 2023. v5.0.123
PICK 72f8ed4916
2023-01-01 08:56:20 +08:00
chundonglinlin
981cab40d3
API: support metrics for prometheus.(#2899) (#3189)
* API: support metrics for prometheus.

* Metrics: optimize metrics statistics info.

* Refine: remove redundant code.

* Refine: fix metrics srs_streams param.

* Metrics: add major param.

* Metrics: refine params and metric comments.

* For #2899: API: Support exporter for Prometheus. v5.0.67

Co-authored-by: winlin <winlin@vip.126.com>
2022-09-27 15:39:26 +08:00
winlin
457738f6eb Fix #2881: HTTP: Support merging api to server. v5.0.47 2022-08-28 13:11:31 +08:00
winlin
d117145b95 Update date from 2021 to 2022. 2022-06-20 19:22:25 +08:00
winlin
fa78cf3354 Prefix with srs_protocol in protocol directory. 2022-06-09 20:26:58 +08:00
winlin
d5c86dc5fa Switch LICENSE from MIT to **MIT or MulanPSL-2.0**. v5.0.21 2022-01-13 18:40:22 +08:00
Winlin
c8a1e0f3da
Refine AUTHORS.txt to AUTHORS.md, etc. 5.0.8 (#2464)
* Refine AUTHORS.txt to AUTHORS.md, etc. 5.0.8

* Update README.md

* Update README.md

* Refine format for AUTHORS.md
2021-07-08 14:30:47 +08:00
winlin
efdbf37255 Squash: Move GB28181 to feature/gb28181. 5.0.4 2021-06-16 14:03:55 +08:00
winlin
15901cacee SquashSRS4: Use SPDX-License-Identifier: MIT. 5.0.3 2021-05-31 13:42:20 +08:00
winlin
6a980683f7 SquashSRS4: Remove object cache and stat api 2021-05-14 18:17:42 +08:00
winlin
8b74c7cb89 SquashSRS4: Happy 2021 2021-04-16 09:29:43 +08:00
winlin
272ca9d0f6 For #1657, Support HTTPS API 2020-11-06 15:05:01 +08:00
winlin
7916214e27 For #1657, refine api for http 2020-11-06 09:51:04 +08:00
winlin
c3d290013e For #1657, handle on_message_done 2020-11-05 18:34:56 +08:00
winlin
4b082ea96c For #1657, refine http api disconnect log 2020-11-05 18:19:43 +08:00
winlin
74799a31e3 For #1657, refine on_http_message with response writer 2020-11-05 18:08:13 +08:00
winlin
fc21b31714 For #1657, refine the context for disposing 2020-11-05 17:16:59 +08:00
winlin
0a3a38762a For #1657: Remove duplicated code, merge http api with conn 2020-11-05 16:46:16 +08:00
winlin
2a14dc0ebd For #1657: Refine TCP connections arch 2020-11-05 12:25:54 +08:00
winlin
4ba66b388b For #1657: Refine TCP connections arch 2020-11-05 11:47:24 +08:00
winlin
0a82719bd3 Refine connection structure 2020-11-04 18:15:43 +08:00
winlin
64705d1cc8 RTC: Refine resouce management 2020-09-19 10:30:05 +08:00
winlin
88826aae8f Rename SrsConnection to SrsTcpConnection 2020-09-11 16:59:22 +08:00
winlin
81a7c252d6 TCP: Log the remote port for client. 2020-07-04 17:19:08 +08:00
忘篱
acc53ded89 RTC: Extract RTC api file 2020-05-17 19:40:45 +08:00
winlin
db503975fb Disable simulator API by default. 2020-05-07 16:29:11 +08:00
winlin
8c4b6d3166 Support disable NACK in config 2020-05-04 20:42:30 +08:00
winlin
4d33070c59 Support NACK for RTC player 2020-05-04 14:47:58 +08:00
winlin
a23f102874 Refactor RTC, rename variables. 2020-05-03 13:49:53 +08:00
winlin
ed338f4c0a Refactor macro SRS_AUTO_XXX to SRS_XXX. 2020-04-29 20:02:28 +08:00
xiaozhihong
a061d5c3db rtc publish, with debug code 2020-04-23 17:08:21 +08:00
winlin
82396ec112 Refactor GB28181 code 2020-04-21 15:25:50 +08:00
winlin
35a037cf05 Add api for tcmalloc 2020-04-07 14:24:14 +08:00
winlin
40c95b04ca Merge remote-tracking branch 'winlin/feature/perf_stat' into feature/rtc 2020-04-05 23:01:21 +08:00
winlin
608f3d0fae For #1500, support push stream by GB28181. 4.0.18 2020-03-31 23:06:07 +08:00
winlin
e19b927f92 Merge GB28181 2020-03-31 22:45:20 +08:00
xialixin
c99fb99ab6 refactor gb28181, supporting SIP server enable, multiplex, API interface 2020-03-31 00:39:10 +08:00
xiaozhihong
49da2099c1 sdp exchange. 2020-03-30 15:16:29 +08:00
winlin
90a39ec46d Add api to stat mw iovec 2020-03-27 13:37:39 +08:00
winlin
602a478e1b For #1659, #307, add switch to disable rtc 2020-03-22 18:17:05 +08:00
winlin
3f6a2871b0 For #1638, #307, show error information when api failed. 2020-03-21 19:00:47 +08:00
winlin
2c4dc0fb3d For #1638, #307, extract rtc server to hybrid manager. 2020-03-17 17:56:37 +08:00
xiaozhihong
9d5495c0c2 "stun and dtls done" 2020-03-06 23:01:48 +08:00
xiaozhihong
51abb0844e rtp session manager, stun codding 2020-02-23 23:19:40 +08:00
xiaozhihong
bc22ebe949 add rtc http request and response, exchange sdp. 2020-02-21 23:50:22 +08:00
winlin
d783a12f89 Happy 2020 2019-12-30 10:10:35 +08:00
winlin
6b2c71d385 Refine typo in files. 3.0.51 2019-04-30 08:30:13 +08:00