263 Commits

Author SHA1 Message Date
Chia-chi Yeh
98c54a3e06 am 0e67685e: am bfd85f9a: Merge "SIP: turn off verbose logs." into ics-mr1
* commit '0e67685e53cbcf7682a0364cf34fd3ac0632596f':
  SIP: turn off verbose logs.
2011-11-21 21:07:56 -08:00
Chia-chi Yeh
cb6ee06f62 SIP: turn off verbose logs.
Bug: 5616713
Change-Id: Iaf2e6878731d10d7f4f2a7cd8af71f4517780642
2011-11-18 16:57:21 -08:00
Steve Block
71f2cf116a Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
2011-10-26 09:57:54 +01:00
Chia-chi Yeh
ee59e6a9fc SipService: handle connectivity changes correctly.
This patch assumes that for the same network type,
there MUST be a DISCONNECTED between two CONNECTEDs.
Also removes the Wi-Fi scanning since the framework
already handles this when a WifiLock is held.

Bug: 4283795
Change-Id: I08481e70c651cffcbb516c8cc6584c919078fa4f
2011-09-30 16:46:30 -07:00
Chia-chi Yeh
6d8b9b84ac Merge "RTP: Update parameters for larger packet intervals." 2011-09-13 21:21:18 -07:00
Chia-chi Yeh
7a685e8911 Merge "SIP: fix keep-alive measurement and increase the timeout." 2011-09-13 10:35:04 -07:00
Chia-chi Yeh
d17b6d5266 SIP: fix keep-alive measurement and increase the timeout.
Bug: 5226511
Change-Id: I1283790581496b1ff4e583a8d9379cdc39f78c20
2011-09-13 03:02:30 -07:00
Chia-chi Yeh
be57bfe853 RTP: Update parameters for larger packet intervals.
Also remove some duplicated code.

Change-Id: I64576e5442a962eb4b0dfa83b52a8127567ba597
2011-09-09 16:08:12 -07:00
Chia-chi Yeh
81a5ec5b94 Merge "RTP: support payloads with larger packetization interval." 2011-09-08 14:07:00 -07:00
Eric Laurent
fa6067f87c Merge "VoIP JNI: Force AEC on for tuna board" 2011-09-06 14:53:14 -07:00
Chia-chi Yeh
35d05dcba1 RTP: support payloads with larger packetization interval.
RFC 3551 section 4.2 said that a receiver should accept packets
representing between 0 and 200ms of audio data. Now we add the
ability to decode multiple frames in a payload as long as the
jitter buffer is not full. This change covers G711, GSM, and
GSM-EFR. AMR will be added later.

Bug: 3029736
Change-Id: Ifd194596766d14f02177925c58432cd620e44dd7
2011-09-06 14:34:44 -07:00
Chia-chi Yeh
54eabd6c92 SIP: avoid extreme small values in Min-Expires headers.
If the expiry time cannot be found in Contact header or Expires
header, use the default value of 3600 seconds, which is specified
in RFC 3261.

Change-Id: I2607a398b96743614b01713cfd9b28f40386fac1
2011-09-06 13:06:08 -07:00
Eric Laurent
74e0a990ae VoIP JNI: Force AEC on for tuna board
Force AEC on for tuna board because of the strong feedback
of Rx audio path, even when playing over earpiece or headset.

Change-Id: I9c14257d56103ba82d6cdb0b7d5a3f315638136e
2011-09-02 12:10:45 -07:00
Chia-chi Yeh
5f760064e1 SIP: add the check for expiry time in Contact header.
There can be three expiry times in the same message header. We
choose the smaller value in Expires header and Contact header,
and then we obey the value defined in Min-Expires header. If
none of them is set, the default value is used.

Bug: 5178284

Change-Id: Ie9d4a48c93863e82e5197bb4a0db3f4fec56857c
2011-08-30 13:59:11 -07:00
Hung-ying Tyan
dc5bbe965f Handle SIP authentication response for BYE.
Bug: 5159669
Change-Id: I029684334500d4d0db176783084c9b7d1db87e40
2011-08-15 01:13:41 +08:00
Conley Owens
53ad2c7fe2 am 0793586b: am f8c1f129: am e1d27154: am f87743e7: Merge "Prevent NullPointerException cases while using SipService."
* commit '0793586bf8f4dce71d0b4d7ff2f212129b3f76fe':
  Prevent NullPointerException cases while using SipService.
2011-08-02 13:32:26 -07:00
Conley Owens
0793586bf8 am f8c1f129: am e1d27154: am f87743e7: Merge "Prevent NullPointerException cases while using SipService."
* commit 'f8c1f1298ac3ede518c8d29eeb6719746c6afaf0':
  Prevent NullPointerException cases while using SipService.
2011-08-02 13:30:51 -07:00
Masahiko Endo
25ccbb97ff Prevent NullPointerException cases while using SipService.
Some SipService methods may return null, in such cases like no Wi-Fi
connection. Added minimum check to prevent NullPointerExceptions.

Change-Id: Ia7fae57ee893f2564cbfdedb6dc614938ab60ff7
Signed-off-by: Masahiko Endo <masahiko.endo@gmail.com>
2011-08-01 16:24:59 +09:00
Eric Laurent
5fb3ba60af Issue 3370834: No Echo canceler for SIP
Added detection of platfrom AEC in AudioGroup. If an AEC
is present, the SIP stack will use it, otherwise the echo suppressor
of the stack will be used.

Change-Id: I4aa45a8868466120f5f9fae71b491fe4ae1162c2
2011-07-27 09:33:22 -07:00
repo sync
307f15faaf Add REFER handling.
Handle REFER requests including REFER with Replaces header.

bug:4958680
Change-Id: I96df95097b78bed67ab8abd309a1e57a45c6bc2f
2011-07-13 04:12:28 +08:00
Hung-ying Tyan
3eeb1a98f9 Merge "Keep last known keepalive interval to avoid duplicate effort." 2011-07-04 20:37:33 -07:00
Hung-ying Tyan
9324e04dcf Merge "Do not hold wifi lock when SIP is also available over mobile network." 2011-07-03 20:01:55 -07:00
Hung-ying Tyan
f8c34ad3ef Merge "Do not keep alive for re-established call." 2011-07-03 19:53:35 -07:00
Hung-ying Tyan
9edfa10757 Keep last known keepalive interval to avoid duplicate effort.
The current implementation always starts with default minimum interval when
the measurement process starts. By keeping last known good interval, we can
save the time in re-measurement.

Change-Id: I8f1720acafaa7e101855fe0c66d5c7b0e578e0d7
2011-07-01 21:20:36 +08:00
Hung-ying Tyan
8ba4566c01 Do not keep alive for re-established call.
Only need to keep alive for caller in a newly established call.

Change-Id: I36f9d9499c806c8701e3b78555de399b00593be8
2011-07-01 20:26:48 +08:00
Hung-ying Tyan
f89654dd28 Do not hold wifi lock when SIP is also available over mobile network.
Bug: 3111564
Change-Id: Ifc76e5c378d620e40ce4adf6ffa20807e9750fdb
2011-07-01 19:25:46 +08:00
Hung-ying Tyan
a6cec8feed Synchronize SipWakeupTimer.onReceive()
to fix the race of two threads that change mPendingIntent; one assigns a new one
and the other nullifies it.

Change-Id: I5e01f83ea1ac437811d2073839adef9bd0a30ec9
2011-06-30 18:17:27 +08:00
Hung-ying Tyan
129d0b08fd Make NAT port timeout measurement more flexible.
In two ways:
(1) When there's a session timeout, restart the measurement at a later time
    instead of just stalling.
(2) When there's a port change, do not re-measure the interval if the current
    interval works well in the past. We keep success count and decrement it
    by half when there's a port change. When the count is below a threshold,
    we restart the measurement process.

Change-Id: I7256464435a5e2d2a239bfccaa004e9ceb1d9ce5
2011-06-30 14:37:24 +08:00
Hung-ying Tyan
99705b52ec Record external IP and port from SIP responses
and use them to create the contact header when sending OK response for INVITE.

Bug: 3461707
Change-Id: I5b254618f4920cf10a1460631bcd336778f344ec
2011-06-28 20:05:53 +08:00
repo sync
2093561a58 Support INVITE w/o SDP.
bug:3326873

Change-Id: Ie29d2c61b237fee2d8637f4ba3d293a22469cced
2011-06-28 19:45:10 +08:00
Hung-ying Tyan
233718c3c5 Start keepalive process for the caller of a SIP call
so that the callee can send signals (on-hold or bye) back to the caller.
Without the keepalive, the NAT port for the caller will be timed out during the
call. And the signals will be dropped by the NAT device.

Change-Id: I21848d73469045b2ed9e7281556ab184c594c362
2011-06-27 19:33:24 +08:00
repo sync
1aceda35cc Support Invite w/ Replaces request.
bug:3326870
Change-Id: Idbfbe7e3cc6ba83874d42bfb7d149866f454e70a
2011-06-27 16:20:28 +08:00
Hung-ying Tyan
e65f3a896f Restart NAT port timeout measurement when keepalive fails and other fixes
Misc keepalive fixes including:
+ Restart NAT port timeout measurement when keepalive fails. The max interval
  is set to the current keepalive interval.
+ When exception occurs during sending a keepalive, restarts registration.
+ When exception occurs during measurement, retry for a limited times before
  giving up.

Change-Id: I7aa787a5ec7c4c9b4334aa1017371d9049b3520c
2011-06-24 15:28:15 +08:00
Hung-ying Tyan
4af085ff26 Execute all the due wakeup events in SipWakeupTimer.
Events are sorted by periods. So events of larger periods may have trigger
time (i.e., when the event should be processed) earlier than the ones of smaller
periods. So need to scan the whole queue looking for due events. The scan takes
O(n) time but we expect the queue size to be small.

Change-Id: I08bd3bd9d4bb8decb78f3c91c943396463ca023a
2011-06-23 19:23:13 +08:00
Hung-ying Tyan
12750701d0 Keep the keepalive process going after NAT port is changed.
This is a regression from the CL that makes the keep-alive process a reusable
component.

Change-Id: I1d580588e9e303c532bf620056fc0fe88a2fdcda
2011-06-23 18:23:09 +08:00
Hung-ying Tyan
4a267a9158 Move the keepalive process to SipSessionImpl and make it reusable.
Reuse the new component in the original keepalive process and the NAT port
mapping timeout measurement process.

This is the foundation for fixing the following bug.

Bug: 3464181

Change-Id: If7e951c000503fa64843942ad062c4d853e20c8d
2011-06-23 11:41:37 +08:00
Hung-ying Tyan
ac320b2245 Merge "Move WakeupTimer out of SipService." 2011-06-15 03:17:50 -07:00
Hung-ying Tyan
5621554033 Move WakeupTimer out of SipService.
This is to prepare to move keepalive process to SipSessionGroup before fixing
the following bug.
Bug: 3464181

Change-Id: I57d8f6effad76706b5a76e1269c53d558db88ae4
2011-06-14 17:46:48 +08:00
repo sync
c133781723 Fix the issue of onNetwork in UI thread.
bug:458435

This will temporarily start a thread for answering calls, we are
going to add a handler thread to handle this soon.

Change-Id: I9079038d671e1b1631c6e663fc2c3de297d97428
2011-06-13 17:46:41 +08:00
Chung-yih Wang
bb0a989c17 Add KeepAlive Interval Measurement.
Change-Id: Id5ea2fcfa0bcd45198e773a5842d39eacc8ae400
2011-06-09 18:19:07 +08:00
Dima Zavin
34bb419e59 update for new audio.h header location
Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 14:09:57 -07:00
Andreas Huber
4b3913a3e4 Squashed commit of the following:
commit c80992e419ed567abef451042f09c4958534b90d
Author: Andreas Huber <andih@google.com>
Date:   Wed May 11 14:00:07 2011 -0700

    Support for the mp3 audio decoder as a software OMX component.

    Change-Id: I66e10c4d0be4c3aecdef1c21b15a2c7359ceb807

commit a358d0e1bf2a88897887445f42ccdda0f5f2f528
Author: Andreas Huber <andih@google.com>
Date:   Wed May 11 13:11:23 2011 -0700

    Support for G.711 alaw and mulaw decoders as software OMX components

    Change-Id: Ia5c76c02cb83a9f94ce39a27b2251e5880218f03

commit 79088b9c9a5c8b8c97ea66cb4f90a2b0f0d34553
Author: Andreas Huber <andih@google.com>
Date:   Thu May 5 15:43:32 2011 -0700

    Instead of using an RGB surface and conversion yuv420->rgb565

    convert from OMX_COLOR_FormatYUV420Planar to HAL_PIXEL_FORMAT_YV12 instead.

    Change-Id: I8c4fc3c54c963f0d4ba6377f3c4ab4e0013152e5
    related-to-bug: 4394005

commit 69469d3bd84425777b11b9fc938c5e0c61af26a7
Author: Andreas Huber <andih@google.com>
Date:   Tue May 10 15:46:42 2011 -0700

    voip mustn't link against libstagefright.so

    Change-Id: I4d0ba9a8b9dc9380b792a1bd04bcda231964862c

commit 2a9a9eeeeeb36ae3a9e680469c3016d509ff08c3
Author: Andreas Huber <andih@google.com>
Date:   Tue May 10 14:37:10 2011 -0700

    Remove most non-OMX software decoders by default

    Change-Id: Ic56514bc1b56b8fa952e8c4a164ea7379ecb69d0

commit a4de62c37b335c318217765403a9fb282b20a216
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 16:50:02 2011 -0700

    Conditionally build the old-style software decoders.

    Change-Id: I5de609e1d76c92d26d6eb81d1551462258f3f15f

commit 5d8b039f9449dc3dad1e77c42c80cc0b54b0c846
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 16:13:12 2011 -0700

    Support for MPEG4 and H.263 video decoders as soft OMX components.

    Change-Id: I5e3a4835afab89f98e3aa128d013628f5830eafe

commit b25a1bfbeb0ff6e62e1cc694ce2599c91489c7d0
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 11:49:10 2011 -0700

    Boost Soft OMX thread priority, fix timestamp handling in vorbis Soft OMX decoder.

    Change-Id: I68d26d4999f06fcc451d69e5303663fab0cba9e8

commit c0574362f8dc3319ce84d981097867062a698527
Author: Andreas Huber <andih@google.com>
Date:   Mon May 9 11:28:53 2011 -0700

    Support for the AMR decoders (NB and WB) as Soft OMX components.

    Change-Id: Ia565f59833fb52653e23f26536e7e41fc329a754

commit 3e5575a8f0e27a490cb7bde77bd9456087837f08
Author: Andreas Huber <andih@google.com>
Date:   Wed May 4 13:41:25 2011 -0700

    Signal an error if the aac decoder failed to initialize from codec specific data.

    Change-Id: I01da7831bdf722edd7d6dc5974486daa2cf2b209
    related-to-bug: 4272179

commit f94aeaa9886e772ff4823e671ed237096649f4af
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 13:07:38 2011 -0700

    Software OMX nodes don't (yet?) support native_window mode.

    Change-Id: I7d9ca9164ef4abf66b573ca21dba12d672f8b12d

commit eefdfabac8dc659e00daa56da69aea705c49cb67
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 12:57:16 2011 -0700

    Fixing the OMX tests to refer to appropriate files from test content.

    Change-Id: I5b61c3498749bfb876abbd3946a5132356e3f6ff

commit f31b7326aef14b6a1b7946520a9688f092e844d5
Author: Andreas Huber <andih@google.com>
Date:   Tue May 3 11:08:38 2011 -0700

    Soft OMX components are now dynamiclly loaded/unloaded, not directly linked against.

    Change-Id: I1e2ecfbfab67a8869886f738eaf0c7b3c948b6d9

commit b7f0343879e4df06f0a1c9bfece24df557954e2f
Author: Andreas Huber <andih@google.com>
Date:   Mon May 2 15:58:36 2011 -0700

    Support for the AVC software decoder as an OMX component.

    Change-Id: I13c12df435ba4afbd968a9fc659f66b91c818bc2

commit 5bb9e616d6c8e1b13d531fe996b9a9affdfb2977
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:05:37 2011 -0700

    Fix Vorbis OMX decoder's component role.

    Change-Id: I5e871e5e11b3f951c93590210e63fd7987c467b5

commit 089c91f2333062e196c7afd5fb0ca914878aa474
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:05:18 2011 -0700

    Support vorbis_decoder OMX testing.

    Change-Id: I1985be178a12ae3f8768bc72067d9236238be170

commit 56e241fa36fc37219bc536b823bdc2ab82dc1fad
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 12:01:46 2011 -0700

    SoftVorbis OMX component now respects the number of valid frames per page.

    Change-Id: I82a117a064d9b083fc58a54ad900a987a763ef03

commit fcd618ec520c376fdb78f4cbb44b8d9f5d213e2b
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 10:59:38 2011 -0700

    Support for the vorbis audio decoder as a soft OMX component.

    Change-Id: Iaeb057e58ca306d3dce205c0445b74d5aefef492

commit d1fcc3203fc8003ad79c6e96b3a1fc4261743f16
Author: Andreas Huber <andih@google.com>
Date:   Fri Apr 29 10:07:50 2011 -0700

    VPX decoder now properly resizes buffers after a port settings change.

    Change-Id: I110749a31b6cba087891d8e5dfe420830bdbf831

commit 35c7168243cb69849d88911144a2c7fdfed5c54e
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 13:23:34 2011 -0700

    Support for the VPX video decoder as a Software OMX component.

    Change-Id: Ic345add2d6d768d4af631160153f2e9b97fcea71

commit 923b2534b4211fc5405377b5190bfa6f2dd27f32
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 11:34:40 2011 -0700

    Table-based registration of soft omx components.

    Change-Id: I7f45f0fa5b3a7950776e69c66349731f7674e937

commit 04a88f3edb2266a463da9c4481b80178be460902
Author: Andreas Huber <andih@google.com>
Date:   Thu Apr 28 11:22:31 2011 -0700

    Apparently OMX_GetParameter is valid in any state other than OMX_StateInvalid

    OMX_SetParameter is still constrained to OMX_StateLoaded or a disabled port.

    Change-Id: I1032d7cf4011982d306aa369d4158a82830d26fb

commit 9d70ca68445e7c40f5c9b2d12466e468f514de88
Author: Andreas Huber <andih@google.com>
Date:   Wed Apr 27 15:03:18 2011 -0700

    Use the new soft OMX aac decoder for HTTP live playback.

    Change-Id: Ifbcfb732a9edb855cb46b49f6d0ac942170ee28f

commit 213fe4a10ea93cce08e8622dc3908053f29878a1
Author: Andreas Huber <andih@google.com>
Date:   Tue Apr 12 16:39:45 2011 -0700

    Foundation for supporting software decoders as OMX components

    Change-Id: I7fdab256563b35d1d090617abaea9a26b198d816

Change-Id: I83e9236beed4af985d10333c203f065df9e09a42
2011-05-11 14:24:58 -07:00
Scott Main
b8df57d876 am d81214da: am a7a9c4cb: am 46524f83: Merge "docs: add package description for RTP" into honeycomb-mr1
* commit 'd81214dae45a4b38919296af41bf756e3931675a':
  docs: add package description for RTP
2011-05-05 18:04:28 -07:00
Scott Main
d81214dae4 am a7a9c4cb: am 46524f83: Merge "docs: add package description for RTP" into honeycomb-mr1
* commit 'a7a9c4cbbc2315a59ad27b43c83c66e272dcc2f2':
  docs: add package description for RTP
2011-05-05 18:02:47 -07:00
Scott Main
de9acb76d9 docs: add package description for RTP
Change-Id: I02c181a48101be288fb4aabf497f573f00038f90
2011-05-05 17:32:01 -07:00
Dima Zavin
24fc2fb1c5 audio/media: convert to using the audio HAL and new audio defs
Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 13:10:10 -07:00
Eric Laurent
d8cbd16659 am 7a492a9a: am b7a76e84: am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit '7a492a9ad42947a3a7b777b0eb6eec56f5bb942b':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-05 10:27:06 -07:00
Eric Laurent
7a492a9ad4 am b7a76e84: am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit 'b7a76e84fde7fe534d46aaaa71e3224798354009':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-04 17:44:50 -07:00
Eric Laurent
b7a76e84fd am a482d83c: Merge "Issue 4157048: mic gain for VoIP/SIP calls." into gingerbread
* commit 'a482d83ccf35ccd6cc29a9e1ace3d77b5f28d013':
  Issue 4157048: mic gain for VoIP/SIP calls.
2011-04-04 12:25:37 -07:00
Eric Laurent
d7a724e6d8 Issue 4157048: mic gain for VoIP/SIP calls.
Herring board exhibits a strong echo even in non speakerphone modes.
To compensate the lack of AEC or AES when not in speakerphone, the mic gain
had been reduced in the ADC. But this has an adverse effect on other VoIP applications
that have their own AEC and are penalized by the weak mic gain.

This workaround enables an acceptable mic gain for other VoIP apps while offering a
SIP call experience which is not worse than it was with the residual echo that was
present even with mic gain reduction.

Change-Id: I33fd37858758e94e42ef5b545d3f0dc233220bf1
2011-03-29 18:44:03 -07:00