Code Monkey home page Code Monkey logo

Comments (3)

Sean-Der avatar Sean-Der commented on August 23, 2024

Yes we need to do something better long-term, but we have the following things I haven't thought through fully yet.

  • Do we buffer? If we do how much? Do we let users determine what to throw away?
  • In most cases we are doing UDP, so I don't believe it will be blocking. In the cases we do TURN via TCP it will be a problem though.

There might be other issues, but haven't really tackled this fully yet.

from amazon-kinesis-video-streams-webrtc-sdk-c.

ek9852 avatar ek9852 commented on August 23, 2024

Yep, for UDP, that might not be a problem unless the send rate is reaching the network max. speed.
With TCP, it could be an issue. We can control the socket send buffer size via SO_SNDBUF , so no ned for another buffer in user space. Then might be throw away the packet once the socket buffer is full, i.e. EAGAIN or EWOULDBLOCK return in send.

The size of the socket send buffer size should be adjust according to the data type, a 1080p video streaming vs a voice only streaming need a different size. Possible buffer 100ms of data at most to ensure latency is minimum.

from amazon-kinesis-video-streams-webrtc-sdk-c.

Sean-Der avatar Sean-Der commented on August 23, 2024

That sounds like a good idea to me! We can probably just allow SO_SNDBUF to be set via the Public API. The less code the better :)

In the future if we have to allow custom 'leak' behavior like GStreamer's queue (upstream vs downstream) we can always revisit.

from amazon-kinesis-video-streams-webrtc-sdk-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.