### Description
When converting between AAC and Opus formats (aac2opus or opus2aac), the
`av_frame_get_buffer` API is frequently called.
### Objective
The goal is to optimize the code logic and reduce the frequent
allocation and deallocation of memory.
In the case of aac2opus, av_frame_get_buffer is still frequently called.
In the case of opus2aac, the goal is to avoid calling
av_frame_get_buffer and reduce memory allocations.
### Additional Note
Before calling the `av_audio_fifo_read` API, use
`av_frame_make_writable` to check if the frame is writable. If it is not
writable, create a new frame.
---------
Co-authored-by: john <hondaxiao@tencent.com>
By default, caching is enabled during compilation, which means that data
is cached in Docker. This helps to avoid compiling third-party
dependency libraries. However, sometimes when updating third-party
libraries, it's necessary to disable caching to temporarily verify if
the pipeline can succeed. Therefore, a configure option should be added.
When this option is enabled, the compilation cache will not be used, and
all third-party libraries will be compiled from scratch.
---------
Co-authored-by: winlin <winlinvip@gmail.com>
When accessing the SRS Stack, you should log in and use a token for each
request, or utilize the HTTP API with a secret Bearer token included in
every request. The SRS Stack HTTP API proxies both /api/v1 and /rtc/v1
to the SRS HTTP API while ensuring secure authentication. Additionally,
there is a console in the SRS Stack that requires the same token to
request the SRS Stack HTTP API, which is then proxied to the SRS HTTP
API.
The SRS Stack runs SRS with the HTTP API listening at 127.0.0.1:1985 on
the local loopback interface, allowing only the SRS Stack to access it
without authentication. All other users must login and access the SRS
Stack through its interface, rather than directly accessing the SRS HTTP
API within the SRS Stack.
---------
Co-authored-by: panda <542638787@qq.com>
* Replaced all occurrences of sprintf with snprintf to address deprecation warnings
* Ensured proper buffer size is passed to snprintf to prevent potential buffer overflows
* Ran tests to confirm that the changes do not introduce any new issues or regressions
---------
Co-authored-by: ChenGH <chengh_math@126.com>
* RTMP: Support enhanced RTMP specification for HEVC, v6.0.42.
* Player: Upgrade mpegts.js to support it.
Enhanced RTMP specification: https://github.com/veovera/enhanced-rtmp
First, start SRS `v6.0.42+` with HTTP-TS support:
```bash
./objs/srs -c conf/http.ts.live.conf
```
Then, you can use [OBS 29.1+](https://github.com/obsproject/obs-studio/releases) to push HEVC via RTMP.
Start OBS with the following settings in the `Settings > Stream` tab:
* Server: `rtmp://localhost/live`
* Stream Key: `livestream`
* Encoder: Please select the HEVC hardware encoder.
Finally, open the player http://localhost:8080/players/srs_player.html?stream=livestream.ts
Or use VLS or ffplay to play `http://localhost:8080/live/livestream.ts`
---------
Co-authored-by: chundonglinlin <chundonglinlin@163.com>
* Add utc time utility
* Fix calculate duration in fmp4
* Refine dash code, use segment template timeline
* Shrink m4s file and cleanup
* Support play by dash.js
* Use SegmentTemplate timeline mode with $Number$
Co-authored-by: winlin <winlin@vip.126.com>
01. Support GB config as StreamCaster.
02. Support disable GB by --gb28181=off.
03. Add utests for SIP examples.
04. Wireshark plugin to decode TCP/9000 as rtp.rfc4571
05. Support MPEGPS program stream codec.
06. Add utest for PS stream codec.
07. Decode MPEGPS packet stream.
08. Carry RTP and PS packet as helper in PS message.
09. Support recover from error mode.
10. Support process by a pack of PS/TS messages.
11. Add statistic for recovered and msgs dropped.
12. Recover from err position fastly.
13. Define state machine for GB session.
14. Bind context to GB session.
15. Re-invite when media disconnected.
16. Update GitHub actions with GB28181.
17. Support parse CANDIDATE by env or pip.
18. Support mux GB28181 to RTMP.
19. Support regression test by srs-bench.
* Forward: add backend config and demo server for dynamic create forwarder to other server.(#1342)
* Forward: if call forward backend failed, then return directly.
* Forward: add API description and change return value format.
* Forward: add backend conf file and wrapper function for backend service.
* Forward: add backend comment in full.conf and update forward.backend.conf.
* Forward: rename backend param and add comment tips.