713 Commits

Author SHA1 Message Date
James Dong
1090a29d4e Merge "Avoid repeatedly allocating and freeing memory in CameraSource" into kraken 2010-05-26 17:01:16 -07:00
James Dong
aed15e7856 Avoid repeatedly allocating and freeing memory in CameraSource
Change-Id: Ia3760820da0559e4e908dedae1f1df05f9a6a242
2010-05-26 16:54:18 -07:00
Eric Laurent
27a308d309 Merge "Fix issue 2667797: [Audio Effect Framework] new base class and binder interfaces for effect control." into kraken 2010-05-25 23:48:30 -07:00
Mathias Agopian
64f7549b0e Merge "fix [2712278] The preview buffer left some black borders in left and bottom edges" into kraken 2010-05-25 17:56:07 -07:00
Mathias Agopian
2ce19af45b fix [2712278] The preview buffer left some black borders in left and bottom edges
we were incorrectly flagging push_buffer surfaces as invalid

Change-Id: I4dfd4ffbbe8a71f7e23e835db8d71966416c29bb
2010-05-25 17:51:34 -07:00
Eric Laurent
c0f34386d6 Fix issue 2667797: [Audio Effect Framework] new base class and binder interfaces for effect control.
Added IEffect and IEffectClient binder interfaces to exchange effect module control
and status information between application and media server processes.

Change-Id: I10e8e894898e52ed9956a765d0ef7075eb2593af
2010-05-24 23:33:42 -07:00
Eric Laurent
cf3fa85cdb Merge "Fix issue 2667796: [Audio Effect Framework] Effect factory and libraries." into kraken 2010-05-24 23:23:29 -07:00
Mathias Agopian
2be352adab added the notion of fixed-size buffers
the new native_window_set_buffers_geometry allows
to specify a size and format for all buffers to be
dequeued. the buffer will be scalled to the window's
size.

Change-Id: I2c378b85c88d29cdd827a5f319d5c704d79ba381
2010-05-24 18:26:01 -07:00
Mathias Agopian
57d89899c9 fix a bug when reallocating a window's buffers is needed
we need to mark the buffers that need to be reallocated,
NOT the buffer's indices.

Change-Id: I809e2e1b03b56c4d2ab983c25523dae99aa1da74
2010-05-24 13:47:24 -07:00
Wu-cheng Li
bd329ddbea Improve GPS EXIF parameters comments.
Change-Id: I33f7487821b283fe746baa09a71a703ae763d66d
2010-05-24 17:31:17 +08:00
Mathias Agopian
25f0bdaea6 added native_window_set_buffer_count()
this method can be used to change the number of buffers
associated to a native window. the default is two.

Change-Id: I608b959e6b29d77f95edb23c31dc9b099a758f2f
2010-05-21 14:34:32 -07:00
Mathias Agopian
4f5f2786b2 Merge "fix the threading issue for setBuffercount()" into kraken 2010-05-21 13:53:28 -07:00
Eric Laurent
5fe37c6838 Fix issue 2667796: [Audio Effect Framework] Effect factory and libraries.
First effect factory and effect library API implementation.
Also added default effect libraries for reverb and equalizer effects.
These libraries are for functional test only and are not fine tuned with
regard to audio quality. They will probably be replaced by other implementations
before the release.

Change-Id: I6868f8612146ae282c64052765c61a52ec789ec8
2010-05-21 07:05:56 -07:00
Mathias Agopian
898c4c91be fix the threading issue for setBuffercount()
this change introduces R/W locks in the right places.
on the server-side, it guarantees that setBufferCount()
is synchronized with "retire" and "resize".
on the client-side, it guarantees that setBufferCount()
is synchronized with "dequeue", "lockbuffer" and "queue"
2010-05-20 18:00:42 -07:00
Andreas Huber
072f5247ef Support for media extraction from .mkv/.mka Matroska files in stagefright.
Change-Id: I4c26579828ad575523ccf58b0b5cb144046c04ca
related-to-bug: 2483739
2010-05-20 14:56:53 -07:00
Mathias Agopian
66c46a6bd1 added RWLock C++ wrapper
Change-Id: Ia736bf7f6e2c49915a9ab5669551cf89dafa7961
2010-05-19 15:12:59 -07:00
James Dong
17299ab50c Initial software encoder checkins
Change-Id: I27f387db23594e46384c4eb3a0093ce220bb6b60
2010-05-19 07:21:25 -07:00
Mathias Agopian
cd30f4f849 fix some bugs in SharedBufferStack::resize
added buffers should now be labeled properly.

Change-Id: I28aa753fbe89ab89134e7753575319478934c7fa
2010-05-17 17:27:26 -07:00
Eric Laurent
eb8f850d0b Fix issue 2553359: Pandora does not work well with Passion deskdock / Cardock.
The problem is due to a too big difference between the buffer size used at the hardware interface and at the A2DP interface.
When no resampling occurs we don't notice problems but the timing is very tight. As soon as resampling is activated, the AudioTrack underruns.
This is because the AudioTrack buffers are not resized when moving the AudioTrack from hardware to A2DP output.
The AudioTrack buffers are calculated based on a hardware output buffer size of 3072 bytes. Which is much less than the A2DP output buffer size (10240).

The solution consists in creating new tracks with new buffers in AudioFlinger when the A2DP output is opened
instead of just transfering active tracks from hardware output mixer thread to the new A2DP output mixer thread.
To avoid synchronization issues between mixer threads and client processes, this is done by invalidating tracks
by setting a flag in their control block and having AudioTrack release the handle on this track (IAudioTrack)
and create a new IAudioTrack when this flag is detected next time obtainBuffer() or start() is executed.

AudioFlinger modifications:
- invalidate the tracks when setStreamOutput() is called
- make sure that notifications of output opening/closing and change of stream type to output mapping are sent synchronously to client process.
This is necessary so that AudioSystem has the new stream to output mapping when the AudioTrack detects the invalidate flag in the client process.
Previously their were sent when the corresponding thread loop was executed.

AudioTrack modifications:
- move frame count calculation and verification from set() to createTrack() so that is is updated every time a new IAudioTrack is created.
- detect track invalidate flag in obtainBuffer() and start() and create a new IAudioTrack.

AudioTrackShared modifications
- group all flags (out, flowControlFlag, forceReady...) into a single bit filed to save space.

Change-Id: I9ac26b6192230627d35084e1449640caaf7d56ee
2010-05-17 02:23:47 -07:00
Wu-cheng Li
ae7ca4c32c Fix build error.
Original name INFINITY conflicts with the macro in math.h.

Change-Id: I9845ed84fca17813dd971239a902cc1e0bad1e3e
2010-05-15 13:06:19 +08:00
Wu-cheng Li
e339c5edbe Add camera focus distances API.
Applications can use this API to estimate the distance
between the subject and the camera.

bug:1955650
Change-Id: Ie6c8ea4971759cab6c9bcdda2c5ceb5925791c27
2010-05-15 12:40:54 +08:00
James Dong
68510e60f9 Detect and handle premature termination of a recording session
Change-Id: Ifb83b19f3e68580345b23efed5d5956fb81baeb8
2010-05-14 11:48:00 -07:00
James Dong
9db798d0f0 Audio/video initial recording time synchronization
Change-Id: Iac58b63d474fe09c1d36ba6ecde91dafbb7fef9a
2010-05-14 10:51:12 -07:00
James Dong
1824486e04 Handle recording file size and/or duration limit
Change-Id: Ib9ed1f3ebd8fef550cc130a7ef11f2905fa9aedc
2010-05-14 10:46:56 -07:00
Eric Laurent
b0a0147f34 AudioFlinger: rename variables to clarify reference to track channel count or channel mask
Some variables and structure members should be renamed to reflect the fact that they contain the
number of channels in a track (channel count) or the actual channels used by a track (channel mask).
Especially member "channels" of track control block (struct audio_track_cblk_t) is actually the
number of channels (channels count).

Change-Id: I220c8dede9fc00c8a5693389e790073b6ed307b8
2010-05-14 05:45:46 -07:00
James Dong
e292b3bc9c Remove dummy surface in CameraSource
bug - 2680919

Change-Id: Ia0308cf57fd67058b4dd0e042b3ce97f13df475f
2010-05-13 12:08:29 -07:00
Mathias Agopian
2f0e6753d6 Merge "SharedBufferStack now can grow up to 16 buffers." into kraken 2010-05-12 17:36:46 -07:00
Mathias Agopian
59751dbf7d SharedBufferStack now can grow up to 16 buffers.
there is a new resize() api, which currently only allows growing.

Change-Id: Ia37b81b73be466d2491ffed7f3a23cd8e113c6fe
2010-05-12 17:28:20 -07:00
Kenny Root
e8621534db Merge "ZipUtilsRO rewrite based on Dalvik Zip rewrite" into kraken 2010-05-12 14:54:42 -07:00
Andreas Huber
11777d6fa2 am b003ad17: am e0dc80f8: Merge "Support for customizable socket-read timeouts through the HTTP response." into froyo
Merge commit 'b003ad17bffeba7875b9708ffeef2300ef28c916' into kraken

* commit 'b003ad17bffeba7875b9708ffeef2300ef28c916':
  Support for customizable socket-read timeouts through the HTTP response.
2010-05-12 07:55:48 -07:00
Wu-cheng Li
b339013589 am d8c33747: am 78624e41: Add remove method in CameraParameters class.
Merge commit 'd8c33747afbe98e893e0569f3bf45b67a9e8e728' into kraken

* commit 'd8c33747afbe98e893e0569f3bf45b67a9e8e728':
  Add remove method in CameraParameters class.
2010-05-12 07:55:00 -07:00
Andreas Huber
b003ad17bf am e0dc80f8: Merge "Support for customizable socket-read timeouts through the HTTP response." into froyo
Merge commit 'e0dc80f878b56ed744bd06d341716fcfff4e3acc' into froyo-plus-aosp

* commit 'e0dc80f878b56ed744bd06d341716fcfff4e3acc':
  Support for customizable socket-read timeouts through the HTTP response.
2010-05-12 07:49:39 -07:00
Wu-cheng Li
d8c33747af am 78624e41: Add remove method in CameraParameters class.
Merge commit '78624e41da166712aaa5ae47e4d3467337ac810a' into froyo-plus-aosp

* commit '78624e41da166712aaa5ae47e4d3467337ac810a':
  Add remove method in CameraParameters class.
2010-05-12 07:48:41 -07:00
Kenny Root
68246dcec1 ZipUtilsRO rewrite based on Dalvik Zip rewrite
Change the way zip archives are handled.  This is necessary to deal with
very large (~1GB) APK files, for which our current approach of mapping
the entire file falls over.

We now do the classic scavenger hunt for the End Of Central Directory
magic on a buffer of data read from the file, instead of a memory-mapped
section.  We use what we find to create a map that covers the Central
Directory only.

If the caller is interested in unpacking the file contents, we have to
do an additional file read to discover the size of the Local File Header
section so we can skip past it.

This is based on Change I745fb15abb in the dalvik tree. Both
implementations share a common ancestry, but the cost of unifying them
outweighs the benefits of wrapping C calls.

Change-Id: Iddacb50fe913917c2845708a530872d65fdbe620
2010-05-12 05:07:48 -07:00
Jamie Gennis
25c2af99bf Merge "Add incStrong and decStrong methods to android_native_{window,buffer}_t." into kraken 2010-05-11 12:25:31 -07:00
Andreas Huber
e67c1607cc Support for customizable socket-read timeouts through the HTTP response.
Specify a response header of "X-SocketTimeout: 15" to override the default timeout
of 5 secs with a timeout of 15 seconds. Specify a negative value to disable the
timeout altogether.

Change-Id: I545adf3d8b3f7efe5f8d081a641c6404440a77db
related-to-bug: 2675721
2010-05-11 11:10:21 -07:00
James Dong
b5e742397d Output streamable MP4 file during MP4 file recording
When the reserved moov box space is not big enough,
fall back to non-streamable MP4 file.

Change-Id: I93382d037d657a3f3fe2af31e4ea26e1898b4d95
2010-05-11 10:36:43 -07:00
Wu-cheng Li
78624e41da Add remove method in CameraParameters class.
bug:2672651
Change-Id: I537c817b5ca6a3d925f22febe9a5769156354d00
2010-05-11 12:54:14 +08:00
Wu-cheng Li
e1b2b3b0d2 Merge "Add continuous focus mode constant." into kraken 2010-05-10 20:04:14 -07:00
Jamie Gennis
505cef3330 Add incStrong and decStrong methods to android_native_{window,buffer}_t.
This change adds the methods necessary to use sp<> to handle refcounting
android_native_window_t and android_native_buffer_t.  The new methods forward
the refcounting operations to the corresponding android_native_base_t
functions.

Change-Id: I7de8e262728e439bc1efdf69374a2a9f6f432ced
2010-05-10 17:33:32 -07:00
Andreas Huber
248597ae64 am 17078510: am d13efb20: Merge "A new OggExtractor/VorbisDecoder combo to support approximate seeking." into froyo
Merge commit '1707851090e6512a77247b0c260dd673ef687589' into kraken

* commit '1707851090e6512a77247b0c260dd673ef687589':
  A new OggExtractor/VorbisDecoder combo to support approximate seeking.
2010-05-10 09:49:24 -07:00
Andreas Huber
1707851090 am d13efb20: Merge "A new OggExtractor/VorbisDecoder combo to support approximate seeking." into froyo
Merge commit 'd13efb20089e44e6958cb9704864c03821f19e1c' into froyo-plus-aosp

* commit 'd13efb20089e44e6958cb9704864c03821f19e1c':
  A new OggExtractor/VorbisDecoder combo to support approximate seeking.
2010-05-10 09:43:26 -07:00
Wu-cheng Li
ca09961484 Add continuous focus mode constant.
bug:2612447
Change-Id: I9bc3f5a47ad50722a265d50b1d28fb82a2253dc9
2010-05-10 15:14:56 +08:00
Chih-Chung Chang
e25cc65639 Support multiple cameras in framework.
Change-Id: I081f0fbdca4b633715ea7c3b3d42f8662d27598a
2010-05-10 11:21:14 +08:00
Andreas Huber
388379f8b4 A new OggExtractor/VorbisDecoder combo to support approximate seeking.
Change-Id: Id5d0c1c8b1adc62896bb5ed951f7b5cfda811e95
related-to-bug: 2654400
2010-05-07 12:01:45 -07:00
Dan Egnor
a269d195d4 am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo
Merge commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f' into kraken

* commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f':
  Make static versions of libutils and libbinder.
2010-05-06 17:35:06 -07:00
Dan Egnor
ca48c88c3d am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo
Merge commit '8a8658a5de261c2da72d431940877bd054bc9837' into froyo-plus-aosp

* commit '8a8658a5de261c2da72d431940877bd054bc9837':
  Make static versions of libutils and libbinder.
2010-05-06 17:33:45 -07:00
Dan Egnor
8a8658a5de Merge "Make static versions of libutils and libbinder." into froyo 2010-05-06 17:31:48 -07:00
Andreas Huber
8a1c0934b0 am 71bd9fc8: am 100ef9be: Merge "Disable vorbis seek when streaming from localhost." into froyo
Merge commit '71bd9fc81e3154b9cad22ca7ff2d9c6ed6fdbe6c' into kraken

* commit '71bd9fc81e3154b9cad22ca7ff2d9c6ed6fdbe6c':
  Disable vorbis seek when streaming from localhost.
2010-05-06 12:43:59 -07:00
Andreas Huber
71bd9fc81e am 100ef9be: Merge "Disable vorbis seek when streaming from localhost." into froyo
Merge commit '100ef9bee48c9beb83d885d233de6a42c64f55af' into froyo-plus-aosp

* commit '100ef9bee48c9beb83d885d233de6a42c64f55af':
  Disable vorbis seek when streaming from localhost.
2010-05-06 12:36:13 -07:00