Winlin df854339ea TEST: Upgrade pion to v3.2.9. (#3567) | преди 1 година | |
---|---|---|
.. | ||
internal | преди 1 година | |
pkg | преди 1 година | |
.gitignore | преди 1 година | |
.golangci.yml | преди 1 година | |
.goreleaser.yml | преди 1 година | |
AUTHORS.txt | преди 1 година | |
LICENSE | преди 1 година | |
README.md | преди 1 година | |
attributes.go | преди 1 година | |
chain.go | преди 1 година | |
codecov.yml | преди 1 година | |
errors.go | преди 1 година | |
interceptor.go | преди 1 година | |
noop.go | преди 1 година | |
registry.go | преди 1 година | |
renovate.json | преди 1 година | |
streaminfo.go | преди 1 година |
Interceptor is a framework for building RTP/RTCP communication software. This framework defines a interface that each interceptor must satisfy. These interceptors are then run sequentially. We also then provide common interceptors that will be useful for building RTC software.
This package was built for pion/webrtc, but we designed it to be consumable by anyone. With the following tenets in mind.
The public interface is defined in interceptor.go. The methods you need to satisy are broken up into 4 groups.
BindRTCPWriter
and BindRTCPReader
allow you to inspect/modify RTCP traffic.BindLocalStream
and BindRemoteStream
notify you of a new SSRC stream and allow you to inspect/modify.UnbindLocalStream
and UnbindRemoteStream
notify you when a SSRC stream has been removedClose
called when the interceptor is closed.Interceptors also pass Attributes between each other. These are a collection of key/value pairs and are useful for storing metadata or caching.
noop.go is an interceptor that satisfies this interface, but does nothing. You can embed this interceptor as a starting point so you only need to define exactly what you need.
chain.go is used to combine multiple interceptors into one. They are called sequentially as the packet moves through them.
The examples directory provides some basic examples. If you need more please file an issue! You should also look in pion/webrtc for real world examples.
The library is used as a part of our WebRTC implementation. Please refer to that roadmap to track our major milestones.
Pion has an active community on the Slack.
Follow the Pion Twitter for project updates and important WebRTC news.
We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at team@pion.ly
Check out the contributing wiki to join the group of amazing people making this project possible: AUTHORS.txt
MIT License - see LICENSE for full text