OSDN Git Service

android-x86/frameworks-av.git
7 years agoomx node: patch err code to preserve API contract
Robert Shih [Wed, 5 Apr 2017 18:19:28 +0000 (11:19 -0700)]
omx node: patch err code to preserve API contract

Bug: 36789323
Change-Id: Ie1d8dde5e4df8f5f4061cba7b20e1732b1466235
Test: adb shell am instrument -e size small \
  -w android.media.cts/android.support.test.runner.AndroidJUnitRunner

7 years agoMerge "Show in dumpsys effect libraries that failed to load" into oc-dev
TreeHugger Robot [Wed, 5 Apr 2017 03:01:52 +0000 (03:01 +0000)]
Merge "Show in dumpsys effect libraries that failed to load" into oc-dev

7 years agoShow in dumpsys effect libraries that failed to load
rago [Tue, 4 Apr 2017 23:48:16 +0000 (16:48 -0700)]
Show in dumpsys effect libraries that failed to load

Bug: 36525163
Bug: 36864417
Change-Id: I120129cb43e9593cc94ba361fe76ade86448e46a

Test: run and use dumpsys audio_flinger

7 years agoMerge "Remove useless GraphicBuffer() constructor" into oc-dev
Mathias Agopian [Wed, 5 Apr 2017 00:42:52 +0000 (00:42 +0000)]
Merge "Remove useless GraphicBuffer() constructor" into oc-dev

7 years agoMerge "NuPlayer : send the correct streaming info while opening audio sink" into...
TreeHugger Robot [Tue, 4 Apr 2017 23:06:23 +0000 (23:06 +0000)]
Merge "NuPlayer : send the correct streaming info while opening audio sink" into oc-dev

7 years agoMerge "MPEG4Source: fix fragmented read." into oc-dev
Wei Jia [Tue, 4 Apr 2017 22:57:53 +0000 (22:57 +0000)]
Merge "MPEG4Source: fix fragmented read." into oc-dev

7 years agoMerge "Revert "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1...
Yin-Chia Yeh [Tue, 4 Apr 2017 22:22:02 +0000 (22:22 +0000)]
Merge "Revert "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages"" into oc-dev

7 years agoMPEG4Source: fix fragmented read.
Wei Jia [Fri, 24 Mar 2017 21:04:05 +0000 (14:04 -0700)]
MPEG4Source: fix fragmented read.

Test: passed CTS test DecoderTest#testDecodeFragmented
Bug: 36571704
Change-Id: I71ad6aaae473b03483f8405899d3178148597bba
(cherry picked from commit ba9af7792dfed6e9b1b216aab91a97e713eec891)

7 years agoRevert "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages"
Yin-Chia Yeh [Tue, 4 Apr 2017 20:00:03 +0000 (13:00 -0700)]
Revert "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages"

This reverts commit 1a2f15daf13552e86324025cf6d31d887cd8fa02.

Test: fix b/36876770
Bug: b/36876770
Change-Id: Ie7b8c9ee444e3e8667154b396e3e6a556b54739a

7 years agoMerge "Add timeout to lock in MtpServer configure" into oc-dev
TreeHugger Robot [Tue, 4 Apr 2017 19:23:50 +0000 (19:23 +0000)]
Merge "Add timeout to lock in MtpServer configure" into oc-dev

7 years agoNuPlayer : send the correct streaming info while opening audio sink
Dhananjay Kumar [Thu, 6 Aug 2015 05:13:16 +0000 (10:43 +0530)]
NuPlayer : send the correct streaming info while opening audio sink

 -For any offload playback NuPlayerRenderer always open the audio sink
  with isStreaming info as true.
 -Pass the streaming info to the NuPlayerRenderer while opening audio
  sink
Test: cts tests
Bug:36051644
Author: Preetam Singh Ranawat <apranawat@codeaurora.org>
Change-Id: I249e6769ef4587917a13b0225d049a3923544d16
(cherry picked from commit b2444b392d0d5de4118d37a24f4351f9de5c215d)

7 years agoMerge "NuPlayer: Use deep buffer AudioTrack for video playback" into oc-dev
TreeHugger Robot [Tue, 4 Apr 2017 16:17:16 +0000 (16:17 +0000)]
Merge "NuPlayer: Use deep buffer AudioTrack for video playback" into oc-dev

7 years agoMerge "Camera: Try to remove inflight requests during error notifications" into oc-dev
TreeHugger Robot [Tue, 4 Apr 2017 09:55:22 +0000 (09:55 +0000)]
Merge "Camera: Try to remove inflight requests during error notifications" into oc-dev

7 years agoRemove useless GraphicBuffer() constructor
Mathias Agopian [Tue, 4 Apr 2017 00:52:26 +0000 (17:52 -0700)]
Remove useless GraphicBuffer() constructor

Test: compiled & run
Bug: 36869708
Change-Id: I777701b8f47929d2b669d2a990649e58eef528fc

7 years agoMerge "Camera: add buffer freed notification for output streams" into oc-dev
TreeHugger Robot [Tue, 4 Apr 2017 00:33:14 +0000 (00:33 +0000)]
Merge "Camera: add buffer freed notification for output streams" into oc-dev

7 years agoMerge "Camera: add buffer freed notification interface" into oc-dev
TreeHugger Robot [Tue, 4 Apr 2017 00:31:00 +0000 (00:31 +0000)]
Merge "Camera: add buffer freed notification interface" into oc-dev

7 years agoNuPlayer: Use deep buffer AudioTrack for video playback
Andy Hung [Mon, 3 Apr 2017 22:50:27 +0000 (15:50 -0700)]
NuPlayer: Use deep buffer AudioTrack for video playback

This reduces power requirements and increases robustness against
audio glitches.

Test: Photos
Bug: 36867565
Change-Id: I200728cfc1bfd01301441c8759816415abe58d48

7 years agoCamera: add buffer freed notification for output streams
Yin-Chia Yeh [Sat, 1 Apr 2017 02:11:00 +0000 (19:11 -0700)]
Camera: add buffer freed notification for output streams

Test: ReprocessCaptureTest fixed
Bug: 34461678
Change-Id: Icd5af79a8f7fc35b0a040c57a639ae6777e71024

7 years agoMerge "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages"...
Eino-Ville Talvala [Mon, 3 Apr 2017 22:03:13 +0000 (22:03 +0000)]
Merge "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages" into oc-dev

7 years agoCamera: add buffer freed notification interface
Yin-Chia Yeh [Thu, 30 Mar 2017 20:35:36 +0000 (13:35 -0700)]
Camera: add buffer freed notification interface

To cleanup caches of obsolete buffers.
This CL addressed the input stream bit, the output
stream hook will be a followup CL.
Also cleanup some dead API in CameraDeviceBase.h

Test: fix CTS ReprocessCaptureTest
Bug: 34461678
Change-Id: I801cd81c29becaa45630ed0a5c2dab8df1278a6a

7 years agoAdd timeout to lock in MtpServer configure
Jerry Zhang [Mon, 3 Apr 2017 18:24:48 +0000 (11:24 -0700)]
Add timeout to lock in MtpServer configure

In situations where MtpServer is in a bad state, this will prevent
the configure call from blocking indefinitely, which will prevent
a few visible problems and allow the state to recover on the next
config change.

Bug: 34873000
Test: Connect to AA test sled
Change-Id: I5daf9cfcec69c967bde6bf3f6fd90e1c434e18bb

7 years agoUse gralloc0 usage to init BufferItemConsumer
Jiwen 'Steve' Cai [Fri, 31 Mar 2017 23:59:50 +0000 (16:59 -0700)]
Use gralloc0 usage to init BufferItemConsumer

BufferItemConsumer is expecting gralloc0 usage, use
android_convertGralloc1To0Usage.

Also one minor log change: during acquireImageLocked, turn off the
warning when accquired buffer has different dimension than originally
configured on ImageReader. It is actually a legal operation for
IGraphicBufferProducer to change buffers dimension dynamically.

Bug: 35114769
Test: AImageReaderCts now passes with CPU_READ_OFTEN case.
Change-Id: I32015148437be56242a46c8e20ca33497e182ac2

7 years agoMerge "libaaudio: implement getTimestamp for legacy path" into oc-dev
Phil Burk [Mon, 3 Apr 2017 16:09:46 +0000 (16:09 +0000)]
Merge "libaaudio: implement getTimestamp for legacy path" into oc-dev

7 years agoCamera: Try to remove inflight requests during error notifications
Emilian Peev [Thu, 30 Mar 2017 08:05:34 +0000 (09:05 +0100)]
Camera: Try to remove inflight requests during error notifications

Make it possible for clients to clear the internal inflight queue
as part of error result notifications. For this to work all pending
buffers must be returned previously with the exception of the
result metadata.

Bug: 35652756
Test: Complete Camera/Camera2 CTS without any regressions.
Change-Id: I9d8a6b63364fd254311cda2f8c836b99ee05cacb

7 years agoMerge "Camera: HAL1 recording batching support" into oc-dev
TreeHugger Robot [Mon, 3 Apr 2017 07:34:01 +0000 (07:34 +0000)]
Merge "Camera: HAL1 recording batching support" into oc-dev

7 years agoMerge "MediaRecorder: Handle 24-hour timelapse duration" into oc-dev
TreeHugger Robot [Sun, 2 Apr 2017 07:28:35 +0000 (07:28 +0000)]
Merge "MediaRecorder: Handle 24-hour timelapse duration" into oc-dev

7 years agoMerge "Add Flag for Enabling 64-bit Media DRM Server" into oc-dev
TreeHugger Robot [Sun, 2 Apr 2017 04:01:32 +0000 (04:01 +0000)]
Merge "Add Flag for Enabling 64-bit Media DRM Server" into oc-dev

7 years agoNuPlayer: handle source error correctly.
Wei Jia [Fri, 31 Mar 2017 00:57:02 +0000 (17:57 -0700)]
NuPlayer: handle source error correctly.

Test: source error is sent to app.
Bug: 35025627
Change-Id: I668bab0de20cf24def028a6a467efceaed54af2b
(cherry picked from commit 231fd353518502e3a05021473ae60e7addd9a46c)

7 years agoCamera: HAL1 recording batching support
Yin-Chia Yeh [Tue, 21 Mar 2017 02:32:19 +0000 (19:32 -0700)]
Camera: HAL1 recording batching support

Test: Angler HAL1 + batching normal recording mode
Bug: 35997432
Change-Id: If088715ccdb40163f44150c16deed62432692c07

7 years agoMerge "Nuplayer logging empty records to media.metrics" into oc-dev
Ray Essick [Sat, 1 Apr 2017 00:09:33 +0000 (00:09 +0000)]
Merge "Nuplayer logging empty records to media.metrics" into oc-dev

7 years agoMediaRecorder: Handle 24-hour timelapse duration
Wonsik Kim [Tue, 28 Mar 2017 20:03:53 +0000 (13:03 -0700)]
MediaRecorder: Handle 24-hour timelapse duration

Handle FPS in double / 64-bit integer and allow room for error.

Bug: 34870132
Test: cts-tradefed run cts-dev --module CtsMediaTestCases --test android.media.cts.MediaRecorderTest
Change-Id: I371d22d9ae70e2d77b08bd6c501e8b34a71592d1

7 years agoMerge "Clearkey plugin didn't handle negative test cases" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 05:29:53 +0000 (05:29 +0000)]
Merge "Clearkey plugin didn't handle negative test cases" into oc-dev

7 years agoMerge "Remove dependency on persist.hal.binderization." into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 03:01:48 +0000 (03:01 +0000)]
Merge "Remove dependency on persist.hal.binderization." into oc-dev

7 years agoMerge "media: Handle STOP action properly." into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 01:15:09 +0000 (01:15 +0000)]
Merge "media: Handle STOP action properly." into oc-dev

7 years agoMerge "libstagefright: Add error handling in mediacodecsource" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 00:40:34 +0000 (00:40 +0000)]
Merge "libstagefright: Add error handling in mediacodecsource" into oc-dev

7 years agolibaaudio: implement getTimestamp for legacy path
Phil Burk [Tue, 28 Mar 2017 17:25:21 +0000 (10:25 -0700)]
libaaudio: implement getTimestamp for legacy path

Fix: 36659408
Test: CTS test_aaudio.cpp
Signed-off-by: Phil Burk <philburk@google.com>
Change-Id: Ic73e69a3747b2daa1df5757650f897a58511e571

7 years agoClearkey plugin didn't handle negative test cases
Jeff Tinker [Thu, 30 Mar 2017 03:42:37 +0000 (20:42 -0700)]
Clearkey plugin didn't handle negative test cases

Part of VTS tests for drm

Change-Id: Ia89aa51ec9018e633fd8b04bfeceb5fe4e631daa
related-to-bug: 32815560

7 years agoMerge "libaaudio: change aaudio_audio_format_t to aaudio_format_t" into oc-dev
Phil Burk [Thu, 30 Mar 2017 22:23:48 +0000 (22:23 +0000)]
Merge "libaaudio: change aaudio_audio_format_t to aaudio_format_t" into oc-dev

7 years agolibstagefright: Add error handling in mediacodecsource
Praveen Chavan [Wed, 24 Aug 2016 07:17:28 +0000 (00:17 -0700)]
libstagefright: Add error handling in mediacodecsource

During camcorder recording, if encoder throws an error,
it intimates error to media codec source.
In such error cases, added functionality to stop puller
and clean up the graph to avoid memory leaks.

Bug: 34870133
Test: Video Recording.

Author: Uma Mehta <umamehta@codeaurora.org>

Change-Id: I487d96f855f541033e8ec7872e86d00bafb96daf

7 years agomedia: Handle STOP action properly.
Hangyu Kuang [Thu, 30 Mar 2017 19:39:38 +0000 (12:39 -0700)]
media: Handle STOP action properly.

Release all buffers and set mEndOfStream when handling STOP action.

Bug: 36682265
Test: Video Recording and MediaRecorder CTS test.
Change-Id: I2f40f0dca4e0b062ab43bfc5e6a646f649fdc524

7 years agoMerge "libeffects: Fix EQ's 5th band upper limit" into oc-dev
TreeHugger Robot [Thu, 30 Mar 2017 19:10:00 +0000 (19:10 +0000)]
Merge "libeffects: Fix EQ's 5th band upper limit" into oc-dev

7 years agoMerge "Allow MediaExtractor to create FileSource" into oc-dev
Andy Hung [Thu, 30 Mar 2017 17:46:39 +0000 (17:46 +0000)]
Merge "Allow MediaExtractor to create FileSource" into oc-dev

7 years agoNuplayer logging empty records to media.metrics
Ray Essick [Mon, 27 Mar 2017 23:35:08 +0000 (16:35 -0700)]
Nuplayer logging empty records to media.metrics

Changes to ensure that nuplayer always reported a particular set
of metrics through android.media.MediaPlayer.getMetrics() changed
the shape of what we should have considered as an empty record.
This caused some noise in the reported media metrics logs.

Also removed a no-longer-wanted ALOGD() diagnostic.

Bug: 36658856
Test: read 'dumpsys media.metrics' output
(cherry picked from commit e4ae17109893b6388299a1f46585fb5d00a0a70e)

Change-Id: I2400e3636bb395aa5f46faf0142b2767f4fad610

7 years agolibeffects: Fix EQ's 5th band upper limit
Mikhail Naganov [Tue, 28 Mar 2017 18:15:20 +0000 (11:15 -0700)]
libeffects: Fix EQ's 5th band upper limit

The old value: "1" is invalid, as follows from the code that
uses these values.

Bug: 36651594
Change-Id: I0516272241ffc1c4d346d8d66b06169b981bae2c
Test: VTS test for Audio Effects
(cherry picked from commit 3cf264448dba3b547babef35b2fc63c13047f491)

7 years agoMerge "Fix reclaim sessions (DO NOT MERGE)" into oc-dev
Rahul Frias [Thu, 30 Mar 2017 01:37:25 +0000 (01:37 +0000)]
Merge "Fix reclaim sessions (DO NOT MERGE)" into oc-dev

7 years agoRemove dependency on persist.hal.binderization.
Pawin Vongmasa [Thu, 30 Mar 2017 00:24:56 +0000 (17:24 -0700)]
Remove dependency on persist.hal.binderization.

Test: Manual use of Camera, Movies, Photos and YouTube apps.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 34274385
Change-Id: I5251fea337f33460d1f0db174cedc465822f2a47

7 years agofix another missing include
Mathias Agopian [Wed, 29 Mar 2017 23:53:45 +0000 (16:53 -0700)]
fix another missing include

Test: built
Bug: 36603618
Change-Id: I3dd55a96fb29e42fc7accb40a471d11a37cb3296

7 years agolibaaudio: change aaudio_audio_format_t to aaudio_format_t
Phil Burk [Tue, 28 Mar 2017 19:48:53 +0000 (12:48 -0700)]
libaaudio: change aaudio_audio_format_t to aaudio_format_t

Test: no functional change, it compiles
Change-Id: I3bdb1472a09ef2a01cbca0b1059257b72a980e1a
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 50a3ad82bcca719eebe71bece07cb4745f5e2c6d)

7 years agoCamera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages
Eino-Ville Talvala [Thu, 23 Mar 2017 22:37:22 +0000 (15:37 -0700)]
Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages

Otherwise some bits aren't where they're supposed to be.

Also stop using HW_CAMERA_ZSL; we need to only set HW_CAMERA_READ, and it's
confusing to set a producer flag on the consumer usage side.

Test: Camera CTS passes
Bug: 35215313
Change-Id: I23e6e60bf875fe9d8f2d7a1f805d2ef854c16b97

7 years agoMerge "fix missing include" into oc-dev
Mathias Agopian [Wed, 29 Mar 2017 20:38:35 +0000 (20:38 +0000)]
Merge "fix missing include" into oc-dev

7 years agoFix reclaim sessions (DO NOT MERGE)
Rahul Frias [Mon, 27 Mar 2017 22:13:30 +0000 (15:13 -0700)]
Fix reclaim sessions (DO NOT MERGE)

[ Merged from master ag/2027840 ]

The SESSION_RECLAIMED event needed to be propagated to the jni native
interface.

Test: Verified by
  com.google.android.media.gts.DrmSessionManagerTest#testReclaimSession
  (GtsMediaTestCases) test

b/36589391

Change-Id: Ia3f17e20be19bc2e7bb88a2354d231917bfce1e8

7 years agoAdd Flag for Enabling 64-bit Media DRM Server
John W. Bruce [Mon, 13 Mar 2017 23:29:28 +0000 (16:29 -0700)]
Add Flag for Enabling 64-bit Media DRM Server

We are ready for devices to begin migrating to a 64-bit Media DRM
Server. However, not all devices are ready to make this jump yet. A
device needs to have all of its DRM Plugins ready to run as 64-bit
before it can do this. This includes having 64-bit hardware
integrations.

So that devices can turn on 64-bit support as they get ready, I am
adding flags that can be set in a device's device.mk file. There are two
parts:

* ENABLE_MEDIADRM_64 enables building the mediadrmserver as 64-bit.

* Setting drm.64bit.enabled=true in PRODUCT_PROPERTY_OVERRIDES switches
  mediadrmserver to searching for DRM Plugins in the 64-bit directory.

Test: Validated that turning on these flags enables a 64-bit
      mediadrmserver that loads 64-bit DRM Plugins from the lib64
      directory (after setting DISABLE_TREBLE_DRM to true to load this
      code as opposed to the Legacy DRM Plugin HAL)
Bug: 36076017
Change-Id: I141cfd57ff75b40c8b0cb40a5bf1439a1ab5b766

7 years agoAllow MediaExtractor to create FileSource
Andy Hung [Thu, 7 Jul 2016 21:20:35 +0000 (14:20 -0700)]
Allow MediaExtractor to create FileSource

Remove binder call to MediaServer for reading files.

Test: Photos, Play Music, Play Movies, Youtube
Bug: 29125703
Change-Id: Id6abf592bf6d70b81158f6038b1982f0a537b9b9

7 years agoMerge changes from topic 'heapbase' into oc-dev
Chong Zhang [Wed, 29 Mar 2017 17:48:02 +0000 (17:48 +0000)]
Merge changes from topic 'heapbase' into oc-dev

* changes:
  DRM: more fixes for heap base mapping -- DO NOT MERGE
  Revert "Revert "Fix decoder instantiation during playback"" -- DO NOT MERGE

7 years agoDRM: more fixes for heap base mapping -- DO NOT MERGE
Chong Zhang [Tue, 28 Mar 2017 21:18:27 +0000 (14:18 -0700)]
DRM: more fixes for heap base mapping -- DO NOT MERGE

Heap base for the same heap could be mapped to different values
after they go across binder to CryptoHal. So we can't use heapbase
to index the heaps.

Since each ACodec instance allocates all its shared memory buffers
from the same memory dealer, we let CryptoHal assign a sequence
number to the ACodec when it calls setHeap. In subsequent calls
to CryptoHal::decrypt, reference the heap by the seq num, and ignore
the heap base address.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Test: the above bugs don't repro

Change-Id: I2f519a689a5891447385d1bf9d6e668bb3b4dbe2

(cherry-picked from bf628da1e231e2e4d6bf61f9884e120bae3f9156)

7 years agoRevert "Revert "Fix decoder instantiation during playback"" -- DO NOT MERGE
Chong Zhang [Tue, 28 Mar 2017 18:02:06 +0000 (11:02 -0700)]
Revert "Revert "Fix decoder instantiation during playback"" -- DO NOT MERGE

This reverts commit de7268d8e20b883ec88a7ff19ad560a665373484.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Change-Id: I8d83305a28dc35cee16f8f1068c90fdd0b9effff
(cherry picked from commit 6aa5c0662c86c7f7b2890577a207086eeecbd177)

7 years agofix missing include
Mathias Agopian [Tue, 28 Mar 2017 02:13:07 +0000 (19:13 -0700)]
fix missing include

Test: built
Bug: 36603618
Change-Id: I836e2458203600768aa199f243206d5e0d9d4d39

7 years agoCamera: Update 'indexOfKey' return check
Emilian Peev [Mon, 27 Mar 2017 12:03:10 +0000 (13:03 +0100)]
Camera: Update 'indexOfKey' return check

Method 'indexOfKey' will return 'NAME_NOT_FOUND' error
status in case it doesn't find any values matching the
given key. Checking for anything other than this error
code could lead to instabilities.

Bug: 35925482
Test: Manual using application
Change-Id: Ie72eb29776b27a6d485f6e42ee7e62c62795ca9e
(cherry picked from commit 4219c290e526c6cb1767038776fff4f9b5d74cc7)

7 years agofix missing include
Mathias Agopian [Tue, 28 Mar 2017 00:47:47 +0000 (17:47 -0700)]
fix missing include

Test: built
Bug: 36603618
Change-Id: I739a13d3072e1fc168479cb26479cdbb4d19c2dc

7 years agoMerge "stagefright: fix casting error in AMessage::findAsInt64"
Lajos Molnar [Mon, 27 Mar 2017 18:04:25 +0000 (18:04 +0000)]
Merge "stagefright: fix casting error in AMessage::findAsInt64"

7 years agoMerge "AudioFlinger: Improve Thread logging."
Andy Hung [Sun, 26 Mar 2017 04:05:26 +0000 (04:05 +0000)]
Merge "AudioFlinger: Improve Thread logging."

7 years agoMerge "Camera: fix FlashLightTest"
TreeHugger Robot [Sat, 25 Mar 2017 20:41:14 +0000 (20:41 +0000)]
Merge "Camera: fix FlashLightTest"

7 years agoAudioFlinger: Improve Thread logging.
Andy Hung [Tue, 21 Mar 2017 19:19:20 +0000 (12:19 -0700)]
AudioFlinger: Improve Thread logging.

Test: dumpsys media.audio_flinger
Bug: 30572472
Change-Id: I43f72354a6ece045f5f9f664946a406166974258

7 years agostagefright: fix casting error in AMessage::findAsInt64
Lajos Molnar [Fri, 24 Mar 2017 23:20:51 +0000 (16:20 -0700)]
stagefright: fix casting error in AMessage::findAsInt64

Change-Id: I7d9452e55611565cc4208d1835872a0de6f5a351

7 years agoMerge "Make CameraStatus::cameraId to use String16."
Oleksiy Vyalov [Fri, 24 Mar 2017 22:49:54 +0000 (22:49 +0000)]
Merge "Make CameraStatus::cameraId to use String16."

7 years agoMerge "Enable CFI for libstagefright_foundation."
TreeHugger Robot [Fri, 24 Mar 2017 21:29:51 +0000 (21:29 +0000)]
Merge "Enable CFI for libstagefright_foundation."

7 years agoMake CameraStatus::cameraId to use String16.
Oleksiy Vyalov [Fri, 24 Mar 2017 21:06:03 +0000 (14:06 -0700)]
Make CameraStatus::cameraId to use String16.

Java strings are passed as UTF16 and attempt to pass cameraId
with alpha symbols via CameraStatus leads either to corrupted
or null strings.

Test: build/flash/boot
Test: verified together with ag/1841664 that alpha camera ids
are passed correctly.

Change-Id: Ic6045322137c156aa03bbcdccfe81f8f0ecb0618

7 years agoCamera: fix FlashLightTest
Yin-Chia Yeh [Thu, 23 Mar 2017 22:26:59 +0000 (15:26 -0700)]
Camera: fix FlashLightTest

Fix issues related Treble HAL1 path.

Test: FlashLightTest pass on Angler HAL1/module 1.0
Bug: 35674539
Change-Id: I6bd749464c0e6e437a4743d2d66a0a5f54cdba38

7 years agostagefright: add support for named vendor extension parameters for MediaCodec
Lajos Molnar [Fri, 17 Mar 2017 21:31:33 +0000 (14:31 -0700)]
stagefright: add support for named vendor extension parameters for MediaCodec

Relay vendor extension params to the component and populate vendor extension
parameters to the format. Failure to set these parameters is propagated to
the caller. Component may decide whether to fail on invalid/incomplete
settings.

Also add required support:

- propagate more errors from OMX to client, and be specific about
errors we ignore in MediaCodec.configure().
- add AMessage::findAsInt64

Bug: 32746650
Change-Id: I67ee8a5c1d3e65816cdadc28d228721925e2e327

7 years agoEnable CFI for libstagefright_foundation.
Vishwath Mohan [Sat, 11 Mar 2017 18:11:38 +0000 (10:11 -0800)]
Enable CFI for libstagefright_foundation.

Adds CFI (and diagnostics for it) to libstagefright_foundation.

Bug: 36219323
Test: ENABLE_CFI=true m -j40 # builds and device boots

7 years agoMerge "NdkMediaCodec: add AMediaCodec_signalEndOfInputStream"
TreeHugger Robot [Thu, 23 Mar 2017 22:56:25 +0000 (22:56 +0000)]
Merge "NdkMediaCodec: add AMediaCodec_signalEndOfInputStream"

7 years agoMerge "NdkMediaCodec: expose surface APIs in manifest"
TreeHugger Robot [Thu, 23 Mar 2017 22:56:25 +0000 (22:56 +0000)]
Merge "NdkMediaCodec: expose surface APIs in manifest"

7 years agoMerge "Revert "ACodec: update native window crop rectangle""
TreeHugger Robot [Thu, 23 Mar 2017 21:11:15 +0000 (21:11 +0000)]
Merge "Revert "ACodec: update native window crop rectangle""

7 years agoRevert "ACodec: update native window crop rectangle"
Wonsik Kim [Thu, 23 Mar 2017 18:44:16 +0000 (11:44 -0700)]
Revert "ACodec: update native window crop rectangle"

This reverts commit c7b2b233d26e80ecf823078a7504e458ba9efe8c.

Fix: 36553910
Fix: 36541617
Test: manual
Change-Id: I5f0023dee45bd9d574ef9a27c3456ca40ed75f0a

7 years agoNdkMediaCodec: add AMediaCodec_signalEndOfInputStream
Robert Shih [Mon, 20 Mar 2017 23:45:37 +0000 (16:45 -0700)]
NdkMediaCodec: add AMediaCodec_signalEndOfInputStream

Bug: 32746065
Change-Id: I20cdb02a93dfffdb2379db885f50738fb3a502d9

7 years agoMerge "stagefright: properly handle crypto object reset"
TreeHugger Robot [Thu, 23 Mar 2017 18:49:29 +0000 (18:49 +0000)]
Merge "stagefright: properly handle crypto object reset"

7 years agoNdkMediaCodec: expose surface APIs in manifest
Robert Shih [Mon, 20 Mar 2017 23:46:34 +0000 (16:46 -0700)]
NdkMediaCodec: expose surface APIs in manifest

Bug: 32746065
Change-Id: Ie2c9ce33c839f38fffb1d96f92a773b1c3357249

7 years agostagefright: properly handle crypto object reset
Wonsik Kim [Thu, 23 Mar 2017 16:09:37 +0000 (09:09 -0700)]
stagefright: properly handle crypto object reset

Bug: 36449774
Test: Run PoC in the bug
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content on Play Movies
Change-Id: Ia7b38ed586460ad51fa66a6959211a7dfffa3493

7 years agoMerge "Add support for USB headset device"
TreeHugger Robot [Thu, 23 Mar 2017 02:22:49 +0000 (02:22 +0000)]
Merge "Add support for USB headset device"

7 years agoMerge changes from topic 'preview_video_surface_share'
TreeHugger Robot [Thu, 23 Mar 2017 02:21:27 +0000 (02:21 +0000)]
Merge changes from topic 'preview_video_surface_share'

* changes:
  Camera: Do not crash if detachNextBuffer fails
  Camera: Allow different kinds of IMPLEMENTATION_DEFINED surfaces to share

7 years agoMerge changes from topic 'ims-o'
Robert Shih [Wed, 22 Mar 2017 23:50:02 +0000 (23:50 +0000)]
Merge changes from topic 'ims-o'

* changes:
  NdkMediaCodec: implement setParameters to signal dynamic parameters
  NdkMediaCodec: implement createPersistenInputSurface and setInputSurface
  NdkMediaCodec: implement createInputSurface

7 years agoAdd support for USB headset device
Eric Laurent [Sat, 18 Mar 2017 00:20:47 +0000 (17:20 -0700)]
Add support for USB headset device

Add missing rules for USB headset devices in routing, volume and effects
management.

Test: playback and catpure regression tests.
Change-Id: I42cd157f483deba2371a05d332cd11dceb2b2fa3

7 years agoMerge "ACodec: update native window crop rectangle"
TreeHugger Robot [Wed, 22 Mar 2017 20:26:51 +0000 (20:26 +0000)]
Merge "ACodec: update native window crop rectangle"

7 years agoACodec: update native window crop rectangle
Santhosh Behara [Fri, 17 Feb 2017 11:11:16 +0000 (03:11 -0800)]
ACodec: update native window crop rectangle

In setupNativeWindowSizeFormatAndUsage, set the crop rectangle
with the output port's crop value.

Fix: 34869730
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: I415be069d02d88dcd6b7c2460dda6df191ee7434

7 years agoMerge "MediaRecorderClient: Fix binder dereference while connecting to camera"
Wonsik Kim [Wed, 22 Mar 2017 18:02:38 +0000 (18:02 +0000)]
Merge "MediaRecorderClient: Fix binder dereference while connecting to camera"

7 years agoMerge "NBLog exchange author and timestamp positions in log"
Nicolas Roulet [Wed, 22 Mar 2017 17:42:35 +0000 (17:42 +0000)]
Merge "NBLog exchange author and timestamp positions in log"

7 years agoMerge "Move mediacodec to vendor partition."
TreeHugger Robot [Wed, 22 Mar 2017 06:15:34 +0000 (06:15 +0000)]
Merge "Move mediacodec to vendor partition."

7 years agoMerge "Revert "Fix decoder instantiation during playback""
Jeff Tinker [Wed, 22 Mar 2017 00:05:17 +0000 (00:05 +0000)]
Merge "Revert "Fix decoder instantiation during playback""

7 years agoRevert "Fix decoder instantiation during playback"
Jeff Tinker [Tue, 21 Mar 2017 23:49:15 +0000 (23:49 +0000)]
Revert "Fix decoder instantiation during playback"

This reverts commit 33327c7f0f04bcce3f8e8ee23953f87efc423037.

Bug: 36479980
Bug: 36209723

Change-Id: I8ff9422086f5ba9ba5df60135d20b9d8bfc0be52

7 years agoMerge "media: Fix a bug in recording pause/resume."
TreeHugger Robot [Tue, 21 Mar 2017 22:17:14 +0000 (22:17 +0000)]
Merge "media: Fix a bug in recording pause/resume."

7 years agomedia: Fix a bug in recording pause/resume.
Hangyu Kuang [Mon, 20 Mar 2017 23:15:37 +0000 (16:15 -0700)]
media: Fix a bug in recording pause/resume.

Bug:35950379
Test: Camera recording and keep pause, resume, pause...
Change-Id: I5c81016e51f40e36430553990724fef3ccb23bb5

7 years agoCamera: Do not crash if detachNextBuffer fails
Shuzhen Wang [Wed, 15 Mar 2017 17:51:27 +0000 (10:51 -0700)]
Camera: Do not crash if detachNextBuffer fails

Test: Camera CTS
Bug: 33777818
Change-Id: I965d741df6ce6bdb701dbe1d721cf42ea53c7a40

7 years agoCamera: Allow different kinds of IMPLEMENTATION_DEFINED surfaces to share
Shuzhen Wang [Tue, 21 Feb 2017 01:10:28 +0000 (17:10 -0800)]
Camera: Allow different kinds of IMPLEMENTATION_DEFINED surfaces to share

Do not guard against mismatching usage flag and data space for
IMPLEMENTATION_DEFINED formats, so that different formats can share
the same stream if HAL support is available.

Test: Camera CTS
Bug: 33777818
Change-Id: I62a1f458c06ae417c9a2c407d433319a1158fdcc

7 years agoRegister new NDK API
Jiwen 'Steve' Cai [Thu, 2 Mar 2017 02:03:59 +0000 (18:03 -0800)]
Register new NDK API

Bug: 35114769
Test: Build and CTS (android.media.cts.NativeImageReaderTest)
Change-Id: I8ecad0b30dd5621d41e9d337d63abed234dbbabe

7 years agoImplementing new NdkImageReader APIs
Jiwen 'Steve' Cai [Tue, 21 Feb 2017 00:59:05 +0000 (16:59 -0800)]
Implementing new NdkImageReader APIs

Bug: 35114769
Test: Build (should have no functional change from headers change), and
      run CTS test CtsNativeImageReaderTestCases on a Pixel.
Change-Id: Icb40196363d9f10a5d853c17f0bc378b6c27b3f6

7 years agoExtending AImage/AImageReader headers
Jiwen 'Steve' Cai [Thu, 9 Feb 2017 21:36:13 +0000 (13:36 -0800)]
Extending AImage/AImageReader headers

This introduces new API that allows AHardwareBuffer access via
AImage/AImageReader.

Bug: 35114769
Test: Build (should have no functional change from headers change), and
existing CTS tests run using cts-tradefed on a Pixel.

Change-Id: I7b6505ca3b9489d86eb564d1ae5707fd3fa25668

7 years agoseccomp-x86: allow sched_yield and gettid syscalls
Luis Hector Chavez [Mon, 20 Mar 2017 20:04:16 +0000 (13:04 -0700)]
seccomp-x86: allow sched_yield and gettid syscalls

Addresses:
media.extractor: libminijail: blocked syscall: sched_yield, gettid

Bug: None
Test: make USE_CLANG_PLATFORM_BUILD:=true SANITIZE_TARGET=address -j42
      media extractor complains no more.
Change-Id: I3d499b0400df10ede08801fe6b608e6003727734

7 years agoMerge "audiohal: Exit instead of crashing when HAL factory can't be obtained"
TreeHugger Robot [Mon, 20 Mar 2017 19:35:19 +0000 (19:35 +0000)]
Merge "audiohal: Exit instead of crashing when HAL factory can't be obtained"

7 years agoaudiohal: Exit instead of crashing when HAL factory can't be obtained
Mikhail Naganov [Mon, 20 Mar 2017 17:58:07 +0000 (10:58 -0700)]
audiohal: Exit instead of crashing when HAL factory can't be obtained

Replace LOG_ALWAYS_FATAL with ALOGE + exit, so the process still
restarts, but without a crash. This avoids confusion in bug triaging
and also helps to eliminate noise in bug reports statistics.

Bug: 36424777
Change-Id: I623cbc6a5b0d3351f849810dd67708d421efd61a
Test: reproduced error condition, checked that audio server restarts

7 years agoMediaRecorderClient: Fix binder dereference while connecting to camera
Mahesh Lanka [Tue, 31 Jan 2017 12:52:57 +0000 (18:22 +0530)]
MediaRecorderClient: Fix binder dereference while connecting to camera

IServiceManager.getService can return NULL. Check for NULL and
return NO_INIT on failure.

Bug: 34870127
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: I6d71f8c0e89a556e64f5250ba1ab742e485f1ebc