2207 Commits

Author SHA1 Message Date
Andreas Huber
f0f1ceeb51 DO NOT MERGE: Make sure we restart the prefetcher immediately when trying to satisfy a read.
Change-Id: I27c2b5d20ae577e71936d32522f70f6ba08cc247
related-to-bug: 4286618
2011-04-14 10:10:36 -07:00
James Dong
8a1a0fd1dc When read() from AudioRecord returns 0 or negative value, report an error to application. DO NOT MERGE.
Change-Id: I3a66fd0ed3f6b90350d706a608a39d8b4a398e32
related-to-bug: 4195127
2011-03-30 16:30:00 -07:00
James Dong
070b2e1a5c MP3Extractor and MP3 decoder fixes - DO NOT MERGE
cherry-picked the following patches from HC branch:
o PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits
o Do not enforce the rule in MP3Extractor that all audio frames in an mp3 file must have the same mode
o When the temp buffer wraps around, the next read position should start
    from what have been read to avoid reading the same remaining bytes in
    the buffer again.
o Speed up MP3Extractor using cached reads

bug - 4083532

Change-Id: I7bbd2bd358fd5ee322287866cb8ee0c2bb217fea
2011-03-11 11:02:17 -08:00
Lorenzo Colitti
bd0e806a61 Support IPv6->IPv4 fallback in HTTP streaming.
Bug: 4068057
Change-Id: I425f65a99eb9e0986d9e9c0e264c3c8f61fcfdbd
2011-03-08 15:01:15 -08:00
Lorenzo Colitti
b9da16a1e3 Support IPv6 in HTTP streaming.
Bug: 4068057
Change-Id: I1e141ec99fbfa43722eeb2e4161d56548ffc0640
2011-03-08 15:01:15 -08:00
James Dong
d581c04722 Add missing copyright headers for a couple of files. DO NOT MERGE
Cherry-picked from other branch...

bug - 4025673

Change-Id: I6fd1baaf5625297fb1e358de3a3a632a7f5deb90
2011-03-07 14:50:40 -08:00
Andreas Huber
dbe09da6ac DO NOT MERGE: Respond to RTSP server->client requests.
Even if it's just to tell them that we don't support any (this is optional).

Change-Id: Iee50b4020f28a47dfbe5d56f1732fe044b3b3655
related-to-bug: 3353752
2011-02-16 13:37:19 -08:00
Andreas Huber
ea47cb4ede DO NOT MERGE: Derive the Transport "source" attribute from the RTSP endpoint address if necessary
and continue even if we were unable to poke a hole into the firewall.

Change-Id: I5757a2521b8d81a42d03cca379179ce2c9ee46e7
related-to-bug: 3457201
2011-02-15 14:02:34 -08:00
Andreas Huber
d1ba051a46 DO NOT MERGE: Work around several issues with non-compliant RTSP servers.
In this particular case these RTSP servers were implemented as local services,
retransmitting live streams via a local RTSP server instance.

They picked wrong rtp/rtcp port pairs (odd rtp port), blank lines in the session
description, wrong case of the format description, relative base URLs...

Change-Id: I502a04a7e1d690fd461b7ecf0b56c6a6c2ac1325
related-to-bug: 3452103
2011-02-15 11:02:43 -08:00
Andreas Huber
b6c2e2b46c DO NOT MERGE: More robust parsing of NPT time ranges in RTSP.
Change-Id: If5a00f1e29dbc12956e1fb000dac859706d19791
related-to-bug: 3217210
2011-01-28 09:58:11 -08:00
Andreas Huber
2dce338e01 DO NOT MERGE: This particular RTSP server streams MPEG4-LATM audio with extra trailing bytes.
And now we're just ignoring them. Yay standards.

Change-Id: Ia8c0b9161e606152fb681f0dda3ba901954dc749
related-to-bug: 3353752
2011-01-26 16:03:33 -08:00
Jean-Michel Trivi
2ba92c71b5 do not merge bug 3370834 Cherrypick from master
Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
 other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
 Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
 getAudioSourceMax() return value in MediaRecorder.java as the
 new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
2011-01-26 11:20:01 -08:00
Marco Nelissen
c929677e01 Merge "Increase the number of useful bits in the spectrum." into gingerbread 2011-01-25 10:06:16 -08:00
Andreas Huber
efebdf4bd4 DO NOT MERGE: Support non-multiple-of-16 dimensions in MPEG4/H.263 software decoder
Change-Id: I6c27c00a6e13cb3635e61089c0db0989f5810c37
related-to-bug: 3384367
2011-01-24 15:59:14 -08:00
Marco Nelissen
dbc0fe985f Increase the number of useful bits in the spectrum.
Change-Id: I3efc2ac8db689285566df35cb6f594aab41141db
2011-01-24 08:47:55 -08:00
Andreas Huber
a2ab9aace3 DO NOT MERGE: Prefill the cache before trying to instantiate the media extractor.
The latter is an operation that otherwise could block on the datasource
for a significant amount of time. During that time we'd be unable to
abort the preparation phase without this prefill.

Change-Id: I3bc889b264f599bfd5c2bbdf48b88ccb55d86172
related-to-bug: 3362836
2011-01-19 15:44:23 -08:00
Andreas Huber
0e49d20107 DO NOT MERGE: Apparently our native TCP sockets do not return an error from blocking "connect"
if the network interface is shutdown while connecting.

Change-Id: I168c6026de24812efa9b7e607a9eb83efded8c1f
related-to-bug: 3362836
2011-01-18 15:52:31 -08:00
James Dong
9efe47374b Squash commits of the following patches, cherry-picked from other branch - do not merge.
o Prepare for publishing MediaMetadataRetriever as public API
  step one:
  o replaced captureFrame with getFrameAtTime
  o removed getMode

o Replace MediaMetadataRetriever.captureFrame() with MediaMetadataRetriever.getFrameAtTime()
  as part of the preparation for publishing MediaMetadataRetriever as public Java API

o Remove captureFrame from MediaMetadataRetriever.java class
  It has been replaced by getFrameAtTime() method

o Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java

o Publish MediaMetadataRetriever.java as public API
  o Removed setMode() methods and related mode constants
  o Removed some of the unused the metadata keys
  o Updated the javadoc
  o part of a multi-project change.

bug - 3309041

Change-Id: I2efb6e8b8d52897186b016cb4efda6862f5584c4
2011-01-12 17:12:46 -08:00
Andreas Huber
7c6153606c Fail to parse duration instead of asserting, if the server response cannot be parsed.
Change-Id: I95c61ed83800db82e99c0023b942fb8ae05ed3cf
related-to-bug: 3338518
2011-01-12 09:57:23 -08:00
Andreas Huber
7e2f9cc81d DO NOT MERGE: Fix Matroska issues
related-to-bug: 3331623

Squashed commit of the following:

commit 8484811f3784564ce962ec1b6311bac532d73ffc
Author: Andreas Huber <andih@google.com>
Date:   Tue Jan 11 11:56:06 2011 -0800

    Properly parse Matroska lacing flags and extract all frames contained in a block.

    related-to-bug: 3331623

commit 38f1f39381a01659577461b3d35bd22db45ba317
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 15 15:10:34 2010 -0800

    Proper support for variable NALsize lengths of AVC content in .mkv files.

    related-to-bug: 3197442

Change-Id: I4b404f3c3d0a2a2fa336b9edff75eb25ffc66a2f
2011-01-11 16:02:31 -08:00
Andreas Huber
549f12ad04 DO NOT MERGE: Fix parsing of ntp= PLAY response.
related-to-bug: 3340186

Squashed commit of the following:

commit b61c36b7228aec9f5360883b1e1c1e0530488974
Author: Andreas Huber <andih@google.com>
Date:   Wed Oct 27 13:59:59 2010 -0700

    Better support for MP4A-LATM RTP disassembly. This used to fail if mNumSubFrames > 1 and the sub frames did not align with RTP packet boundaries.

commit b10f322c07e5bebcaf032e8624cb4a5d733dfc15
Author: Andreas Huber <andih@google.com>
Date:   Mon Oct 25 09:40:52 2010 -0700

    We don't have access to the md5 implementation on the simulator, let's disable digest authentication in rtsp for simulator targets.

commit 0aa83cf9e4637adf9501708fcdf7d0d6d4dc4fe1
Author: Andreas Huber <andih@google.com>
Date:   Wed Oct 20 15:00:34 2010 -0700

    Support for BASIC and DIGEST authentication schemes in RTSP. Support for malformed packet descriptions that end lines in LF only, instead of CRLF.

    related-to-bug: 3084183

Change-Id: I6e512cb73cc8d5624a83f7154aa5699f7fef7534
2011-01-11 09:53:30 -08:00
James Dong
6328185b6c Avoid deadlock in OMX::freeNode by making sure OMXCodecObserver does not hold the last reference of OMXCodec object - do not merge
cherry-picked from: I4c79b66a900c527e3ae6a833f76d5da1b75c5a89

bug - 3336424

Change-Id: I2d8ecb79a5422342988c195c012c9e6327ac457a
2011-01-10 10:27:02 -08:00
Yu Shan Emily Lau
2af4e71dd4 Merge "Fix the test application orientation. Bug# 3205196" into gingerbread 2011-01-07 09:38:24 -08:00
Marco Nelissen
f13d450139 Send "compilation" tag when inserting into the database.
It's not actually inserted into the database, but the media provider uses it
for disambiguating albums.
b/3311831

Change-Id: Idb630866e960338ce2795dcc128cafaf6c9c27f2
2011-01-06 16:37:03 -08:00
Marco Nelissen
ba77a3f9cb Add support for the "compilation" tag in mp3, mp4 and ogg, and also add
support for two common ways of specifying album artist in ogg files.
b/3311831

Change-Id: Iba1152013b7577168af71f947d7249560419fa05
2011-01-06 15:05:06 -08:00
Yu Shan Emily Lau
d97943d5d0 Fix the test application orientation. Bug# 3205196
Change-Id: I57085d6507482ce15dbf3b167965be4af43b3d88
2011-01-04 20:57:09 -08:00
James Dong
d609ca7f6a Expose AMRNB/WB and AAC encoder and related file output formats - do not merge
bug - 3305667

Change-Id: I8f137af7f87cb010f75cae1777b9ec6b6af8214f
2010-12-22 12:12:12 -08:00
Eric Laurent
36d41b8103 Fix issue 2712130: Sholes: problem when playing audio while recording over bluetooth SCO.
The problem is that when an input stream is opened for record over bluetooth SCO, the kernel
mono audio device should be opened in RW mode to allow further use of this same device by an output stream
also routed to bluetooth SCO.
This does not happen because of a bug in AudioSystem::isBluetoothScoDevice() that does not return true
when the device is DEVICE_IN_BLUETOOTH_SCO_HEADSET (input device for blurtooth SCO).

Change-Id: Ic78bf324b4a68e65721d763dc7682ce7a8f14f75
2010-12-15 19:09:42 -08:00
James Dong
da1b16ad41 When INFO_FORMAT_CHANGED event comes in before the renderer was initialized, go back to read from source again
bug - 3264094

Change-Id: I291a9b09b335d0eb4acf91f992e59fc44bc57d01
2010-12-08 15:37:14 -08:00
James Dong
5cdcf16ec7 Be conservative in estimating the file size limit.
bug - 3045580

Change-Id: Ifdffa354b9433639c3f246a0eb581ef14af1e797
2010-11-30 18:18:08 -08:00
Andreas Huber
30c818444d Merge "DO NOT MERGE Support for "chunked" HTTP transfer encoding." into gingerbread 2010-11-30 14:30:00 -08:00
Andreas Huber
a41c1e1de0 Merge "DO NOT MERGE Upgrade to the latest version of libwebm to fix YouTube webm playback." into gingerbread 2010-11-30 14:06:26 -08:00
Andreas Huber
d208a2c7b0 DO NOT MERGE Upgrade to the latest version of libwebm to fix YouTube webm playback.
DO NOT MERGE
related-to-bug: 3141937

Change-Id: Iaf1b0c5d45a6b5bb7624a59747041c27b4dde83b
2010-11-30 13:42:50 -08:00
Andreas Huber
8d023ddcd4 DO NOT MERGE Support for "chunked" HTTP transfer encoding.
DO NOT MERGE

Change-Id: I253d48ea69f239a6d3d0bb7e0d31eef5c773a9d6
related-to-bug: 3205131
2010-11-30 13:37:01 -08:00
Andreas Huber
567b2bd146 Merge "After seeking display the first new video frame right away without concern for A/V sync. This looks much more responsive to the user." into gingerbread 2010-11-30 13:00:14 -08:00
Eric Laurent
688f4c58d4 Merge "Update java doc for visualizer FFT capture." into gingerbread 2010-11-30 11:50:25 -08:00
Andreas Huber
0fb258d6c3 After seeking display the first new video frame right away without concern for A/V sync. This looks much more responsive to the user.
Change-Id: Ifb1f8c91e95a5cafe30ae1035973316c210b98a5
related-to-bug: 3152363
2010-11-30 11:46:38 -08:00
Andreas Huber
122a9ccbcd DO NOT MERGE - Instead of asserting that ISurface successfully registered buffers, report an error and propagate it up to the java client.
Change-Id: Ibb14e5aff20920da4917d85de38ba3a8ee71d0bd
related-to-bug: 3188835
2010-11-30 10:50:25 -08:00
Chia-chi Yeh
683a7ff922 Merge "Visualizer: Fix the conversion from 8-bit sample to 16-bit sample." into gingerbread 2010-11-29 22:56:56 -08:00
Wu-cheng Li
f6bd761f94 Use back-facing camera as default in camera/camcorder profile.do not merge
bug:3173302
Change-Id: I11eaed32bb393206b560834d52c412f3e5a1a7d9
2010-11-09 14:11:45 +08:00
James Dong
1b2efbca71 Merge "Update a comment about when setOrientationHint() should be called" into gingerbread 2010-11-08 19:59:16 -08:00
James Dong
53ebc72fd8 Support extracting thumbnail from rotated video tracks
Change-Id: Ife0a2536aaac5ff1efdf1035b9d2c892773ee16c
2010-11-08 16:52:59 -08:00
James Dong
5aa95dd36c Update a comment about when setOrientationHint() should be called
Change-Id: I389089390a552ee7a86823c050048dcec0a0eb2a
2010-11-08 10:36:53 -08:00
Andreas Huber
31dc911aee Support post-decode video rotation.
Change-Id: Ia371316e73a57e44610de86adce3eaa560afbf84
2010-11-05 17:03:17 -07:00
James Dong
1653e261e8 Merge "Rotation support" into gingerbread 2010-11-05 16:58:51 -07:00
James Dong
ad8f19c6b3 Add a new public API to support recording rotated videos
o changed a comment about the rotation orientation from counter-clockwise
  to clockwise.

Change-Id: I16ad73ce1a55cc627d9a516e23d1325753b3037e
2010-11-05 15:53:00 -07:00
James Dong
65a73f4e8c Rotation support
- We only support 0, 90, 180, and 270 degree clockwise rotation

- Some players are known to ignore composition matrix in the MP4 file,
  although this is part of the MP4 file standard.
  Both QT and YT are supporting the rotation

Change-Id: I1b7f66a801e9d9c49d889c9b06dd6173fa7e76c4
2010-11-05 15:47:52 -07:00
James Dong
c80c28801d Revert "Support rotation in media recorder"
This reverts commit f1febe470ac30f8992066cb263c10f58493c4c34.
2010-11-03 19:22:47 -07:00
James Dong
f1febe470a Support rotation in media recorder
o needs to be tested with camera hal and camcorder application

Change-Id: Ie343185c8ad3ec55da8850efbdcf19cf98993232
2010-11-03 17:49:55 -07:00
James Dong
6786fccf5a DO NOT MERGE
Fix premature release of recording frames when physical address or metadata is stored in input video buffers

- bug 3158459

Change-Id: If297189d2a87fc3abfda68c29ac75b490b30a902
2010-11-02 19:30:01 -07:00