1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00
srs/trunk/3rdparty/srs-bench/vendor/github.com/pion/interceptor
john ea8cff6163
RTC: Fix rtc to rtmp sync timestamp using sender report. (#2470)
* fix annotation spell failed

* RTC to RTMP using SenderReport to sync av timestamp

* update pion/webrtc versio from v3.0.4 -> v3.0.13, auto config sender/receiver report

* Add rtc push flv play regression test

* Add unit test of ntp and av sync time

* Take flag CXX to makefile of utest

* Add annotation about rtc unit test

* Fix compiler error in C++98

* Add FFmpeg log callback funciton.
2021-08-17 06:32:35 +08:00
..
pkg RTC: Fix rtc to rtmp sync timestamp using sender report. (#2470) 2021-08-17 06:32:35 +08:00
.gitignore For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
.golangci.yml For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
chain.go For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
codecov.yml For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
errors.go For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
go.mod RTC: Fix rtc to rtmp sync timestamp using sender report. (#2470) 2021-08-17 06:32:35 +08:00
go.sum RTC: Fix rtc to rtmp sync timestamp using sender report. (#2470) 2021-08-17 06:32:35 +08:00
interceptor.go For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
LICENSE For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
noop.go For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
README.md For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
registry.go For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
renovate.json For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00
streaminfo.go For regression test, add srs-bench to 3rdparty 2021-03-04 14:18:57 +08:00


Pion Interceptor

RTCP and RTCP processors for building real time communications

Pion Interceptor Slack Widget
GoDoc Coverage Status Go Report Card License: MIT


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.

  • Useful defaults. Each interceptor will be configured to give you a good default experience.
  • Unblock unique use cases. New use cases are what is driving WebRTC, we want to empower them.
  • Encourage modification. Add your own interceptors without forking. Mixing with the ones we provide.
  • Empower learning. This code base should be useful to read and learn even if you aren't using Pion.

Current Interceptors

  • NACK Generator/Responder

Planned Interceptors

Interceptor Public API

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 removed
  • Close 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.

Examples

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.

Community

Pion has an active community on the Golang Slack. Sign up and join the #pion channel for discussions and support. You can also use Pion mailing list.

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

Contributing

Check out the contributing wiki to join the group of amazing people making this project possible:

License

MIT License - see LICENSE for full text