RTC: For #1657, support http hooks on_play/stop/publish/unpublish#2509
RTC: For #1657, support http hooks on_play/stop/publish/unpublish#2509winlinvip merged 4 commits intoossrs:developfrom
Conversation
|
Due to the special nature of WebRTC, signaling and data are two separate channels.
|
Codecov Report
@@ Coverage Diff @@
## develop #2509 +/- ##
===========================================
- Coverage 42.70% 42.64% -0.07%
===========================================
Files 102 102
Lines 36058 36117 +59
===========================================
+ Hits 15400 15401 +1
- Misses 20658 20716 +58 | Impacted Files | Coverage Δ | |' Translated to English while maintaining the markdown structure: '| Impacted Files | Coverage Δ | | Translated to English while maintaining the markdown structure: | trunk/src/app/srs_app_rtc_api.cpp | Continue to review full report at Codecov.
Translated to English while maintaining the markdown structure: |
|
|
Record an idea, usually there is a "start streaming" and a "stop streaming", but it seems that WebRTC doesn't pay much attention to this point. The player provided by SRS also does not provide an entry for "stop streaming". In the future, it may be considered to add a status button on the SRS playback page. In the WebRTC scenario, after "start streaming", it will check the streaming status. If the streaming is normal, the button will change to "stop streaming". Users can actively stop the WebRTC streaming through the http API (signaling).
|
| SrsRtcPlayStream::~SrsRtcPlayStream() | ||
| { | ||
| if (req_) { | ||
| http_hooks_on_stop(); |
There was a problem hiding this comment.
This is the issue that Guanghua mentioned before, regarding the problem of calling HTTP hooks in the destructor function.
publish' and 'play' must be called synchronously because they have authentication functionality.
unpublish' and 'stop' definitely do not require authentication, so it is possible to call them asynchronously.
Refer to ISrsAsyncCallTask.
Calling HTTP in the destructor can lead to coroutine switching, which carries a high risk.
TRANS_BY_GPT3
No description provided.