summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* Update Instrumentation codeWilliam Clark2016-04-131-2/+1
| | | | | | Add support for enhancements in QSSP instrumentation code. Change-Id: I00aa0b2bee5044d91eeeddaa43d3d28518a5ba93
* audiopolicy: Be a little smarter with auto-attachSteve Kondik2016-04-072-5/+16
| | | | | | | | | | | | | | * The edge cases, ZOMG! * Instead of relying on effects to be automatically attached, let's just always notify userspace and send a bit more information. This lets the application decide if effects should be attached rather than relying on a hard-coded configuration file. * Perform the setup in getOutputForAttr, but do it on the command thread so we don't block the client. OPO-593 Change-Id: I3900b349f2e895d51fa3a3dcc2de0c4bdf6dbc08
* Merge tag 'android-6.0.1_r24' into HEADJessica Wagantall2016-04-053-36/+52
|\ | | | | | | | | Ticket: CYNGNOS-2213 Android 6.0.1 release 24
| * Get service by value instead of referenceMarco Nelissen2016-03-011-2/+2
| | | | | | | | | | | | | | to prevent a cleared service binder from being used. Bug: 26040840 Change-Id: Ifb5483c55b172d3553deb80dbe27f2204b86ecdb
| * Clear allocation to avoid info leakMarco Nelissen2016-03-011-27/+32
| | | | | | | | | | Bug: 26914474 Change-Id: Ie1a86e86d78058d041149fe599a4996e7f8185cf
| * Fixing safteynet logging bug introduced in ag/862848mspector@google.com2016-03-011-4/+0
| | | | | | | | | | | | We moved the safteynet logging into storeMetaDataInBuffers_l Bug: 26324358 Change-Id: I2171742b53192ebb71d546bcb8970bb3c68f366f
| * 3 uninitialized variables in IOMX.cppmspector@google.com2016-03-011-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | Uninitialized MetadataBufferType pointer in case: SET_INPUT_SURFACE STORE_META_DATA_IN_BUFFERS CREATE_INPUT_SURFACE Fix: initialize them to kMetadataBufferTypeInvalid Bug: 26324358 Change-Id: Ib3bcac9bedc98bc65efa39f67cdbffbd90b374c9
| * Fix info leak vulnerability of IDrmJeff Tinker2016-03-011-1/+1
| | | | | | | | | | bug: 26323455 Change-Id: I25bb30d3666ab38d5150496375ed2f55ecb23ba8
| * IOMX.cpp uninitialized pointer in BnOMX::onTransactmspector@google.com2016-03-011-3/+5
| | | | | | | | | | | | | | | | | | This can lead to local code execution in media server. Fix initializes the pointer and checks the error conditions before returning Bug: 26403627 Change-Id: I7fa90682060148448dba01d6acbe3471d1ddb500
| * Merge "Fix security vulnerability in ICrypto DO NOT MERGE" into mnc-devJeff Tinker2015-12-091-1/+3
| |\ | | | | | | | | | | | | | | | | | | am: 89bec04cf8 * commit '89bec04cf83598b1868f3f969c220c3200028e03': Fix security vulnerability in ICrypto DO NOT MERGE
| | * Fix security vulnerability in ICrypto DO NOT MERGEJeff Tinker2015-12-051-1/+3
| | | | | | | | | | | | | | | | | | b/25800375 Change-Id: I03c9395f7c7de4ac5813a1207452aac57aa39484
* | | audiopolicy: Add notification when default effects are updatedSteve Kondik2016-03-083-2/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * In M, we now have the ability to define a default set of audio effect on a per-stream basis. This allows us to get around the problem of apps not sending the control intents so we can implement smart global effects for specific media types. * We still need a session id in order to get a handle and configure them from an app like AudioFX, so we'll need to add some plumbing in order to send an event to interested applications. * This patch implements the native side of this. The Java layer will call down thru AudioSystem and register a callback which will be invoked by the audio policy when default effects are updated on a stream. This callback will receive both the stream type as well as the session id. * Attaching this listener requires that the caller hold the MODIFY_AUDIO_ROUTING permission. Change-Id: I142b15f2585ffca6a953c3e828e2a7c07b24f56c
* | | Merge tag 'android-6.0.1_r13' into HEADJessica Wagantall2016-02-011-1/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Android 6.0.1 release 13 Ticket: CYNGNOS-1522 Change-Id: Ie9d7be6df3e63138bafb892a3181446e3c7d844e
| * | | Fix security vulnerability in ICrypto DO NOT MERGEJeff Tinker2015-12-101-1/+3
| |/ / | | | | | | | | | | | | | | | b/25800375 Change-Id: I03c9395f7c7de4ac5813a1207452aac57aa39484
* | | libmedia: Add support for LHR tonesKarthik Reddy Katta2016-01-231-1/+5
| | | | | | | | | | | | | | | | | | | | | Add tones to the ToneGenerator that are to be used for Local Hold Recall. Change-Id: I92cc1d63a3f6d38fc224774909b5b27d58be969c
* | | libmedia: correct latency computing for TRANSFER_SYNCMingming Yin2015-12-311-1/+2
| | | | | | | | | | | | | | | | | | | | | - Compute the track latency by frame count returned from audio hal when in TRANSFER_SYNC mode Change-Id: If7bbf780abc8e141eb35eea44c01c583b1290d3c
* | | libmedia: Preserve futex return status in client obtainBufferLeena Winterrowd2015-12-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clock_gettime() can change errno if something goes wrong (most commonly setting EBADF). This failure should not cause a failure in ClientProxy::obtainBuffer() if the futex returned successfully or with a known status. Preserve errno before calling clock_gettime to prevent propagation of an invalid, unexpected error. Propagated from Ib69201031a81395ece47dd8ad7c4dcddd2b00153 Change-Id: I48320fc287b6a0ef2a1b9e71f9d0e979bd6343a5
* | | AudioTrack: Set DIRECT track flag for direct pcm outputLeena Winterrowd2015-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While direct output should ideally be abstracted from the AudioTrack, the use of an offload path can leave data stuck in the shared buffer (especially if the clip is short such that the buffer is never entirely filled). To ensure that all data is played out on track stop(), AudioTrack must be aware of the direct output or offload session. Set the DIRECT track flag for track offload use cases to avoid losing data in the shared buffer. CRs-Fixed: 944878 Change-Id: I13f840b5d67be56e03ec65d3bc7d44f1090b48c5
* | | libmedia: correct latency computing of AudioRecordMingming Yin2015-12-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Originally, audio record latency is calculated by frame buffers allocated for this track, while the actual latency is determined by audio hal. - Compute the track latency by frame count returned from audio hal when in TRANSFER_CALLBACK mode Change-Id: I26e5e47e8cc3720895b962f7aab8a595a54b7c83
* | | Fix potential double close in IMediaMetadataRetriever::setDataSourceTaiju Tsuiki2015-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMediaMetadataRetriever::setDataSource(fd, offset, length) takes the ownership of |fd| on the direct invocation, and doesn't take the ownership on invocation from Binder. This is inconsintent to other similar methods like IMediaPlayer::setDataSource, and causes potential double close of |fd|. This CL changes the caller and implementations to leave the ownership to make them consistent. Also, fixes a double close in IMediaPlayerService::setDataSource in an error case. Change-Id: Id551a1e725c4392b0fe6b7293871212eb101c0a5
* | | Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-072-3/+9
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * | Workaround for busy wait bugGlenn Kasten2015-10-221-1/+2
| | | | | | | | | | | | | | | | | | | | | Underlying bug 25195759 is not yet fixed. Bug: 24263351 Change-Id: I04b644246640054d38c8de79e0eb80fcbfef0e48
| * | Merge "For static obtainBuffer(), do not set mUnreleased if acknowledging ↵Glenn Kasten2015-10-141-2/+4
| |\ \ | | | | | | | | | | | | flush." into mnc-dr-dev
| | * | For static obtainBuffer(), do not set mUnreleased if acknowledging flush.Andy Hung2015-10-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | static audio tracks use obtainBuffer() to update position in start(). Bug: 22938515 Change-Id: I8ae32f6cce4d122386d2cf8982e158049b04ba9a
| * | | AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT.Andy Hung2015-10-131-1/+5
| |/ / | | | | | | | | | | | | | | | | | | Send only EVENT_NEW_IAUDIOTRACK to initiate teardown. Bug: 23750452 Change-Id: Ib5dcd578b5b6a6a1d91a03e58ef8da0acd994243
* | | Fix benign overflow in ToneGenerator.cppChad Brubaker2015-12-071-2/+4
| | | | | | | | | | | | | | | | | | | | | while (count--) causes an unsigned overflow when count = 0, refactor the condition to avoid this. Change-Id: I91a8c93e6be715d80070a4c94c1de712cb659265
* | | Fix benign unsigned overflow in AudioTrackChad Brubaker2015-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | An unsigned overflow could occur in timestamp computation when mTimestamp < mServer. Change-Id: I9e01897478a6d481dd6fb7303d325617466497cf
* | | Fix benign overflow in AudioTrackChad Brubaker2015-12-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | two uint32_t's were being used in a computation that could be negative, cast to int32_t before the subtraction to prevent incorrect overflow detection. Change-Id: I33c5ef79a0ebbba055daa0ea041b42229d0c3152
* | | libmedia: add NULL check before accessing source and destination buffers.Shivaprasad Hongal2015-12-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | IMemory can return a NULL pointer or the destination buffer for readAt can be NULL. Check for NULL and report error. Change-Id: I9608de8ee3817a681c5c51ec7fdbd1bf207d9463 CRs-Fixed: 931744
* | | video: Add QHD & 2K profile for recorderXavier Varricatt2015-12-041-0/+4
| | | | | | | | | | | | | | | | | | Add QHD & 2K profile for recorder Change-Id: Ib74ca47fc330d02069a3ec010c6ce8431c50f0fe
* | | Workaround for busy wait bugGlenn Kasten2015-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | Underlying bug 25195759 is not yet fixed. Bug: 24263351 Change-Id: I04b644246640054d38c8de79e0eb80fcbfef0e48
* | | Merge branch 'LA.BF64.1.2.2_rb4.8' of ↵Steve Kondik2015-11-291-7/+8
|\ \ \ | | | | | | | | | | | | git://codeaurora.org/platform/frameworks/av into cm-13.0
| * | | AudioTrack: Handle timestamp queries for Track OffloadAlexy Joseph2015-11-151-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle timestamp queries for Track offload session cleanly Change-Id: I93759c0e186e4286037837787057960ee52875d7 CRs-Fixed: 933740
* | | | stagefright: Squashed commit of pause/resume featuresSteve Kondik2015-11-074-5/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 2 APIs (suspend/resume) in MediaPlayer - API:suspend() will just pause the player and release all the decoders to replace release() which will release the whole player - API:resume() will just init the decoders again, then start() will be called to restart streaming playback - Add a check in AwesomePlayer::onVideoEvent() to make sure the first seek operation will always seek to the next i-frame Change-Id: Ie4c82906a2a056378119921a656128ebdc1007c4 audio: Add pause support for hardware omx component - ADSP doesn't enter sleep state after wma playback is paused and power suspended. - No support for NT session pause in case of hardware component. NT session need to be paused to put ADSP into power collapse. - Add support of pause in stagefright to ensure device enters suspend mode. Also add intermediate states to avoid concurrency issues between read and pause. Change-Id: I41b946b8c8805e6ee303646b63513b5b16514ef6 libstagefright: Drain input buffer on resume - Buffers returned from codec in paused state are not drained. When codec is resumed these buffers are not drained until the next flush, and may cause timed out issue. - Added change to drain input buffers for sw decoders when resuming. Change-Id: Ida2ab1d5dc3a1910accdd6fb89548262a912d8e7 CRs-Fixed: 569585, 574967 libstagefright: camcorder pause-resume implementation - Add pause resume feature in camcorder app. So that user can pause recording and resume later which results in a single recorded clip. Change-Id: Id19c45ae5bb85265aa4d5304b160ebf119d9575a libstagefright: support pause/resume for timelapse recording Modify the timestamp calculation mechanism in CameraSourceTimeLapse in order to support pause/resume. Change-Id: Icb02ea798b0b807ffb7ada2d1ef5b2414b74edfb
* | | | Stop thread before deleting object referenceOscar Rydhé2015-11-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If setPeriodicCapture is called Visualizer will start a thread and do periodic callbacks. When native_finalize is called the reference to the class is deleted. If a callback happens after this the reference is no longer valid and when used from the callback method the vm crashes. With this patch the thread will be terminated before deleting the reference. Change-Id: I30f331437ddad05f8d52c244cdbecb1859a0abd2
* | | | Fix benign unsigned overflow in AuidoTrackSharedChad Brubaker2015-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fsanitize=integer adds unsigned checks to int32_t - uint32_t, force both operands to int32_t to avoid such checks being added. Change-Id: I76fce38f9636f5322ad95fdb81abb690503f4d08
* | | | Refactor setPlaybackRate to avoid benign unsigned integer overflow.Dan Austin2015-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a check that results in a benign unsigned integer overflow. This has been refactored to avoid the unsigned integer overflow. Bug: 25327431 Change-Id: Ib112a7cd585c680f13e4bee3d7e9f45da7d66f1d
* | | | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-053-5/+19
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * | | Merge "AudioTrack: Prevent stop() from reissuing last marker event" into ↵Glenn Kasten2015-10-071-3/+12
| |\ \ \ | | | | | | | | | | | | | | | mnc-dr-dev
| | * | | AudioTrack: Prevent stop() from reissuing last marker eventAndy Hung2015-10-061-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid a duplicate marker event race condition (1 in 30 or less) by clearing marker reached in start() not stop(). Bug: 24497521 Change-Id: I9520d063c7d173d2e642174bf60a2bfe75edf085
| * | | | am cb70fdbe: Merge "OMX: allow only secure codec to remotely call ↵Wei Jia2015-10-061-0/+6
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | allocateBuffer." into mnc-dev * commit 'cb70fdbe9be14002a4303a93f07a13c508c00d89': OMX: allow only secure codec to remotely call allocateBuffer.
| | * | | OMX: allow only secure codec to remotely call allocateBuffer.Wei Jia2015-10-021-0/+6
| | |/ / | | | | | | | | | | | | | | | | Bug: 24310423 Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
| * | | AudioSystem: Fix race condition in accessing ioDescriptorsPraveen Chavan2015-10-051-4/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vector mIoDescriptors can be simultaneouly modified and accessed by 2 threads. Acquire a lock while wrapping the ioDescriptor in a sp<> Bug: 24576810 Author: Haynes Mathew George <hgeorge@codeaurora.org> Change-Id: I73c79ef8eca092b500a7ead3a5ebd0bcf75f9920
| * | Merge "DO NOT MERGE Fix vulnerability in mediaserver" into mnc-devJeff Tinker2015-09-171-1/+1
| |\ \
| | * | DO NOT MERGE Fix vulnerability in mediaserverJeff Tinker2015-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ICrypto.cpp: ASLR bypass using DECRYPT IPC bug: 24074485 Change-Id: I61cd77f0894140547f666a80526ebfe1ec3d2db6
| * | | IAudioFlinger: fix the missing initialization of variable to ensure no info ↵Wei Jia2015-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | leak when writing them to Parcel. Bug: 23953967 Change-Id: I3a1d0144ba3832649e322c197ff0f03305ee7829
| * | | IAudioFlinger: always initialize variables to ensure no info leak when ↵Wei Jia2015-09-102-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | writing them to Parcel. Bug: 23953967 Change-Id: Ibbe841da149038675e9e8daea76c77558bc8564b
| * | | IAudioFlinger: clear config before reading it from parcel.Wei Jia2015-09-092-15/+29
| |/ / | | | | | | | | | | | | | | | Bug: 23905951 Bug: 23912202 Change-Id: Id13a9d3cae2c09e7381b841e67ddfb188274d74c
| * | am becceb11: am b57ffbb5: am d021f7e5: am b18c0276: am 2b63b91b: am ↵Robert Shih2015-09-042-3/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | c1e989e7: am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev * commit 'becceb1136e7eb01db7dd865cb98a57117212879': Zero out return values in media binder calls
| | * \ am b57ffbb5: am d021f7e5: am b18c0276: am 2b63b91b: am c1e989e7: am ↵Robert Shih2015-09-042-3/+3
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev * commit 'b57ffbb5486a58e0dbb03466e9f3a5e51d6cf0f3': Zero out return values in media binder calls