简体   繁体   English

在Android VOIP应用程序中集成任何编解码器

[英]Integrating any codec within an android VOIP application

I am working on an android voip application that need not work on PSTN. 我正在使用不需要在PSTN上运行的android voip应用程序。 I am completely novice to this field and any little help will be appreciated. 我是该领域的新手,我们将不胜感激。

I started by researching how whatsapp voice call works and found out that it is using PJSIP which is open source sip stack library(Source: What's up with WhatsApp and WebRTC? - webrtcHacks ). 我首先研究了whatsapp语音呼叫的工作原理,发现它使用的是开放源sip堆栈库PJSIP(来源: WhatsApp和WebRTC怎么了?-webrtcHacks )。 I also found that codecs are used in voip to compress and then decompress the voip packets. 我还发现,编解码器在voip中用于压缩然后解压缩voip数据包。

Knowing that I am extremely comfused betweet those sip libraries and codec. 知道我对这些sip库和编解码器感到非常困惑。 Do an android voip app have to have implement sip library? android voip应用程序必须具有实现sip库吗? Every sip library supports a few codec. 每个sip库都支持一些编解码器。

Is there any general format by which I can integrate any codec within my android app whether it is OPUS or Speex or anything like that which is independent of sip implementation? 是否可以通过任何通用格式将任何编解码器集成到我的android应用程序中,无论是OPUS还是Speex或诸如此类的独立于sip实现的东西?

May be I am sounding too confusing but that is true. 也许我听起来太混乱了,但这是事实。 Even googling so much on this specific topic did not help me and my last stop is this community. 即使在这个特定主题上进行大量搜索也无济于事,而我的最后一站是这个社区。 Any little guidance will be appreciated. 任何小指导将不胜感激。

Yes, usually every app implements the codecs on their own. 是的,通常每个应用程序都自己实现编解码器。 Some codec is available in the Android SDK but even in these cases a proper implementation is better. Android SDK中提供了一些编解码器,但即使在这些情况下,正确的实现也更好。

G.711 (PCMU and PCMA) are very simple which can be implemented within a single java class (or even in a single function if you wish). G.711(PCMU和PCMA)非常简单,可以在单个Java类中实现(如果需要,甚至可以在单个函数中实现)。 The others are more complicated, but you can find open source implementations for almost each of them. 其他的则更为复杂,但是您几乎可以为每个实现找到开源实现。

Also note that codec's are implemented also within PJSIP, so if you are using this library then you already have the most popular codec's available. 另请注意,编解码器也在PJSIP中实现,因此,如果您使用此库,则您已经拥有最受欢迎的编解码器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM