2358 Commits

Author SHA1 Message Date
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
Jamie Gennis
c85ca5d6b5 MediaPlayer: add ANativeWindow (dis)connect calls
This change makes MediaPlayer connect to the ANativeWindow to which it
is going to render video frames and disconnect when it is done.

Change-Id: I88ab5c2fe62493aabdc84a283ff31634f795d415
2011-07-14 17:48:33 -07:00
Jamie Gennis
9709687463 SurfaceTexture: make (dis)connect into an IPC
This change makes the ANativeWindow connect and disconnect calls result
in an IPC to the SurfaceTexture object.  This will allow us to prevent
multiple simultaneous connections from different processes.

Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
2011-07-14 17:48:32 -07:00
James Dong
ad07457ece Merge "Support profile and level query for SW video decoders" 2011-07-14 09:59:24 -07:00
Andreas Huber
1a54107562 Merge "Remove legacy http support from stagefright, chromium is the new hotness." 2011-07-14 09:09:07 -07:00
Mike Lockwood
c1b9bbb21c Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build
Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-13 19:45:44 -04:00
Andreas Huber
c3119330a5 Remove legacy http support from stagefright, chromium is the new hotness.
Change-Id: I6725d42d38b91e6a1cbca43174870f445aeb3d99
2011-07-13 15:45:01 -07:00
Andreas Huber
67d464f47e Enable signalling of a stream discontinuity involving a format-change
through IStreamListener.

Change-Id: Ic0409cdc4891ad26b61f2f98bdda3c7fb2e2de6a
related-to-bug: 5022434
2011-07-13 09:47:09 -07:00
James Dong
dcf8934f4e Make MetadataBufferType.h C-friendly
Change-Id: I4388d8f6cf30f08858aec73aa971647feae4a5e3
2011-07-12 09:35:40 -07:00
Jamie Gennis
308f9f6b24 Merge "EGL: fix the ANativeWindow size/fmt override" 2011-07-11 15:47:20 -07:00
Jeff Brown
501c4671e7 Merge "Eliminate single-process mode. Bug: 5010576" 2011-07-11 13:37:53 -07:00
James Dong
9b40a61ce9 Merge "Do not wait for unlaunched threads in stop()" 2011-07-11 12:56:11 -07:00
James Dong
0e27fce923 Do not wait for unlaunched threads in stop()
Change-Id: If681749753bb96ee98c1539658cfd919eeb0cb65
2011-07-11 12:51:21 -07:00
Jamie Gennis
97eae025ad EGL: fix the ANativeWindow size/fmt override
This change fixes how the Android EGL layer overrides the size and
format of an ANativeWindow in eglCreateWindowSurface.  The new behavior
is to leave the size untouched when overriding the format.  The previous
behavior was to reset the ANativeWindow to use the default size set by
the ANativeWindow implementation.

It also adds two new 'perform' methods to the ANativeWindow interface:
set_buffers_dimensions and set_buffers_format, and redefines the
behavior of set_buffers_geometry to be the combination of these two new
methods.

Additionally, this change adds an error check for the return value of
the new native_window_set_buffers_format call, which required adding a
(stub) handler for to FramebufferNativeWindow.

Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
2011-07-11 12:31:45 -07:00
James Dong
fbb170ca9c Support profile and level query for SW video decoders
Change-Id: I9c20db128be96cd36cf2083e08e8c21f5e6d1fdf
2011-07-11 12:29:10 -07:00
James Dong
8d19d3ae1e Release camera if CameraSource::start() has not been called
Change-Id: I2f7e4b8501db3d80b9aa6f99d896d778bec29e8c
2011-07-10 14:19:26 -07:00
Jeff Brown
10e8971286 Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
2011-07-08 19:54:07 -07:00
Glenn Kasten
33eafef1a9 Add C++ thread API androidGetThreadSchedulingGroup
This API is intended for applications that need to read a thread's
scheduling group, while using the higher-level (C++) family of thread APIs.

Change-Id: I5e58017f74c3989b20b5b1cc2bc4483c95720520
2011-07-08 10:11:08 -07:00
Eric Laurent
5cc0526339 Moved and renamed effect API header files
Moved specific effect header files to
system/media/audio_effects/include/audio_effects
and renamed to lower case (effect_xxx.h).

Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
2011-07-07 15:25:51 -07:00
Glenn Kasten
5161eb7b23 Merge "Add Thread::join" 2011-07-06 11:37:53 -07:00
Mathias Agopian
7eef784ea9 Merge "return an error code with gralloc buffer allocation failures" 2011-07-06 11:09:55 -07:00
Gloria Wang
2da9eb7175 Merge "- Retrieve is_drm in MediaMetadataRetriever. - Add one more column in MediaStore to indicate whether a media file is drm-protected. - Remove old DRM code from Ringtone - Use the new DRM code in RingtoneManager" 2011-07-06 09:22:05 -07:00
Glenn Kasten
4431c05f13 Merge "Thread ID zero for androidSetThreadSchedulingGroup" 2011-07-05 15:08:31 -07:00
Jeff Brown
6894a2947e Workaround apps that make assumptions about pointer ids.
Modified the touch input mapper to assign pointer ids sequentially
starting from 0 instead of using the tracking id or slot index
supplied by the driver.  Applications should not depend on this
ordering but some do.  (sigh)

Bug: 4980884
Change-Id: I0dfeb3ac27c57a7102a13c960c760e2a02eb7669
2011-07-01 19:08:15 -07:00
Gloria Wang
82428a862f - Retrieve is_drm in MediaMetadataRetriever.
- Add one more column in MediaStore to indicate whether a
  media file is drm-protected.
- Remove old DRM code from Ringtone
- Use the new DRM code in RingtoneManager

Change-Id: I1311fd1c04841c2cd47df6c901589966cf55a692
2011-07-01 16:52:28 -07:00
Mathias Agopian
eec0f7ebac return an error code with gralloc buffer allocation failures
Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
2011-07-01 14:53:49 -07:00
Andreas Huber
dfba1773c9 Merge "Charge network traffic to the uid of the process using the MediaPlayer." 2011-07-01 14:28:10 -07:00