Giter Club home page Giter Club logo

Comments (3)

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

👍 We can also add an option to the interceptor to DisableCopy maybe? If people really need the old behavior.

from interceptor.

davidzhao avatar davidzhao commented on July 23, 2024

Do you think people actually want the old behavior? Since it's not actually doing what it's claiming to do. Any network with reasonable latency will probably see NACKs responding to wrong packets.

I do think it'd be great to avoid the copy though.

from interceptor.

mengelbart avatar mengelbart commented on July 23, 2024

I agree that it would be nice to avoid the copy, but on the other hand, I think it is the best we can do. Since RTPWriter, RTPReader, RTCPWriter and RTCPReader are very similar to io.Reader/io.Writer, I would expect them to behave in the same way. The doc for io.Reader and io.Writer says that implementations must not retain the buffer and I think that makes sense for interceptors, too. It could actually be even worse when users use the payload buffer for something else than the next packet. In that case, the interceptors would not only send the most recent packet but whatever the user decided to store in the buffer next.

The same goes for rtp.Header (#85 is an issue where the extension header of an rtp.Header, which is a byte slice, is overwritten by newer packets) and possibly also interceptor.Attributes?

Maybe we should also carefully check the other interceptors for similar issues.

from interceptor.

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.