Fix issue #4570 by supporting optional `msid` attribute in WebRTC SDP
negotiation, enabling compatibility with libdatachannel and other
clients that don't include msid information.
SRS failed to negotiate WebRTC connections from libdatachannel clients
because:
- libdatachannel SDP lacks `a=ssrc:XX msid:stream_id track_id`
attributes
- SRS required msid information to create track descriptions
- According to RFC 8830, the msid attribute and its appdata (track_id)
are **optional**
If diligently look at the SDP generated by libdatachannel:
```
a=ssrc:42 cname:video-send
a=ssrc:43 cname:audio-send
```
It's deliberately missing the `a=ssrc:XX msid:stream_id track_id` line,
comparing that with this one:
```
a=ssrc:42 cname:video-send
a=ssrc:42 msid:stream_id video_track_id
a=ssrc:43 cname:audio-send
a=ssrc:43 msid:stream_id audio_track_id
```
In such a situation, to keep compatible with libdatachannel, if no msid
line in sdp, SRS comprehensively and consistently uses:
* app/stream as stream_id, such as live/livestream
* type=video|audio, cname, and ssrc as track_id, such as
track-video-video-send-43
This PR renames the trunk/ide/ directory to trunk/cmake/ to better
reflect its actual purpose. The directory contains CMake build
configuration files used by multiple IDEs (CLion, VSCode), not
IDE-specific files.
* Directory rename: trunk/ide/ → trunk/cmake/
* Build output location: trunk/ide/vscode-build/ → trunk/cmake/build/
* CMakeLists.txt: Moved from trunk/ide/srs_clion/CMakeLists.txt to
trunk/cmake/CMakeLists.txt
In the scenario of converting WebRTC to RTMP, this conversion will not
proceed until an SenderReport is received; for reference, see:
https://github.com/ossrs/srs/pull/2470.
Thus, if HTTP-FLV streaming is attempted before the SR is received, the
FLV Header will contain only audio, devoid of video content.
This error can be resolved by disabling `guess_has_av` in the
configuration file, since we can guarantee that both audio and video are
present in the test cases.
However, in the original regression tests, the
`TestRtcPublish_HttpFlvPlay` test case contains a bug:
5a404c089b/trunk/3rdparty/srs-bench/srs/rtc_test.go (L2421-L2424)
The test would pass when `hasAudio` is true and `hasVideo` is false,
which is actually incorrect. Therefore, it has been revised so that the
test now only passes if both values are true.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: winlin <winlinvip@gmail.com>