diff options
author | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> | 2013-03-25 16:54:37 +0000 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2013-06-27 17:16:24 -0700 |
commit | ad3af3305f024bcbbd55c894a4995e449498e1ba (patch) | |
tree | 2e242d4c49cce9faefc28665c6ee63a2a5da170c /include/media/IAudioFlinger.h | |
parent | 7919fa2c33b1fa7f5e49b2188d671bfe519c231e (diff) | |
download | frameworks_av-ad3af3305f024bcbbd55c894a4995e449498e1ba.zip frameworks_av-ad3af3305f024bcbbd55c894a4995e449498e1ba.tar.gz frameworks_av-ad3af3305f024bcbbd55c894a4995e449498e1ba.tar.bz2 |
Public API changes for audio offload support.
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>
Diffstat (limited to 'include/media/IAudioFlinger.h')
-rw-r--r-- | include/media/IAudioFlinger.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index 9c3067e..f8a9f2b 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -49,6 +49,7 @@ public: TRACK_DEFAULT = 0, // client requests a default AudioTrack TRACK_TIMED = 1, // client requests a TimedAudioTrack TRACK_FAST = 2, // client requests a fast AudioTrack or AudioRecord + TRACK_OFFLOAD = 4, // client requests offload to hw codec }; typedef uint32_t track_flags_t; @@ -137,7 +138,8 @@ public: audio_format_t *pFormat, audio_channel_mask_t *pChannelMask, uint32_t *pLatencyMs, - audio_output_flags_t flags) = 0; + audio_output_flags_t flags, + const audio_offload_info_t *offloadInfo = NULL) = 0; virtual audio_io_handle_t openDuplicateOutput(audio_io_handle_t output1, audio_io_handle_t output2) = 0; virtual status_t closeOutput(audio_io_handle_t output) = 0; |