Comments (2)
APIs and WebRTC are capable of functioning together, and the type of protocol can be determined based on the content of the body. If they do not work well together, it is actually due to issues with the software implementation rather than the protocols being unable to recognize each other.
Since the Listener is a mechanism that is continuously patched, it is not considered reasonable. A better approach would be to completely redesign the mechanism of the Listener.
It is important to note that the SRT's listener requires special handling. For reference, see the issue at #3251 (comment). This issue necessitates improvements to the current structure.
TRANS_BY_GPT4
from srs.
Let APIs and WebRTC works on same endpoints would be easy, just refer the reuse_rtc_over_server_
code will add this feature, and really make sense, if reuse_api_over_server_
& reuse_rtc_over_server_
can be both true, then why not another reuse_rtc_over_api_
? This is a small patch, can introduce a tiny but controllable complexity.
I like the SrsTcpListener
's design, it's really light weight, lower-level abstraction and flexible, maybe I didn't know more better one.
One more thing to consider, the listen
config, I notice the inconsistence here.
srs/trunk/src/app/srs_app_listener.cpp
Lines 256 to 261 in 427104f
srs/trunk/src/kernel/srs_kernel_utility.cpp
Lines 239 to 257 in 427104f
srs/trunk/src/app/srs_app_config.hpp
Lines 415 to 418 in 427104f
srs/trunk/src/app/srs_app_config.hpp
Lines 1028 to 1029 in 427104f
virtual std::string get_http_api_listen();
virtual std::string get_https_api_listen();
// Get the http stream listen port.
virtual std::string get_http_stream_listen();
virtual std::string get_https_stream_listen();
virtual std::string get_exporter_listen();
For the RTMP, http_api, http_server, the listen
config means endpoint = [ip4/6 | any address] + port;
But for the rest of the listens, which means just port number (or just ipv4 loop back address + port number).
virtual std::vector<std::string> get_listens();
// Get the listen port of stream caster.
virtual int get_stream_caster_listen(SrsConfDirective* conf);
// Get the sip.listen port configuration.
virtual int get_stream_caster_sip_listen(SrsConfDirective* conf);
virtual int get_rtc_server_listen();
virtual int get_rtc_server_tcp_listen();
// Get the srt service listen port
virtual unsigned short get_srt_listen_port();
Here is how gb28181 config its listener, I think it lost its flexibility.
srs/trunk/src/app/srs_app_gb28181.cpp
Lines 417 to 439 in 427104f
Because srs_any_address_for_listener()
will return the ipv4 loopback in priority. I would rather suggest use a string
to represent the listen
config, at least it have the capacity of ipv6 address and explicit ip addresses (for the machine with multi physical and virtual network interfaces).
from srs.
Related Issues (20)
- How to increase latency to ensure video transmission?
- When switching live streams, the edge server encounters an error while retrieving the source_url. HOT 3
- How to live stream from your phone and publish it via WebRTC.
- Mac Os build failed HOT 2
- Cannot boot a SRS docker container when using docker -v HOT 1
- srs 4.0 memory leak HOT 2
- Bug: SrsHttpxConn SSL Key&Cert config problem. HOT 3
- RTSP: FFmpeg convert to RTMP, the HLS TS file size is too short. HOT 6
- How to set authentication for rtmp HOT 2
- Rtmp authentication HOT 1
- WebRTC WHEP URL playback is stuttering in Google Chrome browser. HOT 1
- HTTPS: SSL errors in safari and chrome. HOT 1
- RTMP: Response accurate error when rejecting OBS.
- Standalone binary HOT 1
- Version 6.0/5.0 configuration parsing options: Configuration file not found at conf/docker.conf. HOT 1
- API: The VmSize of SRS is huge and incorrect, if enabled asan. HOT 2
- WebRTC WHEP URL playback is stuttering in Google Chrome browser.
- C++ HOT 1
- Oryx: Support subtitle 608/708 format by FFmpeg
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srs.