API: Remove HTTP-RAW-API capability, RAW API removed.
winlinvip opened this issue · 1 comments
RAW API implementation is about how to modify the configuration and reload it. The most natural way is to write a backend server using Go or Node.js. After modifying the configuration file, you can send a signal to SRS or call the reload API. Moreover, how to modify the configuration and when to modify it are strongly related to the business, and they are part of the business system. Therefore, they were removed in version 4.0.
RAW API is removed because it implements the config file modify and reload, which should do by user server.
HTTP RAW API was introduced in version 3.0 as an experimental capability.
It mainly provides the ability to modify the system's API, primarily through modifying configuration files and then reloading them to take effect. After providing this capability, there have been continuous bug reports related to it, so it has been decided to remove this experimental capability in version 4.0.
The main reason for its numerous issues is that the business system, which should have been implemented by the users, was implemented within the RAW API. For example, on-demand recording only requires recording certain streams.
- A typical approach is to create a separate system to manage FFmpeg processes, where each FFmpeg process pulls streams for recording, and HTTP callbacks are used to determine which streams need to be recorded.
- Alternatively, HLS can be used to write ts files, and the
on_hlscallback can be used to decide which streams should be recorded. - With the modification of the RAW API's
dvr_apply, recording can be enabled for certain streams.
Using the RAW API can trigger a significant number of boundary conditions, where streams may start and stop pushing, and the recording rules can be highly diversified. These are typical considerations that recording services need to take into account, as each recording may have different requirements, rather than being suitable for implementation in a generic open-source solution.
TRANS_BY_GPT3
RAW API opened by SRS3:
- https://github.com/ossrs/srs/wiki/v3_CN_HTTPApi#http-raw-api
- https://github.com/ossrs/srs/wiki/v3_EN_HTTPApi#http-raw-api
Only partial capabilities are retained in SRS4:
- https://github.com/ossrs/srs/wiki/v4_CN_HTTPApi#http-raw-api
- https://github.com/ossrs/srs/wiki/v4_EN_HTTPApi#http-raw-api
Retained RAW API capabilities:
- /api/v1/raw?rpc=raw Query the configuration of the server-side HTTP RAW API.
- /api/v1/raw?rpc=reload Can reload the configuration, which has the same effect as
killall -1 srs.
All others will be disabled, and the configuration will be changed to:
allow_reload on|off;allow_query off;Not supported to enable, query before update.allow_update off;Not supported to enable, update configuration.
TRANS_BY_GPT3