summaryrefslogtreecommitdiffstats
path: root/media
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Effect Offload Proxy for effects offload"Eric Laurent2013-09-274-453/+1
| | | | | | This reverts commit 60c60df7db278d2fa5c90b0fa14f99a61d50272b. Change-Id: Iafba9e02a9f3bfde6248d802e96c4e649686a87d
* Merge "fix playback position after switching to offload" into klp-devEric Laurent2013-09-272-13/+28
|\
| * fix playback position after switching to offloadEric Laurent2013-09-272-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After switching from offloaded track to PCM track while paused (e.g. when connecting A2DP), playback restarts from the beginning of the song when resuming. Save current position before recreating an AudioPlayer in AwesomePlayer::play_l() and seek to the saved position before starting playback. Also fix a problem where the position is not reported properly by AudioPlayer if a seek is pending and queried just after start and before the first buffer is read from the MediaSource. Bug: 8174034. Change-Id: I254e65418ff903a9bf2e2111b89a00e2e54876c5
* | Merge "LoudnessEnhancer compatible with stereo imaging" into klp-devJean-Michel Trivi2013-09-274-26/+56
|\ \ | |/ |/|
| * LoudnessEnhancer compatible with stereo imagingJean-Michel Trivi2013-09-264-26/+56
| | | | | | | | | | | | | | | | | | Use a single compressor for both channels. Envelope of signal is determined by looking at both channels. Bug 8413913 Change-Id: Ia9b6f34923d2977c60a3352500b858dfa1fab33c
* | Merge "Send kWhatConnected in onTimeUpdate() before first access unit" into ↵Chong Zhang2013-09-251-17/+23
|\ \ | |/ |/| | | klp-dev
| * Send kWhatConnected in onTimeUpdate() before first access unitChong Zhang2013-09-241-17/+23
| | | | | | | | | | Bug: 10642588 Change-Id: If2b4fbbf250d5307e304f31c7aa4ac480e279484
* | Merge "Fix log typos in Visualizer effect" into klp-devJean-Michel Trivi2013-09-241-9/+7
|\ \
| * | Fix log typos in Visualizer effectJean-Michel Trivi2013-09-241-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix errors in logs for Visualizer. Set loop counters on 32 bits Bug 8413913 Change-Id: Iad2140d003d15d45be46826a5e89baff14fe9e77
* | | fix oflload effect proxy commmand handlingEric Laurent2013-09-242-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a more generic command handling in offload effect proxy. All commands are sent to both sub effects but only the reply from the active one is returned to the caller. Bug: 8174034. Change-Id: Ia45f9933b3bf338257ec70b37732fa1578d26b9f
* | | soundpool: allocate shared memory heap by clientEric Laurent2013-09-246-79/+147
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current SoundPool implementation allocates the shared memory heap containing decoded PCM samples in mediaserver process. When mediaserver process crashes, the shared memory heaps allocated by AudioCache cannot be mapped anymore in the new instance of mediaserver. This causes a silent failure to end playback of new sounds because AudioFlinger believes the new AudioTracks are opened in streaming mode and not static mode: it sees a NULL shared memory pointer when the track is created. The fix consists in allocating the memory heap in the client process. Thus the heap is not lost when mediaserver restarts. The global memory usage is the same as this is shared memory. Also added a way to detect that a shared memory is passed when the track is created but cannot be mapped on mediaserver side. Also fix a crash in SoundPool when ALOGV is enabled. Bug: 10894793. Change-Id: Ice6c66ec3b2a409d75dc903a508b6c6fbfb2e8a7
* | Merge "Add support for level measurements in Visualizer" into klp-devJean-Michel Trivi2013-09-232-17/+205
|\ \
| * | Add support for level measurements in VisualizerJean-Michel Trivi2013-09-232-17/+205
| |/ | | | | | | | | | | | | | | | | New commands to set a measurement mode and perform peak + RMS measurements. Bug 8413913 Change-Id: Ib25254065c79d365ebb34f9dc9caa0490e2d300d
* | AudioTrack: fix music resumeEric Laurent2013-09-232-4/+6
|/ | | | | | | | Fix regression introduced by commit 5a6cd22 in AudioTrack resume: the callback thread was not signaled if paused internaly. Bug: 10895013. Change-Id: Ic356b115132d6fccbcee2d9bb855e92671dc20c5
* Merge "Revert "Workaround slow AudioTrack destruction"" into klp-devGlenn Kasten2013-09-201-23/+0
|\
| * Revert "Workaround slow AudioTrack destruction"Glenn Kasten2013-09-201-23/+0
| | | | | | | | | | | | This reverts commit 8bbbd7da02fac3de40139af19f7cf7a7cc3cc824. Change-Id: I269a6c445cbce33451b6a9e74223e36e6abbdbe0
* | Fix slow AudioTrack and AudioRecord destructionGlenn Kasten2013-09-202-48/+59
|/ | | | | | | | | | | | | | | | | | | | There were two causes for the slowness: When thread was paused, it used nanosleep and sleep. These usually run to completion (except for POSIX signal, which we avoid because it is low-level). Instead, replace the nanosleep and sleep by condition timed wait, as that can be made to return early by a condition signal. Another advantage of condition timed wait is that a condition wait was already being used at top of thread loop, so it is a simpler change. The AudioRecord destructor was missing a proxy interrupt that was correct in AudioTrack. This proxy interrupt is needed in case another thread is blocked in proxy obtainBuffer. Does not address the 1 second polling for NS_WHENEVER. Bug: 10822765 Change-Id: Id665994551e87e4d7da9c7b015f424fd7a0b5560
* Workaround slow AudioTrack destructionGlenn Kasten2013-09-181-0/+23
| | | | | Bug: 10809586 Change-Id: I5f30d4deb1233e8ade8967568e40684ef680c395
* more support for audio effect offloadEric Laurent2013-09-182-13/+50
| | | | | | | | | | | | | | | | Offloading of audio effects is now enabled for offloaded output threads. If an effect not supporting offload is enabled, the AudioTrack is invalidated so that it can be recreated in PCM mode. Fix some issues in effect proxy related to handling of effect commands to offloaded and non offloaded effects. Also fixed a bug on capture index in software Visualizer effect. Bug: 8174034. Change-Id: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce
* Merge "Partial fix for SoundPool not terminating" into klp-devGlenn Kasten2013-09-181-2/+2
|\
| * Partial fix for SoundPool not terminatingGlenn Kasten2013-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | SoundPool was waiting for EVENT_UNDERRUN only to indicate end of clip. In J, AudioTrack delivered both EVENT_UNDERRUN followed by EVENT_BUFFER_END. However, as of K, AudioTrack is only delivering EVENT_BUFFER_END (this lack of EVENT_UNDERRUN is another bug which still needs to be fixed). The workaround is to also respond to EVENT_BUFFER_END in SoundPool. Bug: 10787103 Change-Id: Id68a23bddd6dd9df6c49c55138197260d71ca468
* | Merge "Use changed MediaCodec.PARAMETER_KEY_VIDEO_BITRATE value" into klp-devLajos Molnar2013-09-182-2/+2
|\ \ | |/ |/|
| * Use changed MediaCodec.PARAMETER_KEY_VIDEO_BITRATE valueLajos Molnar2013-09-172-2/+2
| | | | | | | | | | | | Change-Id: I157bcafbf705865e66c81517b1eab10c3daa039e Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 10461617
* | LoudnessEnhancer audio effect implementationJean-Michel Trivi2013-09-1719-0/+1872
|/ | | | | | | | | | | | Implementation based on DRC effect, controlled by a target gain. The target gain is used to amplify the signal at the input of the DRC, and to compute the knee of the DRC. Bug 8413913 Change-Id: I386d64793a9fa3f7218e053d6f0a99f6836c02bd
* Merge "Fix underruns when fast track denied due to SRC" into klp-devGlenn Kasten2013-09-172-37/+37
|\
| * Fix underruns when fast track denied due to SRCGlenn Kasten2013-09-172-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSL ES requests a fast track. If sample rate conversion is needed, the request is denied by server, and a larger client buffer is used to handle the higher latency of a normal track. However the client notification period was calculated based on buffer being divided into 2 sub-buffers. That resulted in the notification period being too long. The server pulls chunks that are smaller than half the total buffer. So now the client uses 3 sub-buffers when there is SRC. Also removed the 'defer wake' optimization because it was incorrect. This optimization attempted to reduce the number of wakeups of client, when server releaseBuffer knows that another releaseBuffer will be following. But there is no way for the first releaseBuffer to predict how soon the second releaseBuffer will occur. In some cases it was a long time, and the client underran. So now the client is woken up immediately if the total number of available frames to client is >= the minimum number the client wants to see (the notification period). Also fix bug where minimum frame count was not being used in the calculation of notification period. Bug: 10342804 Change-Id: I3c246f4e7bc3684a344f2cf08268dc082e338e2a
* | Merge "Fix hang" into klp-devMarco Nelissen2013-09-161-1/+1
|\ \
| * | Fix hangMarco Nelissen2013-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Specify that the surface is controlled by the app, to avoid a hang. b/10531761 Change-Id: Idccc2c73aa3d368d8e7fbdc071ce36e2382efea4
* | | Merge "Add FLAG_CAN_SEEK_BACKWARD and FLAG_CAN_SEEK_FORWARD see flags" into ↵Chong Zhang2013-09-162-5/+9
|\ \ \ | |_|/ |/| | | | | klp-dev
| * | Add FLAG_CAN_SEEK_BACKWARD and FLAG_CAN_SEEK_FORWARD see flagsChong Zhang2013-09-112-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also update seek flag in NuPlayerDriver, otherwise MediaPlayer will get wrong flags. Bug: 10676387 Change-Id: Ice30f27a9a04e37b4718d26228a407fea8d9e4fc
* | | Merge "Fix SoundPool.play() looping" into klp-devGlenn Kasten2013-09-141-2/+2
|\ \ \ | |_|/ |/| |
| * | Fix SoundPool.play() loopingGlenn Kasten2013-09-111-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | This is done by configuring SoundPool for shared memory and fast track. Previously SoundPool used a streaming track, and looping in streaming mode relied on the ability to loop the most recently enqueued data. That 'feature' was lost in the new implementation of streaming, so we're now switching from streaming mode to shared memory mode. Shared memory mode had always been desired, but was blocked by bug 2801375 which is fixed now. Bug: 10171337 Change-Id: I2a938e3ffafa2a74d5210b4198b50db20ad5da0e
* | ACodec: fix flush/resume for decoder-output-meta-data modeLajos Molnar2013-09-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When in decoder-output-meta-data mode, ACodec does not hold onto buffers, but they are either with the native window, or with the component/client. However, for flushing we did not release the discarded buffers back to native window (this makes sense because they will be resubmitted shortly.) This logic can be handled by the normal resubmission. Change-Id: Ic472b386422251515ef12f426e187f208f14decc Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 10621959 Bug: 10192533
* | Pass subtitle track properties to getTrackInfoChong Zhang2013-09-111-0/+7
|/ | | | | | Bug: 10326117 Change-Id: I15fcc49ad02e26d7cc92e82ee670bafca62a09a7
* MediaMuxer: Hook up setLocation methodZhijun He2013-09-091-0/+10
| | | | | | | This method is needed when mediamuxer is used for camera video recording. Bug: 10594784 Change-Id: I9bd006a07e5e2ac7019849e3f4f7cf7b8356d669
* Effect Offload Proxy for effects offloadjpadmana2013-09-064-1/+408
| | | | | | | | | | | | Effect Proxy abstracts the sub effects to the upper layers. It has the following functionalities: - creation and release of sub effects - routing the effect commands and process to the appropriate sub effect Bug: 8174034. Change-Id: I22d8136636048e7fe8f8807cbc6e348ffa200a22 Signed-off-by: jpadmana <rpadmanaban.jayashree@gmail.com>
* Merge "Effects Factory changes for effects offload" into klp-devEric Laurent2013-09-063-2/+274
|\
| * Effects Factory changes for effects offloadjpadmana2013-09-063-2/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | audio_effects.conf - commented changes to illustrate the addition of Proxy and sub effects to the conf file Added an effectFactoryApi - EffectGetSubEffects for querying the sub effect descriptors from the factory. This api is used by the Proxy to get the sub effects Added functions and data structures in factory code for loading the sub effects gSubEffectList - has the Proxies and their corresponding sub effects - addSubEffect() - reads a sub effect node and adds to the gSubEffectList - findSubEffect() - searches through the gSubEffectList to find a SubEffect Bug: 8174034. Change-Id: I25b0c62b2ad523a52337128b51469e628209ea3e Signed-off-by: jpadmana <rpadmanaban.jayashree@gmail.com>
* | Merge "Better workaround for slow decoders." into klp-devMarco Nelissen2013-09-061-4/+19
|\ \ | |/ |/|
| * Better workaround for slow decoders.Marco Nelissen2013-09-041-4/+19
| | | | | | | | | | | | | | | | | | | | This is more in the spirit of the original code. Now it checks whether a codec instantiated by name is a video codec, and enables the extra looper if so. b/10528409 Change-Id: Ia253c04c1283d4ecf66f213ef4bf523279ad7cca
* | Merge "wifi-display: do not use HDCP's encryptNative method if its ↵Chong Zhang2013-09-044-1/+33
|\ \ | | | | | | | | | unsupported" into klp-dev
| * | wifi-display: do not use HDCP's encryptNative method if its unsupportedChong Zhang2013-09-034-1/+33
| | | | | | | | | | | | | | | Bug: 10609422 Change-Id: I005f1d04a4191b1503b5f3e895a98b8d6560c402
* | | Merge " Fixed timestamp handling in ESQueue Access Unit parser. This ↵Rachad2013-09-041-6/+1
|\ \ \ | | | | | | | | | | | | fixes bug b/10294801" into klp-dev
| * | | Fixed timestamp handling in ESQueue Access Unit parser.Rachad2013-08-301-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes bug b/10294801 Change-Id: Ie96d36e2ff6fdee0c949a85da3602ab04b34bf6e
* | | | Merge "Work around decoder slowness" into klp-devMarco Nelissen2013-09-041-0/+2
|\ \ \ \ | | |_|/ | |/| |
| * | | Work around decoder slownessMarco Nelissen2013-09-031-0/+2
| |/ / | | | | | | | | | | | | | | | b/10528409 Change-Id: Ifcaf0488d63e87676b1e9382437943138deb76a6
* | | Fix miscellanous AudioTrack::getTimestamp() bugsGlenn Kasten2013-09-032-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that get_presentation_position is non-NULL before calling. AudioTrack::getTimestamp not implemented for fast tracks. Fix typo in Track::getTimestamp(). Fix bugs in AudioTrack::getTimestamp after stop: - getTimestamp while stopped is not allowed. - stop, start, getTimestamp now returns the correct value. Change-Id: Ie8d9dc1f28d8927634e04175a68b147ffc2ea8eb
* | | Implement MonoPipe::getTimestampGlenn Kasten2013-09-031-0/+3
| | | | | | | | | | | | | | | | | | using SingleStateQueue observer Change-Id: I7b1928b087f1e676c7b291df6cefa7707301662c
* | | Add ExtendedAudioBufferProvider::framesReleased and onTimestampGlenn Kasten2013-09-031-1/+12
| | | | | | | | | | | | | | | | | | | | | and implement them in SourceAudioBufferProvider using the associated NBAIO_Source, and in Track using the associated AudioTrackServerProxy. Change-Id: I60dc4adba63fc1dc452ff16caf347e4a7c8242c2
* | | Add NBAIO_Source::onTimestamp()Glenn Kasten2013-09-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | with dummy default implementation, and implement in MonoPipeReader. onTimestamp is meant to be called by the corresponding sink when it has a new timestamp available. Change-Id: I8a90d24d1061e4a592ce5bd8ee1c9fce6bdd8a84