Skip to content
Snippets Groups Projects
  1. Apr 23, 2020
  2. Apr 22, 2020
  3. Apr 21, 2020
    • Gijs Peskens's avatar
      Don't break API, use flags instead. · 4597ef0d
      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
      4597ef0d
    • Gijs Peskens's avatar
      First step towards redundant mode · 95212ec5
      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.
      95212ec5
  4. Apr 20, 2020
    • Gijs Peskens's avatar
      CNAME: fix attaching of our IP to hostname. · 67f19a1e
      Gijs Peskens authored
      Fixes attaching IP to hostname if we know it (i.e.: we are listening). Disabled for IPv6
      67f19a1e
    • Sergio Ammirata's avatar
    • Sergio Ammirata's avatar
      Revert changes in rist_populate_cname · e980c286
      Sergio Ammirata authored
      e980c286
    • Sergio Ammirata's avatar
      Remove wrong assert · 48d2e456
      Sergio Ammirata authored
      48d2e456
    • Sergio Ammirata's avatar
    • Gijs Peskens's avatar
      Static analys rist.c · 27b5628d
      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.
      27b5628d
    • Gijs Peskens's avatar
      Static analysis fixes for udp.c · 48df315b
      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
      48df315b
    • Gijs Peskens's avatar
      Static analys extra/network.c · 25aeb590
      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;
                                                      ^     ~~~
      25aeb590
    • Sergio Ammirata's avatar
      Cosmetic fixes (spaces to tabs) · 254ff820
      Sergio Ammirata authored
      254ff820
    • Sergio Ammirata's avatar
    • Sergio Ammirata's avatar
      e0a9abeb
  5. Apr 19, 2020
  6. Apr 18, 2020
  7. Apr 17, 2020
  8. Apr 16, 2020
  9. Apr 15, 2020
Loading