748 Commits

Author SHA1 Message Date
Gilles-Arnaud Bleu-Laine
9a6ed36ba5 Gracefuly return on detecting wrong AAC format from corrupted files
Return BAD_VALUE error upon detection of wrongly formatted files.
The client should abort the initialization upon error detection.

The current CHECK() interrupts the configurecodec() preventing a graceful
exit.

Change-Id: Ic79313fa76a63284897df5d91635de87d06f3100
Signed-off-by: Gilles-Arnaud Bleu-Laine <gilles@ti.com>
2011-09-30 10:46:12 -07:00
Andreas Huber
3e408f39ef Support AMR, G.711 and vorbis audio in ACodec and friends.
Change-Id: I08c03219bf2d60fc5c6e89957bd4b4c615570983
2011-09-28 12:37:36 -07:00
Andreas Huber
928baf1f54 Propagate error signalled by the source all the way to the output EOS notification.
Change-Id: I30e959a6d669f09745c59fbdebee08f869511cf7
related-to-bug: 5372901
2011-09-26 10:53:29 -07:00
James Dong
07b9ae3312 Add QVGA resolution to CamcorderProfile
Change-Id: Icebbafb68d8164370f98a2c36699845d10ef081b
related-to-bug: 5145483
2011-09-19 19:32:26 -07:00
James Dong
1318864fa7 Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications" 2011-09-14 17:42:22 -07:00
Eric Laurent
3f0c821740 Merge "Issue 5298399: Lost speech after a crash in gTalk." 2011-09-13 17:50:31 -07:00
Eric Laurent
7e8626fd75 Issue 5298399: Lost speech after a crash in gTalk.
Fixed problem in AudioTrack::restoreTrack_l() causing a permanent
failure if the IAudioTrack interface to AudioFlinger could not be
restored at the first attempt.

Change-Id: I039d4fe2dca8d3baf71f1a6c51119f27a67b6611
2011-09-13 17:33:29 -07:00
James Dong
0209da1cb1 Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications
Change-Id: I522a994981d86329ccc86c3b536b561dc6e40eeb
related-to-bug: 5300618
2011-09-13 11:00:17 -07:00
Andreas Huber
d41108c91f Turn an another assertion into a runtime error in ACodec's implementation
Change-Id: I6779b29f200b90d088273ab3204724ef3d8d59bd
related-to-bug: 5284760
2011-09-12 14:14:08 -07:00
Guang Zhu
973f553be4 Make MediaScanner skip certain directories
The list of directories to skip are configurable via setprop.
The main motivation is that some test data folder takes long time
to scan, and media scanner may compete for CPU time against perf
tests therefore skewing the results.

Bug: 5263115
Change-Id: I568213e2a4babf6033021c1d336ef0347c0e3315
2011-09-09 15:36:42 -07:00
Dave Burke
fc301b0bb5 Require INTERNET permission for network-based content.
Bug #1870981

Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
2011-09-02 11:26:59 +01:00
Pannag Sanketi
abf82f9ea4 Merge "Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource" 2011-08-31 22:00:35 -07:00
Pannag Sanketi
ffd056fc73 Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource
The buffers in SurfaceMediaSource were 4 earlier, whereas
we need 5 for one of the devices.

Change-Id: I87bf5e28bbb0f7c9661dc01b040baa903d95d2c2
2011-08-31 17:43:24 -07:00
Eino-Ville Talvala
b2c4f0bf11 Merge "Fix SurfaceMediaSource timestamp handling." 2011-08-31 13:41:06 -07:00
Eric Laurent
0e35c78d25 Merge "226483: A2DP connected, but music out to speaker" 2011-08-30 10:51:54 -07:00
Eino-Ville Talvala
728e08bc3f Fix SurfaceMediaSource timestamp handling.
Was not basing timestamps on startTimeUs.
Now synchronizes properly with audio.

Bug: 4510826
Change-Id: I613db0aa91e51fc75d120e65540e742d8ab2ae43
2011-08-30 10:49:15 -07:00
Eric Laurent
05ce094164 226483: A2DP connected, but music out to speaker
When the A2DP headset is connected, there is a possible
race condition when the audio tracks are moved from
the mixer thread attached to the speaker output to the thread
attached to A2DP output.
As the request to clear the stream type to output mapping cache in
the client process is asynchronous, it is possible that the flag
indicating to the client audio track to re-create the IAudioTrack
on the new thread is processed before the cache is invalidated.
In this case, the track will be attached to the old thread and
music will continue playing over the device speaker instead of being
redirected to A2DP headset.

Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
2011-08-30 10:19:38 -07:00
Pannag Sanketi
b8a9e15c2a Merge "Modify enum value of OMX_COLOR_FormatAndroidOpaque" 2011-08-26 20:05:58 -07:00
Pannag Sanketi
4da5660eee Modify enum value of OMX_COLOR_FormatAndroidOpaque
The enum value chosen earlier had a conflict with one of the vendors.

Change-Id: I47832dd1157447f89324d56e8ab146260cd7927c
2011-08-26 19:38:13 -07:00
Andreas Huber
539340fe2c Merge "Support for posting messages and synchronously waiting for a response." 2011-08-26 13:47:26 -07:00
Jean-Michel Trivi
22cb204cbb Bug 4364249 Play position is 0 after flushing AudioTrack
AudioTrack::stop() is not synchronous, so a stop() followed
 by flush(), which is synchronous, will not always report
 a playhead position of 0 after being called.
This CL adds a flag to mark a track as flushed, and report the
 correct playhead position in this state.
Bug 5217011 has been created to address the real issue in the
 future, where flush could be made synchronous, to properly
 address bug 4364249.

Change-Id: Icf989d41a6bcd5985bb87764c287f3edb7e26d12
2011-08-25 17:33:49 -07:00
Andreas Huber
e688257456 Support for posting messages and synchronously waiting for a response.
Change-Id: Id6c7a08c34fd5cb6c4632f78ece9e7898b29e52c
2011-08-25 16:28:18 -07:00
Pannag Sanketi
557b7092cc Testing the GL/ CPU encoding w/ Gralloc buffers
This is the test for Gralloc buffers based encoding.
contains a combination of two main changes:

1. GL based encoding tests added to SurfaceMediaSource_test

2. SurfaceMediaSource ::read() colorformat

The SurfaceMediaSource::getformat() sets it to OMX_COLOR_FormatAndroidOpaque.
The omx encoder needs to interpret that colorformat and reads the format
from the Gralloc buffers directly

Change-Id: Iee2fe8901384109a4952e1d6c528c59eb01eb5b1
2011-08-24 13:57:46 -07:00
Rajneesh Chowdury
3ced044154 Fix for 4142219 Don't hard code platform-specific limitations (Jni/ Java)
Also fixes 5118207 add other video codec support for video editor export.

Change-Id: If72427173bd8ff684af07ba00f4425c1deef29c6
2011-08-19 14:34:47 -07:00
Andreas Huber
d84fd7927e Error handling in ACodec and Nuplayer.
Codec errors (and codec not found errors) now trigger a controlled shutdown
of playback and signal errors to the MediaPlayer client.

Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
2011-08-16 13:48:44 -07:00
Eric Laurent
6752ec80b2 Audio effects: track CPU and memory use separately
Before this change, CPU and memory usage for an audio effect were
registered and checked against the limit by audio policy manager
upon effect instantiation. Even if an effect was not enabled
it would prevent another effect to be created if the CPU load budget
was exceeded, which was too restrictive.

This change adds a method to register/unregister CPU load only when
an effect is enabled or disabled.
It also adds a mechanism to place all effects on the global output mix
in suspend state (disabled) when an effect is enabled on a specific session.
This will allow applications using session effects to have the priority
over others using global effects.

Also fixes some issues with suspend/restore mechanism:
- avoid taking actions when an effect is disconnected and was not enabled.
- do not remove a session from the suspended sessions list when corresponding
effect chain is destroyed.

Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
2011-08-11 14:33:45 -07:00
Andreas Huber
422e3f7496 Revert "Notify the OMX component that it's going to be used in "secure" mode."
This reverts commit 7616178271e95f009452a21ea45e7225997dc27a.
2011-08-10 12:45:24 -07:00
Mathias Agopian
f6d08b9528 Merge changes Ie06e73e5,I7ac6b5b0
* changes:
  free all buffers when ANativeWindow::disconnect is called
  return correct value from query after connecting a surface
2011-08-09 15:23:19 -07:00
Marco Nelissen
c74b93fdf3 Keep effects sessions active when the caller dies.
Don't remove effects until the session they are in goes away or all
AudioEffects have been explicitly released. This allows the control
panel process to die without stopping the effects.

Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
2011-08-09 10:21:10 -07:00
Mathias Agopian
053b02df2d return correct value from query after connecting a surface
the first time a surface was connected, the values returned
by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
to queueBuffer was performed.

Bug: 5137366, 5121607
Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
2011-08-08 20:25:44 -07:00
Andreas Huber
7616178271 Notify the OMX component that it's going to be used in "secure" mode.
Change-Id: Id87c4b295eb38f7d24045918e73df298d7b842f9
related-to-bug: 5137212
2011-08-08 15:28:21 -07:00
Andreas Huber
e38a2cba16 Eliminate superfluous memcpys by wrapping an ABuffer in a MediaBuffer
Change-Id: I1313f117cd7cdfaf7d6ec25413a0b4b8ea495037
related-to-bug: 5122973
2011-08-04 15:05:17 -07:00
Glenn Kasten
6ff9b812ab Bug 4599730 Get audio channel count on MediaPlayer
Related changes:
 - Fix bug in get/setParameter* to recycle Parcels when done with them.

Change-Id: Iaff05e91bbd99a14fccb79d816dd873359b6ae65
2011-07-27 10:21:09 -07:00
Pannag Sanketi
19f773bc96 Merge "Adding Metadata mode to SurfaceMediaSource" 2011-07-25 15:00:16 -07:00
Eric Laurent
234cef8129 Merge "Added APIs for audio preprocessing" 2011-07-25 14:43:05 -07:00
Eric Laurent
0f7f4ece1b Added APIs for audio preprocessing
Added APIs to control pre processes applied on captured audio.
Those APIs are still hidden until reviewed by API council.

Three types of standard pre processes are supported:
- Automatic Gain Control (AGC) by AutomaticGainControl class
- Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class
- Noise Suppression (NS) by NoiseSuppressor class

A method is added to AudioEffect class to query audio pre processings
applied by default by the platform on a given AudioRecord session ID.

Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
2011-07-25 14:39:00 -07:00
James Dong
fb52651305 Merge "Do not support still image capture mode for timelapse video recording" 2011-07-25 14:21:14 -07:00
James Dong
e432a00051 Merge "Do not wait forever for output buffers in OMXCodec.cpp and error out in case time out happens" 2011-07-24 14:40:08 -07:00
Jean-Michel Trivi
d40e2c67ed Merge "QueryCodecs() signature change" 2011-07-24 12:59:35 -07:00
James Dong
83dd43f45a Do not support still image capture mode for timelapse video recording
related-to-bug: 4973779

Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
2011-07-24 10:33:54 -07:00
Pannag Sanketi
b1f8c266e4 Adding Metadata mode to SurfaceMediaSource
SurfaceMediaSource operates in metadata mode only, i.e. just the
metadata is stored in videobuffers. SurfaceMediaSource passes the Gralloc
buffer handle along with a 4 byte 'type' (indicating that the metadata
is of type GrallocSource) to the encoder as opposed to the
GrallocBuffer itself.

Related to bug id: 4529323

Change-Id: I83aebc0dd10f317658cdf70be5802dfc35a1e72d
2011-07-22 19:33:55 -07:00
Pannag Sanketi
65cdc2b7b6 Merge "Connect MediaRecorder Native to SurfaceMediaSource" 2011-07-22 16:42:41 -07:00
Jean-Michel Trivi
a05f099301 QueryCodecs() signature change
Restore QueryCodecs() signature exactly as used by third-party libs.
Add an alternative function to select HW only codecs.

Change-Id: Ibb2cb4dd36fc0c6599eb93aa5751c216397e3b6f
2011-07-22 14:51:51 -07:00
Jamie Gennis
5ef59bc764 SurfaceTexture: add the abandon method.
This change adds the 'abandon' method to the SurfaceTexture C++ class.
This method may be used to put the SurfaceTexture in an abandoned state,
causing all ISurfaceTexture methods to fail.

Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
2011-07-22 14:20:41 -07:00
Pannag Sanketi
897e27bc75 Connect MediaRecorder Native to SurfaceMediaSource
Making a connection from MediaRecorder Native layer to the
SurfaceMediaSource for the purpose of encoding GL Frames. This will be
called from the java side inside the Mobile Filter Framework.

The mediarecorder native layer (client), when set the videosource to
option VIDEO_SOURCE_FRAMES, asks the StageFrightRecorder on the mediaserver
side to create a SurfaceMediaSource object and pass it back as a
sp<ISurfaceTexture> object. Using that, the client side will dequeue and
queue buffers. Connecting the GL Frames to the obtained
sp<ISurfaceTexture> is not part of this CL.

Related to bug id: 4529323

Change-Id: I651bec718dd5b935779e7d7a050b841c2d0b0fcd
2011-07-22 14:17:25 -07:00
Jamie Gennis
e333d3c824 SurfaceMediaSource: remove getAllocator method
This change removes the getAllocator method from SurfaceMediaSource
because that method is no longer a part of the ISurfaceTexture
interface.

Change-Id: I0e2f0bc3bc1c8cd3c1b4b14246f07b9b4e3066c3
2011-07-22 14:02:09 -07:00
Pannag Sanketi
38eea1b800 Merge "Renaming SurfaceEncoder to SurfaceMediaSource" 2011-07-22 11:49:36 -07:00
Pannag Sanketi
67d7704bd2 Merge "Adding SurfaceEncoder for encoding FilterFrames" 2011-07-22 11:49:21 -07:00
Andreas Huber
178e8eb5dd Retry datasource fetches a few times before giving up (NuCachedSource2).
Change-Id: I147fc18ef55bc89d2e2fee69b7869c45abbfdd6b
related-to-bug: 3405354
2011-07-22 08:17:41 -07:00
Pannag Sanketi
f48987db67 Renaming SurfaceEncoder to SurfaceMediaSource
Related to bug id: 4529323

Change-Id: Id820d45a536bd2c65e0a59def564eb5b3ea4a71c
2011-07-21 17:12:50 -07:00