History log of /frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
94ea60f975c3eb7ce6d2a4430538a42a5fc3babd 14-May-2013 Richard Fitzgerald <rf@opensource.wolfsonmicro.com> stagefright: offload playback support

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>
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
ad3af3305f024bcbbd55c894a4995e449498e1ba 25-Mar-2013 Richard Fitzgerald <rf@opensource.wolfsonmicro.com> 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>
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
2799d743ee2ae5a25fe869a7f9c052acc029559f 30-May-2013 Glenn Kasten <gkasten@google.com> Use sp<AudioTrack> instead of raw AudioTrack *

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
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
727f9e1e8e1306af761765e480ac5499224db646 20-Jan-2012 James Dong <jdong@google.com> AudioPlayerBase and VideoEditorAudioPlayer class design is incorrect.

o this patch removed the AudioPlayerBase class.
o verified and passed functional tests

Change-Id: I33727069ef63136979b954a9dee1c35309ef6dd4
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
00f742c087d92e5452d29be1fb668022b5f8a6c7 14-Jan-2012 James Dong <jdong@google.com> More source code Clean up in video editor engine

o fixed incorrect design and got rid of PreviewPlayerBase class
o removed obsolete/unused code as much as possible and reformatted the source code
o verified and passed functional tests
o More to come ...

Change-Id: I7a89162f8b9d9ea6eabcf0457366cd2f6d970d11
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
9969866cfe5b17c6e481b90d81b011a0cece78a0 30-Jun-2011 Chih-Chung Chang <chihchung@google.com> Make line-ending consistent (unix style).

Change-Id: Id837b042952ff5d97907591f337b2222cff2c8a9
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
b5c7784c96a606890eb8a8b560153ef4a5d1a0d9 23-Jun-2011 Thomas Le Guevel <thomaslg@google.com> Fix for: 4676350 Do not use dual copyright declaration for video editor code

Change-Id: I2856be051fa3b3ddfe67e096e45fb0b34beb92be
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
c9dedc4e1d0c8343ab1029cb601253826cd67c81 01-May-2011 James Dong <jdong@google.com> Separate preview player from AwesomePlayer and also video editor audio player from AudioPlayer

Change-Id: I436ac541df3e34ad16be95a50c96d7af67fa15e4
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
1c97d9ab52a288d24ea54499de435277cc1a3d68 22-Feb-2011 Rajneesh Chowdury <rajneeshc@google.com> Fix for 3369917 Audio skips at clip edit points

Change-Id: Iba66585cc2e679475d8db529d6113586b58e626e
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h
643290dc4c83da23b1b8ff4ed71118203274bb15 17-Jan-2011 Dharmaray Kundargi <dharmaray@google.com> videoeditor preview code on honeycomb

Change-Id: I9c3c9cb921ea697ab16732973d26ef9035cda2ee
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.h