mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
rtp: fix parsing of RTCP config options
This commit is contained in:
parent
2659d7b78a
commit
3c42811d8b
2 changed files with 10 additions and 1 deletions
|
@ -112,6 +112,7 @@ int rtp_init(struct node *n)
|
|||
r->aimd.b = 0.5;
|
||||
r->aimd.last_rate = 100;
|
||||
|
||||
r->rtcp.enabled = false;
|
||||
r->rtcp.throttle_mode = RTCP_THROTTLE_DISABLED;
|
||||
|
||||
return 0;
|
||||
|
@ -173,7 +174,10 @@ int rtp_parse(struct node *n, json_t *cfg)
|
|||
const char *mode = "aimd";
|
||||
const char *throttle_mode = "decimate";
|
||||
|
||||
ret = json_unpack_ex(json_rtcp, &err, 0, "{ s?: b, s?: s }",
|
||||
/* Enable if RTCP section is available */
|
||||
r->rtcp.enabled = 1;
|
||||
|
||||
ret = json_unpack_ex(json_rtcp, &err, 0, "{ s?: b, s?: s, s?: s }",
|
||||
"enabled", &r->rtcp.enabled,
|
||||
"mode", &mode,
|
||||
"throttle_mode", &throttle_mode
|
||||
|
|
|
@ -50,6 +50,11 @@ cat > ${CONFIG_FILE} << EOF
|
|||
"format" : "${FORMAT}",
|
||||
"vectorize" : ${VECTORIZE},
|
||||
|
||||
"rtcp" : {
|
||||
"enabled" : true,
|
||||
"throttle_mode" : "limit_rate"
|
||||
},
|
||||
|
||||
"in" : {
|
||||
"address" : "127.0.0.1:12000",
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue