- Apr 23, 2020
-
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
- Apr 22, 2020
-
-
-
Gijs Peskens authored
-
Gijs Peskens authored
The fix for loadbalanced mode would send duplicate data in the case when 1 or more peers are configured with weight = 0 and one or more with a higher weight in the situation where no sender was selected by peer weight and the loop would be reran, this corrects that.
-
Gijs Peskens authored
-
Gijs Peskens authored
In listening mode currently we count each connection as a peer, so if multiple clients connect traffic gets loadbalanced accross all those clients. In stead of each client getting the full stream clients will receive a load balanced partial stream. We try to address that by keeping a linked list of child clients in the listening peer, that we loop over when sending data
-
When running rist in load balanced mode rist_sender_send_data_balanced is occasionally not selecting any peer, thereby resulting in the packet not getting send (and no counters getting incremented, making recovery impossible). This fixes that by recursing back into the function when this happens. We keep a peercount of peers we could send data to in order to prevent an endless loop
-
Fix store_peer_settings to also store peer weight, needed for loadbalaced setup
-
Gijs Peskens authored
We where not sending correctly anymore when not using the seq provided via data structure, this corrects that.
-
- Apr 21, 2020
-
-
Gijs Peskens authored
Callers will need to set the RIST_DATA_FLAGS_USE_SEQ flag on rist_data_block->flags in order to pass seq downstream
-
Gijs Peskens authored
With this patch it's possible to run librist in a redundant setup, where one of the instances can fail without issue for the receiver. To run redundant librist instances we need to run synchronized, the simplest way to do that is to sync from our input. This patch introduces an API call to change the flow_id if our source flow_id is to change. Also it introduces a new option on rist_sender_data_write to tell librist to use the containing rtp_seq in the seq field of the rist_data_block Todo: figure out how to loadbalance our outputs (i.e.: have instance 1 send odd sequenced packets, and instance 2 send even sequenced packets) without breaking receiver or triggering (too many) retransmits.
-
- Apr 20, 2020
-
-
Gijs Peskens authored
Fixes attaching IP to hostname if we know it (i.e.: we are listening). Disabled for IPv6
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Gijs Peskens authored
[18/19] Compiling C object 'rist@sha/src_rist.c.o'. ../../../src/rist.c:231:8: warning: Access to field 'id' results in a dereference of a null pointer (loaded from field 'receiver_ctx') msg(peer->receiver_ctx->id, 0, RIST_LOG_ERROR, ^~~~~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:236:7: warning: Access to field 'id' results in a dereference of a null pointer (loaded from field 'receiver_ctx') msg(peer->receiver_ctx->id, 0, RIST_LOG_INFO, ^~~~~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:244:42: warning: Access to field 'recovery_maxbitrate_max' results in a dereference of a null pointer (loaded from variable 'ctx') if (peer->config.recovery_maxbitrate > ctx->recovery_maxbitrate_max) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:1225:23: warning: Access to field 'id' results in a dereference of a null pointer (loaded from field 'sender_ctx') intptr_t sender_id = peer->sender_ctx->id; ^~~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:1251:23: warning: Although the value stored to 'nrecords' is used in the enclosing expression, the value is never actually read from 'nrecords' uint16_t nrecords = nrecords = ntohs(rtcp->len) - 2; ^ ~~~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:1268:23: warning: Although the value stored to 'nrecords' is used in the enclosing expression, the value is never actually read from 'nrecords' uint16_t nrecords = nrecords = ntohs(rtcp->len) - 2; ^ ~~~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:1314:7: warning: Access to field 'id' results in a dereference of a null pointer (loaded from variable 'ctx') msg(ctx->id, 0, RIST_LOG_INFO, "[INIT] Updating peer's flowid %"PRIu32"->%"PRIu32" (%zu)\n", peer->flow->flow_id, flow_id, peer->flow->peer_lst_len); ^~~~~~~ ../../../src/rist.c:1351:9: warning: Access to field 'id' results in a dereference of a null pointer (loaded from variable 'ctx') msg(ctx->id, 0, RIST_LOG_ERROR, ^~~~~~~ ../../../src/rist.c:1362:10: warning: Access to field 'id' results in a dereference of a null pointer (loaded from variable 'ctx') msg(ctx->id, 0, RIST_LOG_ERROR, ^~~~~~~ ../../../src/rist.c:1380:10: warning: Dereference of null pointer if (ctx->common.profile > RIST_PROFILE_SIMPLE) ^~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:1390:10: warning: Access to field 'id' results in a dereference of a null pointer (loaded from variable 'ctx') msg(ctx->id, 0, RIST_LOG_ERROR, ^~~~~~~ ../../../src/rist.c:1494:8: warning: Access to field 'id' results in a dereference of a null pointer (loaded from variable 'ctx') msg(ctx->id, 0, RIST_LOG_ERROR, "[ERROR] RTCP buffer placeholder had data!!! seq=%"PRIu32", buf_seq=%"PRIu32"\n", ^~~~~~~ ../../../src/rist.c:1502:8: warning: Access to field 'id' results in a dereference of a null pointer (loaded from variable 'ctx') msg(ctx->id, 0, RIST_LOG_ERROR, "[ERROR] Could not create packet buffer inside receiver buffer, OOM, decrease max bitrate or buffer time length\n"); ^~~~~~~ ../../../src/rist.c:1529:11: warning: Value stored to 'pkt' during its initialization is never read uint8_t *pkt = payload->data; ^~~ ~~~~~~~~~~~~~ ../../../src/rist.c:1669:25: warning: The left operand of '==' is a garbage value result = (a->sin_port == b->sin_port) && ~~~~~~~~~~~ ^ ../../../src/rist.c:1678:25: warning: The left operand of '==' is a garbage value result = a->sin6_port == b->sin6_port && ~~~~~~~~~~~~ ^ ../../../src/rist.c:2147:3: warning: 5th function call argument is an uninitialized value msg(receiver_id, sender_id, RIST_LOG_INFO, "[INIT] New RTCP peer connecting, flow_id %"PRIu32", peer_id %"PRIu32", ports %u<-%u\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../src/rist.c:3277:11: warning: Value stored to 'now' during its initialization is never read uint64_t now = timestampNTP_u64(); ^~~ ~~~~~~~~~~~~~~~~~~ 18 warnings generated.
-
Gijs Peskens authored
[15/19] Compiling C object 'rist@sha/src_udp.c.o'. ../../../src/udp.c:276:3: warning: Null pointer passed to 1st parameter expecting 'nonnull' memcpy(payload - hdr_len, hdr, hdr_len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../src/udp.c:547:23: warning: The left operand of '==' is a garbage value if (peer->sa_family == AF_INET) { ~~~~~~~~~~~~~~~ ^ ../../../src/udp.c:900:3: warning: Value stored to 'duplicate' is never read duplicate = true; ^ ~~~~ 3 warnings generated. Also fixes call to getsockname, socklen should be initialised to size of struct beforehand
-
Gijs Peskens authored
[12/19] Compiling C object 'rist@sha/extra_network.c.o'. ../../../extra/network.c:146:61: warning: 1st function call argument is an uninitialized value ((struct sockaddr_in*)&parsed_url->u.address)->sin_port = htons(port); ^~~~~~~~~~~ ../../../extra/network.c:150:63: warning: 1st function call argument is an uninitialized value ((struct sockaddr_in6*)&parsed_url->u.address)->sin6_port = htons(port); ^~~~~~~~~~~ ../../../extra/network.c:154:19: warning: Assigned value is garbage or undefined parsed_url->port = port; ^ ~~~~ ../../../extra/network.c:1018:7: warning: Value stored to 'val' is never read val = ret; ^ ~~~
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
- Apr 19, 2020
-
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
- Apr 18, 2020
-
-
Sergio Ammirata authored
-
Put switch statement into static inline inside of header, so it can be reused later if needed in other parts (i.e.: to write out timestamps in other clocks if needed). Simplify and correct timestamp calculations, these are tested and work.
-
Sergio Ammirata authored
-
- Apr 17, 2020
-
-
Sergio Ammirata authored
-
Sergio Ammirata authored
Prevent infinite loop that happened when calling rist_*_destroy in the case when start function did not complete comprerly or was not called at all
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
- Apr 16, 2020
-
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
Sergio Ammirata authored
-
- Apr 15, 2020
-
-
Sergio Ammirata authored
-