正确的 Java RTP/RTCP 堆栈

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3551629/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 02:22:32  来源:igfitidea点击:

Proper Java RTP/RTCP stack

javastackrtp

提问by biasedbit

I've been struggling to find a decent RTP stack implementation for Java. JMF or FMJ are not options here as I don't want all the bells and whistles of codecs and audio/video capture; I just need to create RTP streams, dump data in them and read data from them.

我一直在努力为 Java寻找合适的 RTP 堆栈实现。JMF 或 FMJ 不是这里的选项,因为我不想要编解码器和音频/视频捕获的所有花里胡哨;我只需要创建 RTP 流,在其中转储数据并从中读取数据。

I've been using jlibrtpbut its API is shady, logging is based on System.out and every now and then I get a couple of NPE's.

我一直在使用jlibrtp,但它的 API 是可疑的,日志记录是基于 System.out 的,我时不时会得到一些 NPE。

Also, RTCP support would be nice (again, I'd like to handle the control myself, I just need the API).

此外,RTCP 支持会很好(同样,我想自己处理控件,我只需要 API)。

So to sum up:

所以总结一下:

  • Clean API;
  • "Manual" data handling;
  • Decent logging;
  • RTCP support;
  • No dependencies;
  • Optimised for server-side usage (many RTP sessions active at a given instant).
  • 干净的API;
  • “手动”数据处理;
  • 体面的伐木;
  • RTCP 支持;
  • 无依赖;
  • 针对服务器端使用进行了优化(许多 RTP 会话在给定时刻处于活动状态)。

Is there such a library or will I have to code one? ;)

有这样的图书馆还是我必须编写一个?;)

采纳答案by biasedbit

https://github.com/jonbo372/efflux

https://github.com/jonbo372/efflux

It depends on Netty (for I/O) and SLF4J (for logging).

它取决于 Netty(用于 I/O)和 SLF4J(用于日志记录)。

回答by Lior

You can download the rtp stack of Mobicents. This stack is part of media server but you can take it as separate module. http://code.google.com/p/mediaserver/

您可以下载 Mobicents 的 rtp 堆栈。此堆栈是媒体服务器的一部分,但您可以将其作为单独的模块。http://code.google.com/p/mediaserver/

Inside the module you can find the tests that showing how to use it.

在模块内,您可以找到展示如何使用它的测试。