[英]How to add g729 codec in Android application?
我正在開發一個用於撥打和接聽電話的 SIP 應用程序,我想在我的應用程序中添加 G729 編解碼器。
目前我正在對開源項目SipDroid進行分析。 如果我想讓該應用程序支持 G729 編解碼器,該怎么做?
org.sipdroid.codecs package 中有一個不同的編解碼器配置文件。如何為 G729 編解碼器創建這種 .java 文件?
任何建議和回應將不勝感激。
星號的日志消息
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Found RTP video format 103
Found video description format h263-1998 for ID 103
Capabilities: us - 0x100 (g729), peer - audio=0x0 (nothing)/video=0x100000 (h263p)/text=0x0 (nothing), combined - 0x0 (nothing)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[Apr 9 18:00:25] NOTICE[3813]: chan_sip.c:9187 process_sdp: **No compatible codecs**, not accepting this offer!
開發計划署
To: <sip:5003@192.168.1.17>
From: <sip:5004@192.168.1.17>;tag=z9hG4bK80811693
Call-ID: 082004294635@10.0.2.15
CSeq: 2 INVITE
Contact: <sip:5004@10.0.2.15:36252;transport=udp>
Expires: 3600
User-Agent: MySipdroid. !/2.4 beta/sdk
Authorization: Digest username="5004", realm="asterisk", nonce="6264308a", uri="sip:5003@192.168.1.17", algorithm=MD5, response="fb6dfb528d362657ef01458f96653adb"
Content-Length: 137
Content-Type: application/sdp
v=0
o=5004@192.168.1.17 0 0 IN IP4 10.0.2.15
s=Session SIP/SDP
c=IN IP4 10.0.2.15
t=0 0
m=audio 21000 RTP/AVP
a=fmtp:18 annexb=no
<------------->
--- (13 headers 7 lines) ---
Sending to 192.168.1.17:35370 (NAT)
Using INVITE request as basis request - 082004294635@10.0.2.15
Found peer '5004' for '5004' from 192.168.1.17:35370
== Using SIP RTP CoS mark 5
Capabilities: us - 0x100 (g729), peer - audio=0x0 (nothing)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x0 (nothing)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x0 (nothing), combined - 0x0 (nothing)
[Apr 10 12:01:05] NOTICE[3524]: chan_sip.c:9187 process_sdp: No compatible codecs, not accepting this offer!
顯示翻譯結果
core show translation
Translation times between formats (in microseconds) for one second of data
Source Format (Rows) Destination Format (Columns)
g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 siren7 siren14 slin16 g719 speex16 testlaw
g723 - - - - - - - - - - - - - - - - - - -
gsm - - 1001 1001 3000 2000 1000 3000 3999 - 8999 3999 1001 - - 1002 - - 1001
ulaw - 2000 - 1 2001 1001 1 2001 3000 - 8000 3000 2 - - 3 - - 2
alaw - 2000 1 - 2001 1001 1 2001 3000 - 8000 3000 2 - - 3 - - 2
g726aal2 - 2999 1001 1001 - 2000 1000 3000 3999 - 8999 3999 1001 - - 1002 - - 1001
adpcm - 2000 2 2 2001 - 1 2001 3000 - 8000 3000 2 - - 3 - - 2
slin - 1999 1 1 2000 1000 - 2000 2999 - 7999 2999 1 - - 2 - - 1
lpc10 - 2999 1001 1001 3000 2000 1000 - 3999 - 8999 3999 1001 - - 1002 - - 1001
g729 - 2999 1001 1001 3000 2000 1000 3000 - - 8999 3999 1001 - - 1002 - - 1001
speex - - - - - - - - - - - - - - - - - - -
ilbc - 2998 1000 1000 2999 1999 999 2999 3998 - - 3998 1000 - - 1001 - - 1000
g726 - 2999 1001 1001 3000 2000 1000 3000 3999 - 8999 - 1001 - - 1002 - - 1001
g722 - 2000 2 2 2001 1001 1 2001 3000 - 8000 3000 - - - 1 - - 2
siren7 - - - - - - - - - - - - - - - - - - -
siren14 - - - - - - - - - - - - - - - - - - -
slin16 - 3000 1002 1002 3001 2001 1001 3001 4000 - 9000 4000 1000 - - - - - 1002
g719 - - - - - - - - - - - - - - - - - - -
speex16 - - - - - - - - - - - - - - - - - - -
testlaw - 2000 2 2 2001 1001 1 2001 3000 - 8000 3000 2 - - 3 - - -
配置文件
[5004]
type=friend
username=5004
secret=5004
host=dynamic
context=testcontext
nat=yes
disallow=all
allow=g729
qualify=yes
callerid="919999121312"<5004>
您的星號日志看起來非常支持編解碼器,但是您的客戶端 android 應用程序需要 g729 編碼器(目前似乎是商業許可證),如果您有幸獲得編解碼器的開源許可證,請告訴我.
許可
G.729 包括多家公司的專利,並獲得 Sipro Lab Telecom 的許可。 Sipro Lab Telecom 是 G.729 技術和專利池的授權知識產權許可管理員。[3][4][5][6] 在許多國家/地區,使用 G.729 可能需要支付許可費和/或特許權使用費。[5]
資料來源: http://en.wikipedia.org/wiki/G.729
問候。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.