1067 Commits

Author SHA1 Message Date
Jean-Michel Trivi
8e48c6939b Refactor SoundPool for appOps handling through PlayerBase
Modified the signature of the abstract volume methods so
  it is clear at the subclass level whether the volume
  command is for a mute or a volume control.
  Changed the implementations in the subclasses
  accordingly.
Removed appOps handling inside SoundPool and made it
  inherit from PlayerBase.
Moved handling of the camera sound restriction from
  SoundPool to PlayerBase.
Added support in SoundPool native implementation for
  muting, as each player has its own volume.

Test: play a long file with SoundPool and enter DnD mode

Bug: 30955183
Bug: 28249605

Change-Id: I0fcd7480f9a455c06aa4f7092486f5c65bc9d7db
2016-11-14 09:36:11 -08:00
Marco Nelissen
2a6aae0857 Drm APIs are in libmediadrm instead of libmedia
Test: build/boot
Change-Id: I4a6929d2d524d5f2f7ffa06f68a3c1041804e125
2016-11-07 16:37:06 -08:00
Marco Nelissen
9a9e54cfb7 Merge "Use libaudioclient" 2016-11-04 21:53:57 +00:00
John Reck
f6113af2d6 Re-unite sources with their headers
Move all the includes for androidfw under
a common base path for that library instead
of frameworks/base/includes.

Also fixes -Werror issues that resulted in
no longer being -isystem.

Test: builds
Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7
2016-11-03 16:26:59 -07:00
Marco Nelissen
20edcbc89c Use libaudioclient
Test: build/boot
Change-Id: I7c730bfd47297f311e00798b5927888ddc3f5062
2016-11-03 10:58:33 -07:00
Marco Nelissen
b3a22bcb76 Remove unneeded libraries from libmedia_jni
Test: built and booted
Change-Id: I9bd8dd0001688eabc0d58563b652eb11a69efba8
2016-10-26 21:20:49 +00:00
Mikhail Naganov
c7555a0871 Merge "Split audio effects headers" 2016-10-17 22:22:52 +00:00
Philip P. Moltmann
b828b77985 Properly close USB device connection in Mtp device
Test: Built
Fixes: 32073045
Change-Id: I05179377532c1bd4dff1f4a4e0e837cb645317e3
2016-10-17 11:19:58 -07:00
Mikhail Naganov
49cc2c8483 Split audio effects headers
There can be different use cases with the code that imports
headers from audio_effects (each subsequent case is a more
specialized version of the previous one):

  1. The code only needs access to general structures
     like effect_descriptor_t:
     ==> include system/audio_effect.h
     Example: AudioSystem in libmedia

  2. The code that needs access to effect UUID and parameter
     enums:
     ==> include system/audio_effects/effect_foo.h
     Examples: media framework effects interfaces, libwilhelm

  3. The code that needs to call into HAL:
     ==> include hardware/audio_effect.h
     Examples: libaudiohal (implementation part) and libeffects

  4. The code that implements a particular effect:
     ==> include audio_effects/effect_foo.h
     Examples: cts/.../CTSTestEffect.cpp
               stuff in hardware/, vendor/

Change-Id: I201dfa20ddc7aac797fd35934c0f06658f1e60be
Test: make
2016-10-14 15:31:35 -07:00
Marco Nelissen
e1a81fcc65 Make AmrInputStream use MediaCodec
Bug: 32114618
Test: ran CTS test
Change-Id: I9fe77689bf0bcd1bc8f6c5a4d62135271c7bef8b
2016-10-14 14:52:10 +00:00
Glenn Kasten
5608a200ca Merge "Use AUDIO_IO_HANDLE_NONE instead of 0" 2016-10-05 17:35:37 +00:00
Colin Cross
a543ca6c05 Merge "Fix struct vs. class mismatch in forward definitions" am: 8f1011d584 am: 6d0b466935 am: 95311818f0
am: e9b5b70114

Change-Id: I80205377a19c45927a11fc14ab72c13a7479570b
2016-10-03 20:35:12 +00:00
Colin Cross
e9b5b70114 Merge "Fix struct vs. class mismatch in forward definitions" am: 8f1011d584 am: 6d0b466935
am: 95311818f0

Change-Id: I45b57d37d08699afc070699d07485cb83c51850a
2016-10-03 20:32:01 +00:00
Colin Cross
95311818f0 Merge "Fix struct vs. class mismatch in forward definitions" am: 8f1011d584
am: 6d0b466935

Change-Id: I9602684e0ac91f7c08dafe70309433bb233ceeaf
2016-10-03 20:27:46 +00:00
Colin Cross
08f5f1f03a Fix struct vs. class mismatch in forward definitions
The warnings were being hidden by the use of -isystem to include
frameworks/native/include.

Bug: 31752268
Test: m -j
Change-Id: Ib7227295e7b94c79cdc52e19c71be4066a11cedc
2016-09-30 21:07:26 -07:00
Wonsik Kim
4273dd03a8 MediaCodec refactoring part 1-a: buffers become separate class
MediaCodecBuffer is meant to replace ABuffer and MediaBuffer in
communication between framework components. As the first step, replace
use of ABuffer in MediaCodec with MediaCodecBuffer, and adjust related
classes accordingly.

MediaCodec.getBuffer() and related APIs now returns MediaCodecBuffers;
thus change MediaCodec clients to use MediaCodecBuffer accordingly.

Test: manually tested for key use cases (Camera, YouTube and Play Movies)
Change-Id: Iba7ce131645e75ce5ddbf497fb793ab38b7f245b
2016-09-30 20:07:04 +09:00
rago
de1fb0bbb8 resolve merge conflicts of a80bdc3 to nyc-mr1-dev-plus-aosp
am: addb7af2c0

Change-Id: I1ec6f29ee51d575002a50b305c2ac4a87afc5c3e
2016-09-16 01:49:47 +00:00
rago
addb7af2c0 resolve merge conflicts of a80bdc3 to nyc-mr1-dev-plus-aosp
Change-Id: If5b6322e611cc1171f767d48001d9672bfd0024d
2016-09-15 18:38:16 -07:00
rago
8dc9afa966 Fix scope for visualizer object release
Bug: 30684284
Change-Id: I4170511c6c7f36aa1bce3e439054bc6b8a4a2623
2016-09-15 12:12:27 -07:00
Chih-hung Hsieh
0c712a9ede Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c am: d1dd5ae76b am: 68b9ebcd59
am: da6d274a7d

Change-Id: I87b449706cc87c9e9ca722f483d23d40729da7e1
2016-09-14 04:56:58 +00:00
Chih-hung Hsieh
da6d274a7d Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c am: d1dd5ae76b
am: 68b9ebcd59

Change-Id: I49a2d607d1d0adfe5a4297a83771336c4cd9c870
2016-09-10 17:26:10 +00:00
Chih-hung Hsieh
68b9ebcd59 Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c
am: d1dd5ae76b

Change-Id: I71778eb5a253ebf5342f863d34e178513d386783
2016-09-10 17:20:37 +00:00
Chih-hung Hsieh
5e91082b3c Merge "Fix google-explicit-constructor warnings in media utils." 2016-09-10 17:07:53 +00:00
Chih-hung Hsieh
20651bc467 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c am: 17f1fc6c76 am: c80db139b3
am: cb98cac6d3

Change-Id: Id22ce0c86caa79f2eabf4201f6a0267d13270a00
2016-08-31 23:35:35 +00:00
Chih-hung Hsieh
cb98cac6d3 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c am: 17f1fc6c76
am: c80db139b3

Change-Id: I6a5f93e80d4ef18286fcb45987b6f9bbd7425f88
2016-08-30 22:50:14 +00:00
Chih-hung Hsieh
c80db139b3 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c
am: 17f1fc6c76

Change-Id: If968940949e97633e99832a3edc1d3003662dac2
2016-08-30 22:41:26 +00:00
Chih-Hung Hsieh
ae1aadc04f Fix google-explicit-constructor warnings in soundpool.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id1183b2929242cdf1fd0a1558d0e70194a1de9bb
2016-08-29 14:53:50 -07:00
Chih-Hung Hsieh
bd42349f7e Fix google-explicit-constructor warnings in media utils.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I13958693f28fae9016124a43cd211e5302ed8d51
2016-08-29 14:49:57 -07:00
Glenn Kasten
87e901ccca Use AUDIO_IO_HANDLE_NONE instead of 0
since parameter type is audio_io_handle_t

Change-Id: Ic556df530148b8390d56b0fc2d2a2d71e12b3ca9
2016-08-16 14:14:27 -07:00
Jin Park
0dd9e9cac8 ExifInterface: Remove JNI code
This CL finalizes porting piex into ExifInterface by removing JNI
methods and class as well as methods handling data received from
JNI method calls.

Bug: 29409358
Change-Id: I8f6c761e50cb29476dc0784f58908ec35e3c70e9
2016-08-10 11:49:20 +09:00
Eino-Ville Talvala
4158f4a323 ImageReader: Add discardFreeBuffers method am: 2e2aaf6e04
am: bc20c106df

Change-Id: I215c711f13531821907cd442b2aca707f46bd87d
2016-07-22 22:07:18 +00:00
Eino-Ville Talvala
bc20c106df ImageReader: Add discardFreeBuffers method
am: 2e2aaf6e04

Change-Id: I142f1b011a045aa0f5af7c33eb76b059eb67e30d
2016-07-22 21:52:51 +00:00
Eino-Ville Talvala
2e2aaf6e04 ImageReader: Add discardFreeBuffers method
This method (currently @hide) discards all cached buffers for
the ImageReader, which can be useful to free up memory at the
cost of reallocationt time if more buffers are needed later.

It has no effect on acquired Images, filled Images waiting to be
acquired, or buffers being actively used by the source rendering to the
Surface.

Bug: 28695173
Change-Id: I427a8ba4ad73a267083f843dbf228bfc53a730d9
2016-07-21 17:04:19 -07:00
Jin Seok Park
f635d5b83a Merge "ExifInterface: Remove unnecessary logging of exceptions" 2016-07-21 02:43:48 +00:00
Jin Park
68bda838d0 ExifInterface: Remove unnecessary logging of exceptions
ExifInterface currently logs exceptions when it encounters invalid
markers and when the file format is unsupported by Piex Library.
This CL suppresses such logs with the DEBUG marker.

Bug: 30252745
Change-Id: Ia69183eaa5bf7ac2ff1dc95c0919b23b4a9f8c4e
2016-07-21 10:27:57 +09:00
Robert Shih
04167d34f5 android_media_MediaRecorder: NULL check after getMediaRecorder
Bug: 22416023
Change-Id: I47cc0c5750722735ab11cbc408f2d28c4d4bdd2f
2016-07-18 13:41:32 -07:00
Wei Jia
44d76c7a72 Merge \"MediaDataSource: add DrmInitialization for IDataSource.\" into nyc-dev
am: 9604b3803c

Change-Id: Ibbb2272be91fb6c79795566cb9928bfb8adde002
2016-07-14 01:14:42 +00:00
Wei Jia
509cbb6385 MediaDataSource: add DrmInitialization for IDataSource.
Bug: 29342399
Bug: 28901867
Change-Id: Ib2049566582aa08783ff588dd25afef4e1c0b5e2
(cherry picked from commit a03dc2b5eb94a906eeeda5bf0afbcfb60588abb4)
2016-07-13 23:24:20 +00:00
Wei Jia
0474f567ba Merge \\"MediaDataSource: add DrmInitialization for IDataSource.\\" into nyc-mr1-dev am: e7982e05f6
am: 47efffff85

Change-Id: I49c99beced2fefd0dd9f1ce8e7365e60c0834a7e
2016-07-13 02:15:42 +00:00
Wei Jia
47efffff85 Merge \"MediaDataSource: add DrmInitialization for IDataSource.\" into nyc-mr1-dev
am: e7982e05f6

Change-Id: I7376c0f985f1a625190481e134b24501e26ab7d2
2016-07-13 02:09:07 +00:00
Wei Jia
a03dc2b5eb MediaDataSource: add DrmInitialization for IDataSource.
Bug: 29342399
Bug: 28901867
Change-Id: Ib2049566582aa08783ff588dd25afef4e1c0b5e2
2016-07-13 00:11:36 +00:00
Daichi Hirono
452e8fe559 Add NonNull and Nullable annotations to MtpDevice.
BUG=26758882

Change-Id: I5fa7130b671c71aefca848c109bf37389f57b9da
2016-07-05 17:29:48 +09:00
Yujie Qin
d09b020ce5 Merge \"Report error correctly for the implementation of StreamInterface::GetData()\" into nyc-dev
am: e09415344d

Change-Id: Id85ebdb2541c6145da39cf20684f85728f2ba0b6
2016-06-16 20:05:17 +00:00
Yujie Qin
cad1666867 Report error correctly for the implementation of
StreamInterface::GetData()

Bug: 28889197
Change-Id: Id07755e1b3637f85b6176a59935ad3a5597cfb05
2016-06-16 11:42:41 +02:00
Eric Laurent
c8e1206ad5 Merge "Delete Visualizer before lpJniStorage" am: 03c209b2a3
am: 913e2f83b2

* commit '913e2f83b223486ac1461dab86758848f9ad08e1':
  Delete Visualizer before lpJniStorage

Change-Id: I76aa735d8f0a100e0e106050c90966bd003235bc
2016-06-07 18:13:09 +00:00
ganxiaolin
7b9f5be914 Delete Visualizer before lpJniStorage
It is related to Change: Id17bea8a6ca7132042b9bfefed398a715c139be7
Fix ANR because of bug of Visualizer.
If lpJniStorage was delete first, callback_data_lock become a invalid value.
At mReceiver.periodicCapture() in CaptureThread, it will lock callback_data_lock.
Thus, CaptureThread will wait a invalid memory forever and visualizer wait CaptureThread exiting and causing ANR.

Signed-off-by: ganxiaolin <ganxiaolin@xiaomi.com>
2016-06-06 11:09:05 +08:00
Chih-Hung Hsieh
0b5608015b Merge "Fix misc-macro-parentheses warnings in audio media jni." am: 9ecb10d1b5
am: ca3f49d594

* commit 'ca3f49d594f5c00e6b5d6817bcdb0af02e7224e6':
  Fix misc-macro-parentheses warnings in audio media jni.

Change-Id: I3828c9720f7fe91bc60058daeca2d598f0302d32
2016-05-24 18:56:37 +00:00
Chih-Hung Hsieh
0ca16ef3b8 Fix misc-macro-parentheses warnings in audio media jni.
Bug: 28705665
Change-Id: Iff476943a0a2c2ae68778d1f4bca5d3e9e04bd26
2016-05-19 15:14:54 -07:00
Wei Jia
613dc4cc1d Merge "android_media_MediaSync: Do not pass NULL to AString ctor." into nyc-dev
am: c4e8471ba4

* commit 'c4e8471ba4afb0d2cae0d9e29f5c14b4bbfe4524':
  android_media_MediaSync: Do not pass NULL to AString ctor.

Change-Id: Id138df3cfe1ee989d4abf52ae283b63419e7047a
2016-05-17 21:39:01 +00:00
Wei Jia
838a4ed101 android_media_MediaSync: Do not pass NULL to AString ctor.
Bug: 28643582
Change-Id: I75eaf61007adffdd7e3b07aebb37c12a8e71cf75
2016-05-16 17:40:02 -07:00