Files
srs/.vscode/launch.json
OSSRS-AI 6e93dd73b5 AI: WebRTC: Support optional msid attribute per RFC 8830. v7.0.126 (#4570) (#4572)
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
2025-11-11 10:22:31 -05:00

98 lines
2.9 KiB
JSON

{
"version": "0.2.0",
"configurations": [
{
"name": "Debug SRS with conf/console.conf",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/trunk/cmake/build/srs",
"args": ["-c", "conf/console.conf"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/trunk",
"environment": [],
"externalConsole": false,
"linux": {
"MIMode": "gdb"
},
"osx": {
"MIMode": "lldb"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build",
"logging": {
"engineLogging": true
}
},
{
"name": "Debug SRS with conf/rtc.conf",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/trunk/cmake/build/srs",
"args": ["-c", "conf/rtc.conf"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/trunk",
"environment": [],
"externalConsole": false,
"linux": {
"MIMode": "gdb"
},
"osx": {
"MIMode": "lldb"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build",
"logging": {
"engineLogging": true
}
},
{
"name": "Debug srs-proxy",
"type": "go",
"request": "launch",
"mode": "auto",
"cwd": "${workspaceFolder}/proxy",
"program": "${workspaceFolder}/proxy"
},
{
"name": "Debug SRS (macOS, CodeLLDB) console.conf",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/trunk/cmake/build/srs",
"args": ["-c", "console.conf"],
"cwd": "${workspaceFolder}/trunk",
"stopOnEntry": false,
"terminal": "integrated",
"initCommands": [
"command script import lldb.formatters.cpp.libcxx"
],
"preLaunchTask": "build",
"env": {},
"sourceLanguages": ["cpp"]
},
{
"name": "Debug gtest (macOS CodeLLDB)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/trunk/cmake/build/utest",
"args": ["--gtest_filter=*${selectedText}*"],
"cwd": "${workspaceFolder}/trunk",
"terminal": "integrated",
"initCommands": [
"command script import lldb.formatters.cpp.libcxx"
],
"sourceLanguages": ["cpp"]
}
]
}