2013 Commits

Author SHA1 Message Date
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
Wu-cheng Li
4c2292efbb Add camera face detection API.
API are still hidden.

bug:4460717
Change-Id: I1a515061f141a89bd61c875257712789fb15d2d4
2011-07-27 05:25:35 +08:00
Mathias Agopian
686200cb5f Merge "remove dead code and member variables." 2011-07-26 12:08:07 -07:00
Mathias Agopian
f3503c2c30 remove dead code and member variables.
also fix some comments and improve debugging logs.

Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
2011-07-25 20:03:43 -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
Jamie Gennis
d50aef50f6 Merge "SurfaceTexture: enable RGB external textures" 2011-07-25 11:46:51 -07:00
Ted Bonkenburg
5518dd92d3 Merge "Add support for creating a Surface from a a SurfaceTexture." 2011-07-25 10:24:30 -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
Ted Bonkenburg
0de171b0d4 Add support for creating a Surface from a a SurfaceTexture.
The Surface is already using SurfaceTexture internally and it is parcelable. This
is intended to replace and phase out ParcelSurfaceTexture in favor of creating a
new Surface.java object from an existing SurfaceTexture.

Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
2011-07-22 16:36:44 -07:00
Jamie Gennis
ecfa1d3a79 SurfaceTexture: enable RGB external textures
This change removes support for conditionally using the GL_TEXTURE_2D
target for SurfaceTexture textures with RGB buffers.  It also enables
and fixes the RGB-based SurfaceTexture tests.

Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
2011-07-22 15:45:18 -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
Jamie Gennis
95b4042285 Merge changes I799532f7,I5cffa6eb
* changes:
  SurfaceTexture: fix a comment
  SurfaceTexture: remove getAllocator
2011-07-22 13:34:57 -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
Pannag Sanketi
26a197120c Adding SurfaceEncoder for encoding FilterFrames
Adding SurfaceEncoder which can be used to encode
custom frame data. In a sense, it is reverse
of what SurfaceTexture does.

SurfaceEncoder takes in frames from a native window and
passes them to an encoder, thus acting like a MediaSource.
It uses GRAlloc buffers underneath for passing data.
The client side sets the geometry, format in the beginning,
which cannot be changed while the recording is going on.

Currently, there is no common pixel format that both
GRAlloc and HAL understand.
Also, the encoder cannot encode using the data from the GRAlloc
buffers.

The SurfaceEncoder_test examines mainly the buffer passage
since true encoding cannot be done at this point.
SimpleDummyRecorder 'reads' the frames in the same thread
as the start(), whereas DummyRecorder 'reads' in a separate
thread much like the MPEG4Writer. The test with DummyRecorder
is much closer to the real encoding implementation.

Related to bug id: 4529323

Change-Id: I58ec19a150f8fe4d6195196dc44f55002b46c7c8
2011-07-21 17:12:50 -07:00
Pannag Sanketi
348c45bd96 Adding AndoirdOpaque Colorformat to OMX
Adding an enum to indicate an android opaque OMX
colorformat. This will inform the encoder that
the actual colorformat will be relayed by the
Frames read from the GRAlloc Buffers

Related to bug id: 4529323

Change-Id: Iddc5bd1ce8ca2b2506a57aadf5fc91ff0c7b78ef
2011-07-21 17:12:49 -07:00
Jamie Gennis
075db95875 SurfaceTexture: fix a comment
Change-Id: I799532f77f8fbb6b8ee6888fdd8852b6f28e8c33
2011-07-21 14:32:56 -07:00
Jamie Gennis
5c23a2c72d SurfaceTexture: remove getAllocator
This change removes the SurfaceTexture::getAllocator method, as it's no
longer needed.  Proper refcounting of the Gralloc buffers is now handled
by the IGraphicBufferAlloc binder marshalling code.

Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
2011-07-21 14:32:56 -07:00
Hong Teng
432fb8ecbe Merge "fix for issue 4142219 Don't hard code platform-specific limitations-jni/java part" 2011-07-21 11:13:43 -07:00
Mathias Agopian
f5a4dd386f Merge "clean-up. get rid ofunused code and members in Surface[Control].cpp" 2011-07-20 18:52:51 -07:00
Jeff Brown
5da67f4f69 Merge "Untangle MediaScanner error handling. Bug: 5056917" 2011-07-20 18:03:47 -07:00
Eric Laurent
ae7c092649 Merge "Audio framework: support for audio pre processing" 2011-07-20 17:45:37 -07:00
Jeff Brown
2c70d4a372 Untangle MediaScanner error handling.
Bug: 5056917

Change-Id: I1a7a73579e3ba4e9709459329fc1901a28b0f4b1
2011-07-20 17:33:13 -07:00
Mathias Agopian
50c24a2000 clean-up. get rid ofunused code and members in Surface[Control].cpp
Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
2011-07-20 16:53:13 -07:00
Hong Teng
600acf14ff fix for issue 4142219
Don't hard code platform-specific limitations-jni/java part

Change-Id: Icde261b1caf29a8cf552884c97f3c9d0b41741a3
2011-07-20 16:51:39 -07:00
Jeff Brown
ac386073df Remove unimplemented memory pool.
dlmalloc does such a great job that we don't need a pool anyways.

Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
2011-07-20 15:19:50 -07:00
Mathias Agopian
f07b8a3f69 implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation"
Bug: 4487161
Change-Id: I883f34efe542c2a566d04966f873374f40c50092
2011-07-19 15:24:46 -07:00
Mathias Agopian
09d7ed7b39 Add set_scaling_mode() to ANativeWindow.
This allows to specify the scaling mode independently from
the buffer size.

Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
2011-07-19 13:05:11 -07:00
Jamie Gennis
5a4ab16eba Merge "MediaPlayer: add ANativeWindow (dis)connect calls" 2011-07-18 15:18:43 -07:00
Mathias Agopian
10e6f34a67 Merge "move lock/unlock implementaion outside of Surface into SurfaceTextureClient" 2011-07-18 14:55:58 -07:00
Jean-Michel Trivi
211f5af3bb Merge "Add option to query hardware decoders only" 2011-07-18 11:07:47 -07:00
Jean-Michel Trivi
56a37b0529 Add option to query hardware decoders only
Add an option to OMXCodec::QueryCodecs() to filter out
 software codecs.

Update stagefright command line tool to list the roles of codecs.

Change-Id: Icddb79118c30fe13cc3aea20f340174cc082c4e0
2011-07-18 10:57:50 -07:00
Eric Laurent
464d5b3da2 Audio framework: support for audio pre processing
Audio effect framework is extended to suport effects on
output and input audio path.

AudioFlinger: Support for audio effects and effect chains is
moved from PlaybackThread class to ThreadBase class so that
RecordThread can manage effects.
Effects of type pre processing are allowed on record thread
only. When a pre processing is enabled, the effect interface handle is
passed down to the input stream so that the audio HAL can call the
process function. The record thread loop calls the effect chain process
function that will only manage the effect state and commands and skip the
process function.

AudioRecord: The audio session is allocated before calling getInput() into
audio policy serice so that the session is known before the input theead is
created and pre processings can be created on the correct session.

AudioPolicyService: default pre processing for a given input source are
loaded from audio_effects.conf file.
When an input is created, corresponding effects are created and enabled.

Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
2011-07-18 09:42:57 -07:00
Mathias Agopian
949be32b67 move lock/unlock implementaion outside of Surface into SurfaceTextureClient
This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work
with ANativeWindows implemented by Surface and SurfaceTextureClient.

Also, Surface now inherits directly from SurfaceTextureClient.

Bug: 5003724
Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
2011-07-15 17:47:08 -07:00
Glenn Kasten
7e7de71f6e Merge "CPU statistics library" 2011-07-15 16:24:26 -07:00
James Dong
d9ac621f59 Do not wait forever for output buffers in OMXCodec.cpp and error out in case time out happens
o Deal with vendor codec hang bug

Change-Id: Ic8449afd43045f09a9e0bd3d1be9a320e59ccabe
2011-07-15 15:32:21 -07:00
Glenn Kasten
131515b681 CPU statistics library
Change-Id: I113e2a926466cc410cfa5602ceb165b390a290fc
2011-07-15 14:09:49 -07:00
Jamie Gennis
06b54d7184 Merge changes Id9aa1003,I8c154189
* changes:
  SurfaceTexture: make (dis)connect into an IPC
  SurfaceTexture: add support for new connect values
2011-07-14 17:54:27 -07:00