308 Commits

Author SHA1 Message Date
Android (Google) Code Review
4e60d7e60b Merge change 24179 into eclair
* changes:
  Support encoding amr-wb content in stagefright.
2009-09-09 13:55:48 -04:00
Android (Google) Code Review
11c803ac77 Merge change 24335 into eclair
* changes:
  use broadcast() instead of signal() when signaling the condition-variable Thread::RequestExitAndWait() is waiting for
2009-09-09 03:29:19 -07:00
Mathias Agopian
d42bd87f23 use broadcast() instead of signal() when signaling the condition-variable Thread::RequestExitAndWait() is waiting for
we could have several thread waiting on the condition and they all need to wake-up.
also added a debug "mTid" field in the class, which contains the tid of the thread (as opposed to pthread_t), this
is useful when debugging under gdb for instance.
2009-09-09 02:45:26 -07:00
Eric Laurent
96c08a69ea Fix issue 1992233: DTMF tones on Sholes is really long.
Add a parameter to ToneGenerator.startTone() allowing the caller to specify the tone duration. This is used by the phone application to have a precise control on the DTMF tone duration which was not possible with the use of delayed messaged.
Also modified AudioFlinger output threads so that 0s are written to the audio output stream when no more tracks are ready to mix instead of just sleeping. This avoids an issue where the end of a previous DTMF tone could stay in audio hardware buffers and be played just before the beginning of the next DTMF tone.
2009-09-08 22:56:07 -07:00
Android (Google) Code Review
b80f698362 Merge changes 24119,24120 into eclair
* changes:
  delete old and unused source files
  fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly
2009-09-08 14:36:06 -07:00
Andreas Huber
ee606e66b0 Support encoding amr-wb content in stagefright. 2009-09-08 12:55:50 -07:00
James Dong
392ff3b529 Add basic metadata retrieval support for midi, ogg, etc.
Bug 2050320
2009-09-08 11:04:53 -07:00
Mathias Agopian
9779b221e9 fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly
Rewrote SurfaceFlinger's buffer management from the ground-up.
The design now support an arbitrary number of buffers per surface, however the current implementation is limited to four. Currently only 2 buffers are used in practice.

The main new feature is to be able to dequeue all buffers at once (very important when there are only two). 

A client can dequeue all buffers until there are none available, it can lock all buffers except the last one that is used for composition. The client will block then, until a new buffer is enqueued.

The current implementation requires that buffers are locked in the same order they are dequeued and enqueued in the same order they are locked. Only one buffer can be locked at a time.

eg. Allowed sequence:   DQ, DQ, LOCK, Q, LOCK, Q
eg. Forbidden sequence: DQ, DQ, LOCK, LOCK, Q, Q
2009-09-07 16:32:45 -07:00
Android (Google) Code Review
e1da8be501 Merge change 23835 into eclair
* changes:
  When encountering a .nomedia file, notify the MediaScannerClient, so that it can erase the data column for entries that are in the folder containing the .nomedia file. This prevents us from deleting (via a delete trigger) files when somebody adds a .nomedia file after the fact.
2009-09-03 12:27:26 -07:00
Marco Nelissen
8b04661700 When encountering a .nomedia file, notify the MediaScannerClient,
so that it can erase the data column for entries that are in the
folder containing the .nomedia file. This prevents us from
deleting (via a delete trigger) files when somebody adds a
.nomedia file after the fact.
2009-09-03 11:22:28 -07:00
Andreas Huber
4c48342572 Setting the component role appears to be mandatory now for all mime types.
Also using CODEC_LOGV instead of vanilla LOGV to include the component name the message related to.
2009-09-02 16:05:36 -07:00
Andreas Huber
da050cf206 Some work to make audio encoding work. 2009-09-02 14:01:43 -07:00
Andreas Huber
43ad6eaf77 Squashed commit of the following:
commit c45bfbb97ccd05982008df47181f9c73abaf0497
Author: Andreas Huber <andih@google.com>
Date:   Tue Sep 1 15:58:12 2009 -0700

    This quirk should not be enabled by default in order to make the bug reproducible by the vendor.

commit 21d72e80e795fcae53d9c3bcc8ba6312b081e420
Author: Andreas Huber <andih@google.com>
Date:   Tue Sep 1 15:55:45 2009 -0700

    Undoing the hack to temporarily give up the lock to facilitate reading from the buffer source.

    This simply causes too many issues, there need to be independent threads providing input buffers and dequeuing output buffers.

commit 84d507def8999c146ce124cc8edfe106c9ca70c2
Author: Andreas Huber <andih@google.com>
Date:   Tue Sep 1 15:16:23 2009 -0700

    The AAC components appear to output stereo data even if the input data is mono...
2009-09-01 16:02:43 -07:00
Andreas Huber
329577aa6d Squashed commit of the following:
commit 3fa5f3ce910f34da0cedb8bcce1bd593db7eb740
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 27 14:48:54 2009 -0700

    Getting rid of more code now obsolete with the departure of OMXDecoder.

commit e0d923ec0c7bb60bec8eb97739036a4c70c0feef
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 27 14:33:06 2009 -0700

    Remove obsoleted OMXDecoder class. OMXDecoder is dead, long live OMXCodec.
2009-08-27 14:50:58 -07:00
Android (Google) Code Review
bc86bda499 Merge change 22897 into eclair
* changes:
  Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
2009-08-27 11:37:35 -07:00
Andreas Huber
42978e55fe An attempt to fix a deadlock between OMXCodec::start and upstream ::read 2009-08-27 10:41:13 -07:00
Eric Laurent
327c27be19 Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
2009-08-27 05:58:10 -07:00
Andreas Huber
127fcdcd9f Another quirk, some OMX components fail to properly flush before shutdown and we must do it for them... 2009-08-26 16:27:02 -07:00
Andreas Huber
b5ceb9ee21 assert => CHECK in stagefright. 2009-08-26 14:48:20 -07:00
Andreas Huber
446f44f61a Keep up with latest changes to overlay handling on that unnamable platform. 2009-08-26 09:11:13 -07:00
Martin Storsjo
c0dea96491 Calculate specular lighting correctly
Since the lighting calculations are done in object space, the vector
from the object to the viewer also needs to be transformed to object
space.
2009-08-25 18:35:54 -07:00
Andreas Huber
404cc418be Make sure not to ask for more buffers when we know that there won't be any, added a quirk for the aac decoder. 2009-08-25 14:26:05 -07:00
Android (Google) Code Review
cc4f3424e5 Merge change 22092 into eclair
* changes:
  Dynamically allocate a pair of MemoryHeaps according buffer count/sizes required by the OMX component, respect JPEG compressed size.
2009-08-20 13:58:17 -07:00
Andreas Huber
5c0a9133d2 Dynamically allocate a pair of MemoryHeaps according buffer count/sizes required by the OMX component, respect JPEG compressed size. 2009-08-20 11:16:40 -07:00
Benny Wong
f99c18083e Add offset handling in MemoryHeapBase class 2009-08-20 03:55:20 -07:00
Mathias Agopian
18b6b49ea5 fix a bug that caused the PixelFormat viewed by Surface to be wrong.
what happened is that the efective pixel format is calculated by SF but Surface nevew had access to it directly.
in particular this caused query(FORMAT) to return the requested format instead of the effective format.
2009-08-19 17:46:26 -07:00
Andreas Huber
4f5e602e17 The PV AVC software decoder expects each fragment of a NAL unit to be handed to the decoder unframed. 2009-08-19 09:37:46 -07:00
Andreas Huber
09daada236 Refactored "stagefright" commandline app, split off JPEGSource. 2009-08-18 11:27:32 -07:00
Andreas Huber
2f10ae08d4 Support for marshalling pointers / intptr_t in Parcel.
Some refactoring to eliminate code duplication in Parcel implementation.
2009-08-17 15:31:25 -07:00
Mathias Agopian
2b8954809e really be more friendly with C 2009-08-17 12:33:20 -07:00
Andreas Huber
be06d26cdc Squashed commit of the following:
commit 5bb012f0065f7ffaaeb4f569d71f0e3a8d6b19c3
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 14 10:40:08 2009 -0700

    An attempt at fixing export using the qcom encoders. More quirks.

commit 0690e76bfa48118a68287ccf1bbfa82febaa620c
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 14 09:08:28 2009 -0700

    Callbacks are now dispatched from a separate thread in OMX.

commit c6571a039526df29b6343f9a1971dbc019088c61
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 13 15:42:25 2009 -0700

    Massive API changes throughout stagefright, smart pointers everywhere.

commit 900612af6a0555664d9ba195112cd859491265f4
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 13 13:33:12 2009 -0700

    OMXCodecs now properly shutdown.

commit 96732f05e1b0603dcd1b11f16a23512592eeb4f5
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 13 12:04:04 2009 -0700

    More work on JPEG decoding using the hardware OMX component.

commit 63839a073ac393e3a130434ba467969053b694ad
Author: Andreas Huber <andih@google.com>
Date:   Wed Aug 12 13:13:31 2009 -0700

    An attempt to drive the JPEG decoder OMX node.

commit 3ac2fe5ab2926eda81b2123610b2434c645294ff
Author: Andreas Huber <andih@google.com>
Date:   Tue Aug 11 16:38:21 2009 -0700

    Renamed StateMachine to OMXCodec and put it in its proper place.

commit 247da75a96bf8881956413023dd49a84d5b4f5b2
Author: Andreas Huber <andih@google.com>
Date:   Tue Aug 11 16:06:19 2009 -0700

    Statemachine is now a full-fledged MediaSource.

commit 045244f6771fa0b9b329495c953afda900a84b71
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 7 09:16:54 2009 -0700

    Properly setup the input format when exporting to AMR audio.

commit 271b984cb32c5cd9e46e3f90ae121f334e4b8da9
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 6 09:59:38 2009 -0700

    Added some code to test audio encoding to the OMX harness.

commit 79af4748e4af33bd66d3fbac606e332a69741cf4
Author: Andreas Huber <andih@google.com>
Date:   Wed Aug 5 14:36:22 2009 -0700

    Merge the old OMXDecoder and the new, shiny, StateMachine code.

commit 91cf5dd77a8762bc10a0b2ffce35e3bbeb262231
Author: Andreas Huber <andih@google.com>
Date:   Tue Aug 4 17:41:43 2009 -0700

    A new harness to test OMX node compliance (and quirks).
2009-08-17 10:24:50 -07:00
Android (Google) Code Review
7193a58763 Merge change 21401 into eclair
* changes:
  make sure to update a surface's usage bits when it changes, instead of only the first time.
2009-08-14 20:07:51 -07:00
Mathias Agopian
321abdb092 make sure to update a surface's usage bits when it changes, instead of only the first time.
also fixed a few locking issues in Surface and commented how each member is protected.
2009-08-14 18:52:17 -07:00
Sahil Sachdeva
c9706f0262 DO NOT MERGE, ALready merged to master.
1440173 [NJ-1331] MetaData utility parse the wrong m4a meta data. Changes to Java, application side.
2009-08-14 14:52:23 -07:00
Mathias Agopian
f233915016 be more friendly with C 2009-08-13 18:27:10 -07:00
Mathias Agopian
317a6280cc Surface::GPU and Surface::HARDWARE are now deprecated; they will be set automatically if needed.
this also ripples into the window manager API by making some constant there deprecated as well.
2009-08-13 18:19:32 -07:00
Dima Zavin
8db9338914 ui: make native_window_set_usage be a static inline
Signed-off-by: Dima Zavin <dima@android.com>
2009-08-13 16:52:24 -07:00
Benny Wong
da83f4674a Modified the camera HAL interface to use the same generic callback architecture as camera services 2009-08-13 10:46:28 -07:00
Dianne Hackborn
90f77218a2 am b8546001: Merge change 20878 into donut
Merge commit 'b8546001701405a76dad7e6235046e592296fac2'

* commit 'b8546001701405a76dad7e6235046e592296fac2':
  Fix issue #2048263: More debugging information
2009-08-12 12:36:12 -07:00
Mathias Agopian
5cec4742b3 second take, hopefully this time it doesn't break one of the builds: "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything." 2009-08-11 23:32:29 -07:00
Fred Quintana
64e89a8aff Revert "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
This reverts commit 8b76a0ac6fbf07254629ed1ea86af014d5abe050.
2009-08-11 20:49:35 -07:00
Dianne Hackborn
82e1ee93ee Fix issue #2048263: More debugging information
We now hopefully do better about generating the anr reports, and include
information about the malloc loaded assets in meminfo.
2009-08-11 18:56:41 -07:00
Mathias Agopian
8b76a0ac6f SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything.
This change makes SurfaceHolder.setType(GPU) obsolete (it's now ignored).
Added an API to android_native_window_t to allow extending the functionality without ever breaking binary compatibility. This is used to implement the new set_usage() API. This API needs to be called by software renderers because the default is to use usage flags suitable for h/w.
2009-08-11 16:12:56 -07:00
Andreas Huber
ccf8b94169 Expose a variation of the createRenderer API that works on a plain Surface. 2009-08-10 12:58:05 -07:00
Andreas Huber
e9ec12c47e Deprecate/remove now unused socketpair ipc communication in favour of exclusive binder use. 2009-08-10 10:29:40 -07:00
Android (Google) Code Review
db704e28ae Merge changes 20497,20498,20499
* changes:
  minor code clean-up
  added EGLUtils::strerror
  better error handling
2009-08-07 16:39:34 -07:00
Mathias Agopian
509dae53c5 added EGLUtils::strerror 2009-08-07 16:37:21 -07:00
Eric Laurent
ddb78e7753 Fix issue 2001214: AudioFlinger and AudioPolicyService interfaces should not use pointers as handles to inputs and outputs.
Use integers instead of void* as input/output handles at IAudioFlinger and IAudioPolicyService interfaces.
AudioFlinger maintains an always increasing count of opened inputs or outputs as unique ID.
2009-08-07 00:27:19 -07:00
Android (Google) Code Review
43a6d88e4e Merge changes 20345,20346,20347
* changes:
  update most gl tests to use EGLUtils
  added two EGL helpers for selecting a config matching a certain pixelformat or native window type
  added NATIVE_WINDOW_FORMAT attribute to android_native_window_t
2009-08-06 16:27:47 -07:00
Mathias Agopian
265d9c076a added two EGL helpers for selecting a config matching a certain pixelformat or native window type 2009-08-06 16:05:39 -07:00