Commit Graph

190 Commits (93cba246bc60e88a449ca62fa9652622e67c279a)

Author SHA1 Message Date
ChenGH 13597d1b7f
update copyright to 2025. v5.0.218 v6.0.159 v7.0.21 (#4271)
update copyright to 2025

---------

Co-authored-by: john <hondaxiao@tencent.com>
Co-authored-by: winlin <winlinvip@gmail.com>
1 month ago
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>
8 months ago
Jacob Su baf22d01c1
Refine config directive token parsing. v6.0.135 (#4042)
make sure one directive token don't span more than two lines.

try to fix #2228

---------

Co-authored-by: winlin <winlinvip@gmail.com>
8 months ago
winlin 4b5ae7b3d2 Package script support extra options. v5.0.102 2 years ago
ChenGH 961f701929
Sanitizer: Support address sanitizer for x86_64 platform (#3212)
* Sanitizer: Support address sanitizer for x86_64 platform
* Sanitizer: Not mac os need -static-libasan
* Sanitizer: Add script for docker test.
* Sanitizer: Refine build script.
* Santizer: Fix ossrs/srs:dev-gcc7-cache cannot find libasan bug
* Sanitizer: Support sanitizer when use ossrs/srs:dev-cache and ubuntuxx-cache
* Sanitizer: Add sanitizer-static config

Co-authored-by: winlin <winlin@vip.126.com>
2 years ago
winlin c225c3f745 Merge branch '4.0release' into develop 3 years ago
winlin 06cff31b24 Update script. 3 years ago
winlin 93aa0eb5ba Squash: Fix bugs 3 years ago
winlin 6a5bc27f9b Support configure with --config as default config file. v4.0.227 3 years ago
winlin 4110fb14cb Squash: Fix bugs. v5.0.20 3 years ago
winlin 6919011e86 Update sync script, ignore gb28181 3 years ago
winlin e16830e989 Squash: Merge 4.0.201 3 years ago
winlin bc063945f1 Build: Change make utest for test 3 years ago
winlin 04a8a2866b Release v4.0-b0, 4.0 beta0, v4.0.201, 144022 lines. 3 years ago
winlin da7fac0939 Release SRS v5.0.19, develop version, not stable 3 years ago
winlin e8380cda29 Demos: Remove the unused H5 demo files. (#2469) 3 years ago
winlin 4e6a3321cd Squash: Merge SRS 4.0 3 years ago
Haibo Chen eb3bbf1bca For #2549: Fix duration issue for HLS on_hls. v4.0.176 3 years ago
winlin a81aa2edc5 Squash: Merge SRS 4.0 3 years ago
winlin 9edf63bd30 3rdparty: Sync httpx-static 3 years ago
winlin 38b0b1dab2 Squash: Fix ingest bug. Refine AUTHORS. 4 years ago
winlin 4ca433d3f8 Refine push script 4 years ago
winlin 9f5d011687 Squash: Fix build fail for arm/aarch64 4 years ago
winlin 81a5c1b8da Move AUTHORS.txt to trunk for docker to access it 4 years ago
winlin a594678e3d Squash #1685, #1282, #1547: Support ARM platform. 5.0.5 4 years ago
winlin fed57f6f17 Refine scripts 4 years ago
winlin 7e657ae654 Refine AUTHORS format 4 years ago
winlin 689100f651 Refine AUTHORS format 4 years ago
winlin 15901cacee SquashSRS4: Use SPDX-License-Identifier: MIT. 5.0.3 4 years ago
winlin 3cd22b6e6e Use SPDX-License-Identifier: MIT. 4.0.124 4 years ago
winlin 34aa11b72a SquashSRS4: Update doc 4 years ago
winlin 476e114cc4 Update doc 4 years ago
winlin becbe45bcd SquashSRS4: Add demo for RTC 4 years ago
winlin b42bf496c7 Tools: Update script 4 years ago
winlin dea6136238 Copy demos to SRS release 4 years ago
winlin 0b62216999 SquashSRS4: Support av1 for Chrome M90 enabled it. 4 years ago
winlin a5727c373a Script: Remove unused git2unix.sh 4 years ago
winlin e67207f4b1 Script: Refine package and install script 4 years ago
winlin d4a8a72388 SquashSRS4: Add console. Disable cherrypy by default. 4 years ago
winlin de1c7522f0 SquashSRS3: Add console 4 years ago
winlin 9ed7565789 SquashSRS3: Package srs-console 4 years ago
winlin 8b74c7cb89 SquashSRS4: Happy 2021 4 years ago
winlin 124455be09 Update script 4 years ago
winlin 1ee77614fb Refine comments 4 years ago
winlin 5139816feb Remove unused files 5 years ago
winlin 23ddcbdaed Update authors 5 years ago
winlin 9e031c9932 Update script 5 years ago
winlin e4eb501c57 Fix the perf stat bytes bug 5 years ago
winlin cac5bbddf6 Refine comments 5 years ago
winlin 14e3ec2fe8 For #307, drop frame when VBR too high 5 years ago