Giter Club home page Giter Club logo

rtp-types's Introduction

crates.io docs.rs

rtp-types

Crate for handling RTP (RFC 3550) including a parser and a writer.

LICENSE

rtp-types is dual licensed under the:

Contribution

Any kinds of contributions are welcome as a pull request.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in rtp-types by you shall be dual licensed under the MIT license and Apache 2.0 license as above, without any additional terms or conditions.

rtp-types's People

Contributors

sdroege avatar tp-m avatar ystreet avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rtp-types's Issues

Make `RtpPacketBuilder` generic over payload type and allow custom serialization

Somewhat related to #4

It would be nice if RtpPacketBuilder would be generic over the payload type (this can be added in a backwards-compatible way by making it RtpPacketBuilder<T = &'a [u8]>), and a custom callback for writing out the data could be provided to write_into().

This way one could provide a custom type for the payload and "collect" chunks as they're written out to avoid copies. Header/padding would still have to be passed to that function as a &[u8], but actual payload could be taken over more cheaply by e.g. using bytes::Bytes or a gst::Memory and then collecting the packet in multiple chunks that are then sent over the network via sendmsg().

Can't write to uninitialized bytes

RtpPacketBuilder::write_into() requires a mutable slice. Unfortunately, a mutable slice always has to be initialized completely, which is suboptimal here.

Generally, some API around Writer might be nice to have.

Add API to edit (fixed) parts of RTP header

Could make it some kind of RtpPacketMut (better name please) that derefs into the normal RtpPacket for reading purposes, and in addition to the fixed headers it could also give mutable access to specific header extension bytes and the CSRC array (so e.g. CSRCs can be changed but not added/removed).

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.