summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* IOMX: add updateGraphicBufferInMeta method for metadata modeLajos Molnar2013-08-061-0/+4
| | | | | | | | | This is used to set the handle in the metadata buffer that is valid in the mediaserver process, as well as to keep a reference for the graphic buffers in BufferMeta. Change-Id: I46bb68d8bed894f357eeeb25368360d11b276634 Signed-off-by: Lajos Molnar <lajos@google.com>
* Remove default channel mask in AudioRecord constructor and set()Glenn Kasten2013-07-301-8/+8
| | | | Change-Id: I22ad4ba8777842bf6705e79c6ad796fdb9a4104c
* Camera: Rename new API to camera2, rearrange camera serviceEino-Ville Talvala2013-07-303-0/+0
| | | | | | | | | | | - Support API rename from photography to camera2 - Reorganize camera service files - API support files to api1/, api2/, api_pro/ - HAL device support files into device{1,2,3}/ - Common files into common/ - Camera service remains at top-level Change-Id: Ie474c12536f543832fba0a2dc936ac4fd39fe6a9
* Move control block mName to createTrack() outputGlenn Kasten2013-07-303-3/+6
| | | | | | | This is part of a series of CLs to clean up the shared memory control block, by removing any fields that don't have to be there. Change-Id: I6e51003a1293b6800258c31b22cff2eba42162e7
* Rename control block flags to mFlagsGlenn Kasten2013-07-301-1/+2
| | | | Change-Id: I7b6d31e24531954ab1ecdf3ed56c19433700bd89
* Rename control block server to mServer and add commentsGlenn Kasten2013-07-301-3/+6
| | | | Change-Id: Ieabd91acee92d0e84e66fbd358df5282b856306e
* Use correct type for OutputDescriptor::formatGlenn Kasten2013-07-301-1/+1
| | | | Change-Id: Ide608ef452d57da29b708180d90470361c123d1d
* Merge "Use standard name and type for channel mask"Glenn Kasten2013-07-291-2/+2
|\
| * Use standard name and type for channel maskGlenn Kasten2013-07-241-2/+2
| | | | | | | | | | | | Former name 'channels' was ambiguous with respect to channel count. Change-Id: I716f792d95a7e0c787d27514ad6e93dbcef8a415
* | Declare methods in binder opcode orderGlenn Kasten2013-07-291-3/+3
| | | | | | | | Change-Id: I5f624b7a51ffe1a17a67c056cf984f74e4c56eac
* | stagefright: offload playback supportRichard Fitzgerald2013-07-261-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offloading of compressed audio decoding to audio DSP is implemented for audio only, non streamed content. when the datasource is AudioPlayer: - Create an offloaded sink when playing a compressed source - Send metadata to audio HAL - Return sink start error to AwesomePlayer so that a new player for PCM audio can be created in case of problem. - Forward stream end and tear down callback events to AwesomePlayer - Stop the sink and wait for stream end callback when EOS is reached. - Pause and restart the sink if needed before flushing when seeking (otherwise flush is a no op). - For current media time, directly query the render position from the sink and offset by the start position (seek to time) AwesomePlayer: - When initializing the audio decoder, check with audio policy manager if offloading is supported. If yes, create the software decoder in case a reconfiguration is needed but connect the audio track directly to the AudioPlayer. - In case of error when starting the AudioPlayer, reconnect the software decoder (OMXSource) and recreate a PCM AudioPlayer. - Handle AudioPlayer tear down event by detroying and recreating the AudioPlayer to allow transitions between situations were offloading is supported or not. - Force tear down of offloaded AudioPlayer when paused for a certain time: This will close the sink and allow the DSP to power down. Utils: - Added helper methods: - send meta data to audio ia sink setParameters - query audio policy manager if offloading is supported for a given audio content Change-Id: I115842ce424f947b966d45e253a74d3fd5df9aae Signed-off-by: Eric Laurent <elaurent@google.com>
* | libmediaplayerservice: offload playback supportRichard Fitzgerald2013-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change is to how recycled tracks are used for gapless playback. If we are playing offloaded tracks that can't be recycled we don't open a new offloaded output until we have closed the previous one. This is because offloaded tracks are a limited resource so we don't want to spuriously create unnecessary instances. If the tracks cannot be recycled this means that the formats are incompatible and so the hardware most likely will also be unable to use the existing output channel for the new track. If we already have the maximum number of hardware offload channels open (which could be only one) then creation of the next output would fail if we attempted it while the previous output was still open. Change-Id: I4f5958074e7ffd2e17108157fee86329506730ea Signed-off-by: Eric Laurent <elaurent@google.com>
* | libmedia: offloaded playback supportRichard Fitzgerald2013-07-252-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - start() returns a status so that upper layers can recreate a non offloaded track in case of error. - Added states to handle offloaded tracks specific: - waiting for stream end (drain) notification by audio flinger - allow pause while waiting for stream end notification - getPosition() queries the render position directly from audio HAL. - disable APIs not applicable to offloaded tracks - Modified track restoring behavior for invalidated offloaded tracks: just send the callback and wait for upper layers to create a new track. - Added wait for stream end management in audio track client proxy. Similar to obtainBuffer and should be factored in. Change-Id: I0fc48117946364cb255afd653195498891f622bd Signed-off-by: Eric Laurent <elaurent@google.com>
* | AudioFlinger: offload playback, non-blocking writeEric Laurent2013-07-251-0/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | - Added specialized playback thread class for offload playback, derived from directoutput thread. This thread type handles specific state transitions for offloaded tracks and offloading commands (pause/resume/drain/flush..) to audio HAL. As opposed to other threads, does not go to standby if the track is paused. - Added support for asynchronous write and drain operations at audio HAL. Use a thread to handle async callback events from HAL: this avoids locking playback thread mutex when executing the callback and cause deadlocks when calling audio HAL functions with the playback thread mutex locked. - Better accouting for track activity: call start/stop and release Output methods in audio policy manager when tracks are actually added and removed from the active tracks list. Added a command thread in audio policy service to handle stop/release commands asynchronously and avoid deadlocks with playback thread. - Track terminated status is not a state anymore. This condition is othogonal to state to permitted state transitions while terminated. Change-Id: Id157f4b3277620568d8eace7535d9186602564de
* camera2: Implement ICameraDeviceUser::waitUntilIdleZhijun He2013-07-231-0/+2
| | | | | | Also fixed some logging typo Change-Id: Ib254bdb137dca10b12595c23aeb1c53097423425
* Use AudioSystem::setLowRamDevice() to configure memoryGlenn Kasten2013-07-192-0/+6
| | | | | Bug: 9798886 Change-Id: I9321e3f369f1ed9429ae222e3926ebdeb012b8b0
* ANetworkSession and ParsedMessage are now part of stagefright foundation.Andreas Huber2013-07-182-0/+195
| | | | | | | | Also fixes some bugs in ParseMessage and adds "WebSocket" mode to ANetworkSession, something that's opt-in and should not affect existing clients of the API. Change-Id: I86d5748e0d818231d85d3590d86c2b41d4f8b1f1
* Merge "Support "suspension" of a video encoder in "surface-input" mode."Andreas Huber2013-07-171-0/+10
|\
| * Support "suspension" of a video encoder in "surface-input" mode.Andreas Huber2013-07-171-0/+10
| | | | | | | | | | | | i.e. feed no more input frames to the encoder while suspended. Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
* | Merge "Add comments"Glenn Kasten2013-07-173-1/+15
|\ \ | |/ |/|
| * Add commentsGlenn Kasten2013-07-103-1/+15
| | | | | | | | Change-Id: Ifbf3a46a4183c8abc0feee1c588953ab10303cc1
* | camera2: Implement ICameraDeviceUser::getCameraInfoIgor Murashkin2013-07-151-3/+2
| | | | | | | | | | Bug: 9529161 Change-Id: I927e39c124cd5fb19e38423506f4463acc381cb0
* | Merge "AudioTrackShared cleanup"Glenn Kasten2013-07-111-2/+2
|\ \ | |/ |/|
| * AudioTrackShared cleanupGlenn Kasten2013-07-021-2/+2
| | | | | | | | | | | | | | | | Maintain unreleased frame count on client side also (was already there on server side). Assertion failure instead of BAD_VALUE status for incorrect usage of APIs. Clean up error handling code. Change-Id: I23ca2f6f8a7c18645309ee5d64fbc844429bcba8
* | Merge "mv libcpustats from frameworks/native to frameworks/av"Glenn Kasten2013-07-083-0/+221
|\ \
| * | mv libcpustats from frameworks/native to frameworks/avGlenn Kasten2013-06-183-0/+221
| | | | | | | | | | | | | | | | | | OK to lose history Change-Id: Ieca78edc5dfe479dd7ea48fe7e0f3c164356cee3
* | | Include what is neededGlenn Kasten2013-07-022-8/+6
| |/ |/| | | | | | | | | | | Remove old includes. Header files only include other header files that they directly need themselves. Change-Id: Ic471386808d9f42ea19ccbd59cb50a5f83a89dd0
* | Public API changes for audio offload support.Richard Fitzgerald2013-06-279-12/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: this does _not_ include all private member variables added to classes as part of offload support. Only public/protected functions and stubs functions/variables needed to make the changes buildable. - isOffloadSupported() added to audio policy service A stub implementation is required to build, this always returns false - setParameters() added to IAudioTrack A stub implementation is required to build, this always returns INVALID_OPERATION - CBlk flag for stream end - Change AudioSystem::getRenderPosition() to take an audio_output_t so caller can specify which output to query - Add AudioSystem::isOffloadSupported() This is fully implemented down to the AudioFlinger function AudioPolicyServer::isOffloadSupported() which is just a stub that always returns false. - Add EVENT_STREAM_END to AudioTrack interface. STREAM_END is used to signal when the hardware has actually finished playing all the data it was sent. - Add event type enumeration to media player interface AudioSink callbacks so that the same callback can be used to handle multiple types of event. For offloaded tracks we also have to handle STREAM_END and TEAR_DOWN events - Pass audio_offload_info_t to various functions used for opening outputs, tracks and audio players. This passes additional information about the compressed stream down to the HAL when using offload. For publicly-available APIs this is an optional parameter (for some of the internal and low-level APIs around the HAL interface it is mandatory) - Add getParameters() and setParameters() API to AudioTrack Currently dummy implementations. - Change AudioPlayer contructor so that it takes a set of bitflags defining what options are required. This replaces the original bool which only specified whether to use deep buffering. - Changes to StageFright class definition related to handling tearing-down of an offloaded track when we need to switch back to software decode - Define new StageFright utility functions used for offloaded tracks Currently dummy implementations. - AudioFlinger changes to use extended audio_config_t. Fills in audio_offload_info_t member if this info is passed in when opening an output. - libvideoeditor changes required to add the new event type parameter to AudioSink callback functions - libmediaplayerservice changes required to add the new event type parameter to AudioSink callback functions Change-Id: I3ab41138aa1083d81fe83b886a9b1021ec7320f1 Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Eric Laurent <elaurent@google.com>
* | Merge "Adds VP9 decoding support for stagefright."Lajos Molnar2013-06-251-1/+2
|\ \
| * | Adds VP9 decoding support for stagefright.hkuang2013-06-241-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Also change the VP8 encoder role name from video_encoder.vpx to video_encoder.vp8 for future VP9 encoder support. Requires the change in frameworks/native and media_codecs.xml corresponding to the device. VP9 decoding test will be added to cts repo later.
* | Merge "Use mFutex as an event flag rather than semaphore"Glenn Kasten2013-06-251-1/+2
|\ \
| * | Use mFutex as an event flag rather than semaphoreGlenn Kasten2013-06-241-1/+2
| |/ | | | | | | | | | | | | | | An event flag can be more fault-tolerant in case of loss of synchronization, as it cannot overflow. It also allows more bits to be used in the future. See http://en.wikipedia.org/wiki/Event_flag Change-Id: I01ca25d951eb263124da54bb4738f0d94ec4a48b
* | Merge changes I5b2eeab2,I71568560Igor Murashkin2013-06-255-0/+224
|\ \ | | | | | | | | | | | | | | | * changes: Make android.hardware.photography.Camera work on HAL3+ devices Initial implementation of android.hardware.photography.CameraDevice (service)
| * | Initial implementation of android.hardware.photography.CameraDevice (service)Igor Murashkin2013-06-205-0/+224
| |/ | | | | | | | | | | | | | | | | | | | | * Verified preview streaming requests * Other things *should* work but unverified / unimplemented in client side Missing: * CameraService needs to return static camera info metadata Bug: 9213377 Change-Id: I71568560fcf18d0e2b408ed1c4d0066647314868
* | stagefright: support for video decoder metadata modeLajos Molnar2013-06-211-0/+9
|/ | | | | | Change-Id: Id360f29236798163f9f3a82135f601083a8a5058 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 7093648
* AudioRecord must be used as sp<> onlyGlenn Kasten2013-06-132-2/+4
| | | | | Bug: 9423855 Change-Id: I78ba8228c60dff11fb466156bb632c5dda45cdaf
* New control block for AudioTrack and AudioRecordGlenn Kasten2013-06-124-294/+637
| | | | | | | | Main differences between old and new control block: - removes the mutex, which was a potential source of priority inversion - circular indices into shared buffer, which is now always a power-of-2 size Change-Id: I4e9b7fa99858b488ac98a441fa70e31dbba1b865
* am f8af99b7: am 0662f7b6: Merge "stagefright: synchronously change ↵Lajos Molnar2013-06-121-1/+1
|\ | | | | | | | | | | | | nativewindow crop" into jb-mr2-dev * commit 'f8af99b7c10f1441d9a52676724b168f20752270': stagefright: synchronously change nativewindow crop
| * stagefright: synchronously change nativewindow cropLajos Molnar2013-06-111-1/+1
| | | | | | | | | | | | | | | | | | Only change the nativewindow crop before queuing frames with the new crop. Change-Id: Icd8a84c82e66a8be3d6bc1675c777b1de8dc39b9 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 9395753
* | Merge "camera: Make some binder interfaces compatible with AIDL"Igor Murashkin2013-06-116-0/+18
|\ \
| * | camera: Make some binder interfaces compatible with AIDLIgor Murashkin2013-06-116-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done: * ICameraService * ICameraServiceListener Partial: * ICamera (disconnect only) * IProCameraUser (disconnect only) Bug: 9213377 Change-Id: I8e2e6e05cfd02ec36be1d5b2c551f10ffb43b5b4
* | | Use sp<AudioTrack> instead of raw AudioTrack *Glenn Kasten2013-06-035-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prepares for the new implementation of AudioTrack client, which will require clients to use only sp<AudioTrack>, not raw AudioTrack *. A raw delete will cause a race condition during AudioTrack destruction. AudioTrack was made a RefBase by commit b68a91a70bc8d0d18e7404e14443d4e4020b3635 on 2011/11/15, when it was needed by OpenSL ES (for the callback protector). At that time, the only other client that was also converted from AudioTrack * to sp<AudioTrack> was android.media.AudioTrack JNI in project frameworks/base (file android_media_AudioTrack.cpp). Details: * Use .clear() instead of delete followed by = NULL. * ALOG %p need .get(). * sp<> don't need to be listed in constructor initializer, if initially 0. * Use == 0 for sp<> vs == NULL for raw pointers. * Use if (sp != 0) instead of if (raw). Change-Id: Ic7cad25795d6e862e112abdc227b6d33afdfce17
* | | am f9bb8358: am b7319a7e: Update HTTP proxy configuration for all media ↵Andreas Huber2013-06-033-0/+11
|\ \ \ | | |/ | |/| | | | | | | | | | | | | playback inside stagefright. * commit 'f9bb8358e454be6dc88403171db7e0e182407f17': Update HTTP proxy configuration for all media playback inside stagefright.
| * | Update HTTP proxy configuration for all media playback inside stagefright.Andreas Huber2013-05-313-0/+11
| | | | | | | | | | | | | | | | | | Change-Id: Ie0dd00045aba668d8b49da73224e7a7c9c04f69b related-to-bug: 8873723 (cherry picked from commit 2704965b8a1ff3b7450ff58ccecf86d8ec688c40)
* | | am 1cd68527: am 41688da2: Merge "MediaMuxer: Remove SAMPLE_FLAG_SYNC flag" ↵Lajos Molnar2013-05-291-6/+0
|\ \ \ | |/ / | | / | |/ |/| | | | | into jb-mr2-dev * commit '1cd68527a6c4cc92608dfe8a8c6ba51e5e2c4fc2': MediaMuxer: Remove SAMPLE_FLAG_SYNC flag
| * MediaMuxer: Remove SAMPLE_FLAG_SYNC flagLajos Molnar2013-05-281-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | MediaMuxer.writeSampleData() uses MediaCodec.BufferInfo objects to specify the flags, so use directly the MediaCodec flags. This is more intuitive and avoids users of the MediaMuxer API having to create translations between MediaMuxer's and MediaCodec's flag constants. Change-Id: I18e12a6839ffb2c63da62516a4dc4c94e8bb3d17 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 9169479
| * Merge "Remove timing jitter during startup of audio" into jb-mr2-devEric Laurent2013-05-031-0/+1
| |\
| | * Remove timing jitter during startup of audioGlenn Kasten2013-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced recently, that increased timing jitter during the startup of the FastMixer and AudioTrack callback threads. The regression was to make requestPriority() asynchronous as a way to avoid an apparent priority inversion in system_server. This means that the target thread could run briefly with the initial priority, before the new priority takes effect. This change removes the startup jitter for FastMixer, by making the requestPriority() synchronous again for that case. It doesn't matter that this restores the priority inversion involving normal mixer thread, because it happens during startup of both threads. The change also removes the startup jitter for the AudioTrack callback thread, by having the target thread check whether the requestPriority() has completed yet. If not, the target thread blocks with a timeout until the priority boost finishes. Finally, we now log an error message if the expected priority boost doesn't happen. Bug: 8698989 Change-Id: Id590e9a274b70ec1ba85b44a585ee37a22e41cbc
| * | Support MediaCodec::getOutputFormat for encodersAndreas Huber2013-04-301-0/+4
| |/ | | | | | | | | | | | | codec specific data is provided as part of the MediaFormat if available. Change-Id: I5a79c936e2411fe66ebc694791071faefc33941e related-to-bug: 8616651
| * Merge "3rd time's the charm, right? Fix another instance where MediaCodec ↵Andreas Huber2013-04-221-0/+1
| |\ | | | | | | | | | would" into jb-mr2-dev