History log of /frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
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.cpp
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.cpp
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.cpp
28b76b334f92a15a2be3cc9e2f7d229a3275d1ac 04-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t for channel mask

Change-Id: I1c1896da48983aa9f1462a4b471f910498816f60
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
0ca3cf94c0dfc173ad7886ae162c4b67067539f6 18-Apr-2012 Eric Laurent <elaurent@google.com> rename audio policy output flags

Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
09e1ef282e7b2df400a9f35feb47b48b67af0f3b 07-Mar-2012 Glenn Kasten <gkasten@google.com> Use audio_policy_output_flags_t consistently

Change-Id: I425cfd442257560dcf141d3d8599ddc7d21c1d13
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
8162c1a9f4df4bf4733e78f5b03398b2991ba79a 02-Mar-2012 Jean-Michel Trivi <jmtrivi@google.com> Set channel mask when opening audio sink

Update the code to use the AudioSink::open() interface that
takes a channel mask as an additional parameter. The code
is only stereo, and returns an error when attempting to create
a video editor audio sink with more than two channels.

Change-Id: Ib9bba067da0b286c08656976b89fba7c8b42f99f
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
c4689fae1bdb8d1c94eb28af1b2a1f30d2b1a3da 08-Feb-2012 James Dong <jdong@google.com> Move away from MediaDebug and use ADebug instead

Change-Id: I307b3f565808ec8e3b9a4d944c6c0d1f603b04c9
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
3bd45591402b94ed4481ea0ee0a9140840979c84 21-Jan-2012 James Dong <jdong@google.com> Clean up VideoEditorGBAudioProcessing

o added #ifndef/#define in the header
o removed unused variables
o renamed some types and methods
o replaced macro with class private enum

Change-Id: I588ef062fcadcd11591a5a55b4aed771c724492f
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
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.cpp
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.cpp
f8bd29c66308c820d579b3efb0942a53a277e2c5 08-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: I5c54a0185527f6ca3e746d625a007aa06f6f25f9
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
2703f23af496c13cfa39cc7e157fa12d1cb4c169 20-Oct-2011 Steve Block <steveblock@google.com> Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I366680b6e614b8983d1def28cc2fdbfa98f39531
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
3d974e7763495d8fda6f264810619cb3bd265293 18-Aug-2011 Chih-Chung Chang <chihchung@google.com> Fix 5123908: Native crash rewinding movie

Simplify the VideoEditorSRC code and fix some bugs.

Change-Id: I6bcf3a5cea21a2eec4b51f167560c4b0d3a04a29
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
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.cpp
272eb55a3855d8455bc0a12e5359d51f4010332a 11-May-2011 Dima Zavin <dima@android.com> update for new audio.h header location

Change-Id: I593b91a84a603d8c7f51a83232cced5af4980baf
Signed-off-by: Dima Zavin <dima@android.com>
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
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.cpp
6859837b0bdea82be855ab50bd69c5ac9b62acf2 06-Apr-2011 Dima Zavin <dima@android.com> libvideoeditor: convert to use new audio.h

Change-Id: I39726f6f6cd5aabbd91629f329876660b3d3cec2
Signed-off-by: Dima Zavin <dima@android.com>
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
694816d7291f17364502ac5d3319684a0b180860 21-Apr-2011 Shyam Pallapothu <shyamp@google.com> Fix for issue 4133431 "Remove OSAL layer" in engine part

Change-Id: I98f98691048a5afc6f691b0cc3cec92e458e8f44
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
32ed3f4dad00f8a65f7e6b38402c70d5341c57eb 21-Apr-2011 Shyam Pallapothu <shyamp@google.com> Fix for issue 4133431 "Remove OSAL layer" in engine part

Change-Id: I9e2e142bcdf3153c529b790e368caea4fdb65ac8
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
838daafc9d267b3a72abe1eeb84971a41ebb2050 04-Apr-2011 Andreas Huber <andih@google.com> Bring videoeditor copies of internal code in sync with recent changes to the originals

Change-Id: Ie534360f9f1f7757c57cffabb0fa4b4903422ecb
related-to-bug: 4193552
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
100d01836041713337dd9532e417fb010bfb381c 04-Mar-2011 Basavapatna Dattaguru <dattaguru@google.com> Fix for issue 3371667: fix source code compilation warnings(Moved from master)

Change-Id: Ife1fc3f89beae498a49970ab5d2a080a112ce7c2
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
b6e2b5cc5b71986b06cbd9c471b63eb5878a7aea 26-Feb-2011 Rajneesh Chowdury <rajneeshc@google.com> Fix for memory leak with single audio player instance

Change-Id: Idb0d24ac1a4fbe21c5f63871a4c7da2beb90e516
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
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.cpp
5bc7fb407ce1bab13d4a4a67d34a1a3192ee3186 14-Feb-2011 Dheeraj Sharma <dheerajs@google.com> Fix for issue : 3450195 Adapt to the recent changes of awesome player in video editor preview player

Change-Id: Ibd15264837dab32464fb90e75cf6d3d323cbbae3
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
5df818550a13d5bd21798badcb413e7a945e15e8 11-Feb-2011 Santosh Madhava <smadhava@google.com> Fix for issue 3431967 : Memory leak from video editor engine

Change-Id: I4cc445ce7d41a4842dcf0b5ad1c729c0ae5553cd
/frameworks/av/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
eb5b265274bb26732ac9f4ac2d42d0b7e4148d52 08-Feb-2011 Kenny Root <kroot@google.com> X86 target fixes

GCC 4.2.1 complains about using void* in arithmetic. Cast it to unsigned
int before using it.

Also there was a missing stdint.h include.

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

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