Commit Graph

49 Commits

Author SHA1 Message Date
john
02c6e60e3a update copyright to 2025. v6.0.159 (#4271)
update copyright to 2025

---------

Co-authored-by: john <hondaxiao@tencent.com>
Co-authored-by: winlin <winlinvip@gmail.com>
2025-02-24 19:34:34 +08:00
Winlin
b830d688be Heartbeat: Report ports for proxy server. v6.0.156 (#4171)
The heartbeat of SRS is a timer that requests an HTTP URL. We can use
this heartbeat to report the necessary information for registering the
backend server with the proxy server.

```text
SRS(backend) --heartbeat---> Proxy server
```

A proxy server is a specialized load balancer for media servers. It
operates at the application level rather than the TCP level. For more
information about the proxy server, see issue #4158.

Note that we will merge this PR into SRS 5.0+, allowing the use of SRS
5.0+ as the backend server, not limited to SRS 7.0. However, the proxy
server is introduced in SRS 7.0.

It's also possible to implement a registration service, allowing you to
use other media servers as backend servers. For example, if you gather
information about an nginx-rtmp server and register it with the proxy
server, the proxy will forward RTMP streams to nginx-rtmp. The backend
server is not limited to SRS.

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
2024-09-09 10:40:46 +08:00
Winlin
23d2602c34
UniquePtr: Support SrsUniquePtr to replace SrsAutoFree. v6.0.136 (#4109)
To manage an object:

```cpp
// Before
MyClass* ptr = new MyClass();
SrsAutoFree(MyClass, ptr);
ptr->do_something();

// Now
SrsUniquePtr<MyClass> ptr(new MyClass());
ptr->do_something();
```

To manage an array of objects:

```cpp
// Before
char* ptr = new char[10];
SrsAutoFreeA(char, ptr);
ptr[0] = 0xf;

// Now
SrsUniquePtr<char[]> ptr(new char[10]);
ptr[0] = 0xf;
```

In fact, SrsUniquePtr is a limited subset of SrsAutoFree, mainly
managing pointers and arrays. SrsUniquePtr is better than SrsAutoFree
because it has the same API to standard unique ptr.

```cpp
SrsUniquePtr<MyClass> ptr(new MyClass());
ptr->do_something();
MyClass* p = ptr.get();
```

SrsAutoFree actually uses a pointer to a pointer, so it can be set to
NULL, allowing the pointer's value to be changed later (this usage is
different from SrsUniquePtr).

```cpp
// OK to free ptr correctly.
MyClass* ptr;
SrsAutoFree(MyClass, ptr);
ptr = new MyClass();

// Crash because ptr is an invalid pointer.
MyClass* ptr;
SrsUniquePtr<MyClass> ptr(ptr);
ptr = new MyClass();
```

Additionally, SrsAutoFreeH can use specific release functions, which
SrsUniquePtr does not support.

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
2024-07-09 10:29:36 +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
winlin
d117145b95 Update date from 2021 to 2022. 2022-06-20 19:22:25 +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
15901cacee SquashSRS4: Use SPDX-License-Identifier: MIT. 5.0.3 2021-05-31 13:42:20 +08:00
winlin
8b74c7cb89 SquashSRS4: Happy 2021 2021-04-16 09:29:43 +08:00
winlin
d552a1a5fb For #1657, support HTTPS client, for http-callback. 4.0.45 2020-11-03 15:45:52 +08:00
winlin
215b1c234b Refine the local ip and interface retrieve 2020-05-09 10:40:25 +08:00
winlin
d783a12f89 Happy 2020 2019-12-30 10:10:35 +08:00
winlin
b2d1d84634 Change to 2019 2019-01-01 21:37:28 +08:00
winlin
ca1395a807 Change date from 2017 to 2018 2018-01-07 10:58:53 +08:00
Thomas Dreibholz
feaae341b9 IPv6 support (for 3.0 release) (#988)
* IPv6 support, part 1.

* IPv6 support, part 2.

* Some more IPv6 work.

* Made functions for address:port paŕsing IPv6-capable.

* Fixed type (compile warning).

* Fixed formatting.

* Reverted option change.

* Replaced abort() by proper error handling.

* Also retrieving local IPv6 addresses now.
2018-01-01 22:43:58 +08:00
winlin
6eae93258a For #913, APP support complex error. 2018-01-01 19:39:57 +08:00
winlin
20a42599f3 For #913, http callback use complex error 2017-09-22 19:54:50 +08:00
winlin
0a57a46016 Refine LICENSE 2017-03-25 21:29:29 +08:00
winlin
f32aab3d92 For #299, refine code. 2017-03-25 17:21:39 +08:00
winlin
a1fcf66f32 for #742, always enable http utilities. 2017-01-23 17:43:59 +08:00
winlin
7ac932cfa0 update to 2013-2017 2016-12-16 11:57:25 +08:00
winlin
d0c74fa7cd update 2015 to 2016 2015-12-23 11:35:40 +08:00
winlin
01c46bdbfd rename org simle-rtmp-server to ossrs 2015-11-11 10:45:45 +08:00
winlin
1ffd5fd455 rename org simple-rtmp-server to ossrs 2015-11-11 10:37:50 +08:00
winlin
168625dce2 rename rtmp amf0 to protocol amf0. 2015-09-22 09:05:21 +08:00
winlin
3042115385 refine json to_str to dumps. 2015-09-19 13:37:56 +08:00
winlin
3f7e69b617 json objects support dumps to string. 2015-09-19 12:27:31 +08:00
winlin
04bea781ca use amf0 encode for json encode. 2015-08-28 15:11:11 +08:00
winlin
66a26bdce8 move json from app to protocol 2015-08-21 16:20:19 +08:00
winlin
0aa053433c fix #132: build failed when enable the info or verbose log. 2015-07-10 11:50:35 +08:00
winlin
fec8422d6b fix bug of configure. 2015-05-27 10:23:40 +08:00
winlin
6bfb743aa0 remove the unused app http file 2015-05-22 22:38:15 +08:00
winlin
f0ae66a081 merge the app http to conn. 2015-05-22 22:34:03 +08:00
winlin
ce1bb6c605 refine code, extrat the ISrsHttpMessage. 2015-05-22 22:24:05 +08:00
winlin
b23e196f20 migarate from winlinvip to srs org, move the copyright to srs org. 2015-04-29 17:38:23 +08:00
winlin
c6817cc422 for #354, remove the double underscore of macro. 2015-03-21 10:25:03 +08:00
winlin
1277968d4a refine http client, use initialize to set host and port. 2015-03-06 12:07:12 +08:00
winlin
964e4be9d4 refine http request post. 2.0.132. 2015-03-06 11:51:20 +08:00
winlin
9d34820c80 fix #158: http-callback check http status code ok(200). 2.0.84 2015-01-02 10:21:04 +08:00
winlin
569596c10d update copyright, from 2013 to 2015 2014-12-31 20:32:09 +08:00
winlin
7b24788445 for bug #143, build on centos5. 2014-08-02 22:18:39 +08:00
winlin
f4ea48adcb rename network_device_index to network 2014-07-27 18:39:20 +08:00
winlin
e76036f40b refine config heartbeat, add new stats. 0.9.175 2014-07-27 14:43:55 +08:00
winlin
8497b22d4a complete the consts refine 2014-07-20 13:45:54 +08:00
winlin
f173345e15 support report summaries in heartbeat. 0.9.132 2014-06-23 15:44:49 +08:00
winlin
ef0f7f4da8 support http heartbeat, 0.9.107 2014-05-19 17:39:01 +08:00
winlin
cb95b5909c add http heartbeat framework 2014-05-19 15:45:04 +08:00