| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I122a7cf7bfc162090cb27f37c325db7a23985bc7
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a regression that was introduced earlier
by commit 9f80dd223d83d9bb9077fb6baee056cee4eaf7e5
called "New control block for AudioTrack and AudioRecord".
That commit broke underrun reporting for fast tracks.
Also remove Track::mUnderrunCount, which counted the number of underrun
events, and was only used by dumpsys media.audio_flinger.
Now dumpsys media.audio_flinger reports the number of underrun frames,
Isolated underrun-related control block accesses via the proxy, so that
the server is not directly poking around in the control block.
The new proxy APIs are AudioTrackServerProxy::getUnderrunFrames() and
AudioTrackServerProxy::tallyUnderrunFrames(). getUnderrunFrames() returns
a rolling counter for streaming tracks, or zero for static buffer tracks
which never underrun, but do a kind of 'pause' at end of buffer.
tallyUnderrunFrames() increments the counter by a specified number of frames.
Change-Id: Ib31fd73eb17cbb23888ce3af8ff29f471f5bd5a2
|
|/
|
|
|
|
|
| |
upon the death of an ALooper.
Change-Id: I64c0835b8db04486204f3d0fa7173ee53708a116
related-to-bug: 10106648
|
|
|
|
| |
Change-Id: I22ad4ba8777842bf6705e79c6ad796fdb9a4104c
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I7b6d31e24531954ab1ecdf3ed56c19433700bd89
|
|
|
|
| |
Change-Id: Ieabd91acee92d0e84e66fbd358df5282b856306e
|
|
|
|
| |
Change-Id: Ide608ef452d57da29b708180d90470361c123d1d
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Former name 'channels' was ambiguous with respect to channel count.
Change-Id: I716f792d95a7e0c787d27514ad6e93dbcef8a415
|
| |
| |
| |
| | |
Change-Id: I5f624b7a51ffe1a17a67c056cf984f74e4c56eac
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
Also fixed some logging typo
Change-Id: Ib254bdb137dca10b12595c23aeb1c53097423425
|
|
|
|
|
| |
Bug: 9798886
Change-Id: I9321e3f369f1ed9429ae222e3926ebdeb012b8b0
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| | |
i.e. feed no more input frames to the encoder while suspended.
Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: Ifbf3a46a4183c8abc0feee1c588953ab10303cc1
|
| |
| |
| |
| |
| | |
Bug: 9529161
Change-Id: I927e39c124cd5fb19e38423506f4463acc381cb0
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
OK to lose history
Change-Id: Ieca78edc5dfe479dd7ea48fe7e0f3c164356cee3
|
| |/
|/|
| |
| |
| |
| |
| | |
Remove old includes.
Header files only include other header files that they directly need themselves.
Change-Id: Ic471386808d9f42ea19ccbd59cb50a5f83a89dd0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | |
| | |
| | |
| | | |
* changes:
Make android.hardware.photography.Camera work on HAL3+ devices
Initial implementation of android.hardware.photography.CameraDevice (service)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
|/
|
|
|
|
| |
Change-Id: Id360f29236798163f9f3a82135f601083a8a5058
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 7093648
|
|
|
|
|
| |
Bug: 9423855
Change-Id: I78ba8228c60dff11fb466156bb632c5dda45cdaf
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| | |
nativewindow crop" into jb-mr2-dev
* commit 'f8af99b7c10f1441d9a52676724b168f20752270':
stagefright: synchronously change nativewindow crop
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Done:
* ICameraService
* ICameraServiceListener
Partial:
* ICamera (disconnect only)
* IProCameraUser (disconnect only)
Bug: 9213377
Change-Id: I8e2e6e05cfd02ec36be1d5b2c551f10ffb43b5b4
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
playback inside stagefright.
* commit 'f9bb8358e454be6dc88403171db7e0e182407f17':
Update HTTP proxy configuration for all media playback inside stagefright.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ie0dd00045aba668d8b49da73224e7a7c9c04f69b
related-to-bug: 8873723
(cherry picked from commit 2704965b8a1ff3b7450ff58ccecf86d8ec688c40)
|
|\ \ \
| |/ /
| | /
| |/
|/|
| |
| | |
into jb-mr2-dev
* commit '1cd68527a6c4cc92608dfe8a8c6ba51e5e2c4fc2':
MediaMuxer: Remove SAMPLE_FLAG_SYNC flag
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ |
|