summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* AVCustomizations: Enable 16 and 24 bit PCM offload.Preetam Singh Ranawat2015-10-061-7/+24
| | | | | | | | | | | | -create extended decoder and renderer -add change to pass bit width and format info to renderer. -add change for PCM conversions -add changes for time calucation Conflicts: media/libmediaplayerservice/nuplayer/NuPlayer.cpp Change-Id: I3363140fad441a7746884076c40b46e777f2e06e
* ToneGenerator: Limit tones to 48kHaynes Mathew George2015-10-061-1/+7
| | | | | | | | | DTMF tones are played at the hardware module sampling rate. Until now, this rate was limited to 48k. Tones sound not too pleasant at higher rates (like 96k and 192k). Ergo, limit the rate to 48k. Change-Id: I7fbc3185d988628ce3ee478076a322857221dece
* audioTrack: Handle track invalidate on wait for stream doneYamit Mehta2015-10-061-30/+30
| | | | | | | | | If a track invalidate is called while waiting for a stream done, AudioCallback handler is notified with event EVENT_STREAM_END. This might cause substantial data loss for offload playback. Try to recreate the track if needed. Change-Id: Ie663c85e92588ddfd8d633f4bf5024f9fa4f5c2e
* Stagefright: Make classes customizable and add AV extensionsPraveen Chavan2015-10-061-1/+2
| | | | | | | | | | | Change access modifiers and qualify methods with virtual, to allow extensions. Add facility for loading customizations (Extended classes) dynamically. Conflicts: media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp Change-Id: Icc8965754fb1c73175a13a9ad24c19665ad60988
* CamcorderProfiles: add VGA and 4K-DCI profilesPraveen Chavan2015-10-061-2/+13
| | | | | | Also add high-speed profile for CIF. Change-Id: Iacd8537f62112171ee611a7534f9d432f45d5d3f
* IMediaPlayer.cpp: make sure structures are initialized to 0Nick Kralevich2015-09-021-0/+2
| | | | | | | | Credit https://code.google.com/p/android/issues/detail?id=183310 Bug: 23515142 Change-Id: Idbd66fb148bd0ac1dd78f8651d0164f2a41e2427 (cherry picked from commit b73b826cc16291b33649402497efbe0f946413bd)
* libmedia: clear reply data for IEffect commandAndy Hung2015-09-021-2/+2
| | | | | Bug: 23540907 Change-Id: Ib89afc6b273b0eb310bbc5a1bd92b1e3d407c249
* Merge "Part of fix for libmedia OOB write anywhere" into mnc-devJeff Tinker2015-08-191-3/+3
|\
| * Part of fix for libmedia OOB write anywhereJeff Tinker2015-08-171-3/+3
| | | | | | | | | | | | | | | | | | Clarify that decrypt destination is not a pointer for secure case. b/23223325 Change-Id: I642dcf790a9eb9e32175f3e0d8f040c82228e3ac
* | NuPlayerRenderer: handle error when resuming an offloaded trackEric Laurent2015-08-121-1/+1
|/ | | | | | | | | | | Make sure that an offloaded audio track is torn down if start() returns an error in onResume(). This makes sure that a track invalidated due to a potential audio path change while paused is re created on the correct output. Bug: 22256441. Change-Id: I6c7bfec6e7322415daffc0451bab46d0c558522a
* Merge "Explicitly disconnect in MediaPlayer::reset" into mnc-devRobert Shih2015-07-241-0/+1
|\
| * Explicitly disconnect in MediaPlayer::resetRobert Shih2015-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Even without calling disconnect in MediaPlayer::reset, MediaPlayerService::Client (which lives on the other side of a binder with MediaPlayer) would still perform a disconnect in its destructor. Object destruction across binder is not synchronous, but method calls are. This commit merely makes sure that the disconnect happens deterministically before reset returns. Bug: 22451733 Change-Id: Id9146a63a1872d68087a252aa614248b16d2556d
* | Merge "Fix restore position warning and static track adjustment" into mnc-devAndy Hung2015-07-241-9/+9
|\ \
| * | Fix restore position warning and static track adjustmentAndy Hung2015-07-241-9/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary restoreTrack_l() position warning when AudioTrack output device changes. Also, fix rare getPosition() offset error if a static track is continuously playing a long time (> 24 hours at 48khz sampling) and its output device changes. Bug: 22524122 Bug: 21699132 Change-Id: I5a35c13d62ff9f0702b09d5cd9362c730364b18c
* | Fix race condition in AudioTrackThread::wakeAndy Hung2015-07-221-4/+8
| | | | | | | | | | Bug: 22533684 Change-Id: I2f46770dca44fc9dae41e067d3bec893c42a826e
* | Fix race condition in AudioRecordThread::wakeAndy Hung2015-07-221-4/+8
|/ | | | | Bug: 22533684 Change-Id: Iba73d633b088dbc84159ed692019da39cc8e2233
* Merge "mediaresourcemanager: add pid to removeResource method" into mnc-devRonghua Wu2015-07-181-2/+4
|\
| * mediaresourcemanager: add pid to removeResource methodRonghua Wu2015-07-171-2/+4
| | | | | | | | | | Bug: 22496209 Change-Id: I73311573e8d1ac15fec668a9ef6e6af7a07a1d30
* | Fix buildGlenn Kasten2015-07-171-1/+1
| | | | | | | | Change-Id: I18b63d68d452c4ee7544ff1614f4e3f57f5a9e73
* | Merge "Fix AudioTrack flush pointer wrap" into mnc-devAndy Hung2015-07-171-1/+13
|\ \
| * | Fix AudioTrack flush pointer wrapAndy Hung2015-07-161-1/+13
| |/ | | | | | | | | | | | | | | Occurs when read offset / write offset span the power of 2 mask boundary. Bug: 22513776 Change-Id: If863577dac6666e8b2083d78f78fe9b9490fcf76
* | mediaplayer: fix audio attributes override by stream typeEric Laurent2015-07-151-9/+14
|/ | | | | | | | Make sure that when audio attributes are set, the stream type is always derived from them. Bug: 22481669. Change-Id: Ia10c7017eb27e7753faf97a42dd4f44e15f2c986
* audio: several fixes in audio routing callbacksEric Laurent2015-07-101-5/+14
| | | | | | | | | | | | | | | | | | | | | | - audio policy: Force device change to ensure new audio patch creation upon first track activity on a given output. Fix function device_distinguishes_on_address() which could mistake some output device with remote submix input device. - audio flinger: Reduce number of binder calls upon new client registration by only sending ioConfigChanged() callbacks to newly registered client. Fix first patch after output thread creation not triggering an ioConfigChanged() callback. -audio system: Force client registration upon routing callback installation to force new ioConfigChanged() callback from audio flinger. Bug: 22381136. Change-Id: Ieb0d9f92f563a40552eb31bc0499c8ac65f78ce4
* reduce number of binder calls from mediaserverEric Laurent2015-06-262-9/+32
| | | | | | | | | | | | | | | Reduce the number of audio port, audio patch and IO config changed binder calls from mediaserver to client processes: - Do not call IO config changed callback if selected device is the same as previously selected one on a given audio flinger playback or capture thread. - Do not call the audio port or audo patch list update callback on a client if this client as no listener registered. Bug: 22045560. Change-Id: If780e105404de79b7cb5c80c27b793ceb6b1c423
* Merge "Using centralized isAudioPlaybackRateValid to validate parameters" ↵Ricardo Garcia2015-06-231-12/+20
|\ | | | | | | into mnc-dev
| * Using centralized isAudioPlaybackRateValid to validate parametersRicardo Garcia2015-06-221-12/+20
| | | | | | | | | | | | | | Centralized validation code bug: 20701446 Change-Id: I9d9941c7639c05b2afe069ff4f858c693c910bfe
* | Merge "Fix for Visualizer release bug" into mnc-devRicardo Garcia2015-06-221-8/+4
|\ \
| * | Fix for Visualizer release bugRicardo Garcia2015-06-191-8/+4
| |/ | | | | | | | | | | | | Setting callback reference to NULL before requesting exit. bug: 21804802 Change-Id: I54323959686880f4e7a10b766850f8c86c06edb6
* | Merge "Check binder transact status" into mnc-devJeff Tinker2015-06-191-30/+124
|\ \
| * | Check binder transact statusJeff Tinker2015-06-161-30/+124
| |/ | | | | | | | | | | | | | | | | | | If mediaserver restarts, the binder transact methods return DEAD_OBJECT. This status wasn't being checked, so calls would proceed with unpredictable results. bug: 20614102 Change-Id: I11271974ef2ccf0129529d1f67204dff1f1d03b0
* | Merge "Return DEAD_OBJECT if getTimestamp cannot restore track" into mnc-devAndy Hung2015-06-191-1/+6
|\ \
| * | Return DEAD_OBJECT if getTimestamp cannot restore trackAndy Hung2015-06-181-1/+6
| | | | | | | | | | | | | | | Bug: 21699132 Change-Id: I90443f8674ed949e2546048b231be75cd6fe6615
* | | Merge "Fix AudioTrack comments relating to use of restoreTrack_l()" into mnc-devAndy Hung2015-06-181-4/+8
|\ \ \ | |/ /
| * | Fix AudioTrack comments relating to use of restoreTrack_l()Andy Hung2015-06-181-4/+8
| |/ | | | | | | | | Bug: 21699132 Change-Id: Ib0d029a5e28676aeffbbbafc88c52a17367a413c
* | readAt can return negative values (error codes).Alex Klyubin2015-06-181-1/+8
|/ | | | | | | | | | | | | | This fixes the regression introduced in 59cea2616269f34b1f3d046995efd8da42cd5549 due to which MediaPlayer treated all error codes returned by MediaHTTPConnection as ERROR_OUT_OF_RANGE. The regression was caused by accidentally converting negative values (which represent error codes) returned by MediaHTTPConnection to very large positive ones (which represent length of data received). Bug: 21922241 Change-Id: I1b4592b5fec724aac1ba6c1ff8fdabcba56bcd2d
* Return correct error code from IMediaHttpConnectionMarco Nelissen2015-06-111-1/+1
| | | | | | | It returns a boolean, not a status_t Bug: 21654826 Change-Id: Id364a90598c5cf0bb567b5b25bbc9b7c73412760
* Use only strong references to AudioEffectEric Laurent2015-06-081-4/+7
| | | | | | | | | | | | Do not refer to an AudioEffect instance by a raw pointer from the child AudioEffectClient. Also align destructor cleanup sequence on those of AudioTrack and AudioRecord. Bug: 21629892. Change-Id: I970307aedbc38db2e41a2cc652fd6df9112f712c
* stagefright: add support for batching OMX eventsLajos Molnar2015-06-051-18/+40
| | | | | Bug: 20503131 Change-Id: I762c419ed1245f8b83fb1f6bf61e5557213ca07b
* Improve AudioTrack offload timestamp startup glitch detectorAndy Hung2015-06-041-4/+26
| | | | | | | | | | | | | New or existing glitch behavior for Nexus 5 offload audio: we receive several 0 timestamps, then we get a stale timestamp (very large), then a few ms later we get a correct nonzero timestamp. We attempt to hide the glitch because the retrograde timestamp correction makes the glitch "sticky". Bug: 21633313 Change-Id: I39153af718c151f9435e7d315651a811f72743da
* Compute sleep time when AudioTrack client callback returns no PCM dataAndy Hung2015-06-031-10/+79
| | | | | | | | | | | | Callbacks can go into a sleep-wait cycle if the client/app is unable to deliver data. This can happen if the buffer is large, or if the client/app cannot keep the buffer filled, or upon a stream end condition. We improve the sleep time computation for AudioTrack PCM callbacks. This minimizes the number of callbacks to NuPlayerRenderer. Bug: 21198655 Change-Id: I4247798a6638def2f0d8f1b46f60323482065cb2
* stagefright: add support for fences in OMXLajos Molnar2015-06-021-9/+23
| | | | | | | Pass Fence between Surface and ACodec, and between ACodec and IOMX. Bug: 12386081 Change-Id: Ifdc566979dec0d91ed8b07c3b69d2cf092accc73
* Merge "Store server latency, sample rate, framecount information in ↵Andy Hung2015-06-021-38/+12
|\ | | | | | | AudioTrack" into mnc-dev
| * Store server latency, sample rate, framecount information in AudioTrackAndy Hung2015-06-011-38/+12
| | | | | | | | | | Bug: 21198655 Change-Id: I24590196642a97ea5d61bc6356f0aff782bd37d3
* | stagefright: rework metadata buffer supportLajos Molnar2015-06-011-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add fence to new metadata buffer mode structure, but don't use it yet, so that we don't have to add another mode soon. - Change GraphicBuffers to ANativeWindowBuffer in new metadata mode. This removes internal depencency from vendor codecs. - Extend new metadata mode from SW encoders to all codecs. - Fallback from new metadata mode to old mode (so Camera can always use the new mode even with legacy codecs) Related-bug: 19614055 Bug: 13222807 Change-Id: I405a21dd6ce8e99808f633bfeab8f14278eb7079
* | stagefright: allow to overallocate OMX codec buffersLajos Molnar2015-06-011-4/+8
| | | | | | | | | | | | | | | | | | Specify allottedSize for useBuffer and allocateBufferWithBackup, where OMX will see only the allottedSize, even though framework may allocate and use a bigger buffer. Bug: 13222807 Change-Id: Ibfa93f6c7b7c8ca0853ef17d4a0758e496eaf921
* | Merge "remove video editor from MediaProfile" into mnc-devChong Zhang2015-05-301-126/+0
|\ \ | |/ |/|
| * remove video editor from MediaProfileChong Zhang2015-05-281-126/+0
| | | | | | | | | | bug: 17112465 Change-Id: Id59ba13e9c796298ad7dbaf03a595cc1fa62c169
* | Merge "Deprecations are warnings not errors" into mnc-devGlenn Kasten2015-05-281-2/+2
|\ \
| * | Deprecations are warnings not errorsGlenn Kasten2015-05-281-2/+2
| |/ | | | | | | Change-Id: Ib77f45fdc27ea53f1dd181f48c76810d03f8dcdb
* | libmedia: read from parcel only when there's a data available.Ronghua Wu2015-05-271-1/+1
|/ | | | | Bug: 21374704 Change-Id: I87dc2ee36fe8db99cceeb25ec6657feb423de133