sgodwincs / rtp-rs Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Need to see what common usage is here. Should just allocate room for all 15 CSrcs up front, allocate nothing (equivalent to just using Vec
), or somewhere in between?
Ideally, PayloadType
would be defined something like:
type PayloadType: TryFrom<u8, Error: Error + Into<HeaderDecodeError<Self>>>;
This can be done now with associated type bound, but it results in a lot of unnecessary where
clauses, so this is blocked on implied bounds.
I generally wrap a lot of data types as unit types. But it's quite common to need to expose an actual integer as a range, such as in error details.
Going to block this on at least some const value implementation with LOW < HIGH
bounds.
The current setup isn't ideal in my opinion. Ideally, enum variants as types would be supported which would allow a single enum with separate trait implementations per variant. This is particularly useful because it allows a different associated type per variant. With this approach, the header and packets would take an enum variant as a type parameter. Also, an enum is more appropriate as the set of profiles is closed.
Blocked on having enum variants as types (there isn't even an accept RFC yet)
#1 should be done first.
This would remove the Into<HeaderDecodeError<Self>
from PayloadTypeDecodeError
and instead add a where
clause on the trait:
where HeaderDecodeError<Self>: From<<Self::PayloadType as TryFrom<u8>>::Error>
This can be done now, but it results in a lot of unnecessary where clauses, so this is blocked on implied bounds.
I don't have a great understanding of how timestamps work with RTP yet, but it seems that usage is very dependent on either the profile or the payload type being used.
Based on the above, it seems we need to type it based off of the profile being used, but it's also apparently possible to specify it dynamically through non-RTP means.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.