1240 Commits

Author SHA1 Message Date
Edwin Wong
e9b8348027 Merge "Pass application packagename to drm plugin." 2017-01-31 05:03:44 +00:00
Hassan Shojania
0b52e95c3f Modular DRM for MediaPlayer
Bug:  34559906
Test: Manual through the test app

Change-Id: If76e2898e6064c5661193872b907b1720838c678
2017-01-27 19:03:09 -08:00
Ray Essick
0e0fee1e3a API access to mediametrics
provide SDK/API access to media metrics for user apps. This lets the
apps metrics data for their instances of player and codecs. Others
to come.

Bug: 34715803
Test: booted, invoked new APIs to verify desired results
Change-Id: Iaae6406aadef30adc893952961ac154a7c4c761d
2017-01-27 17:58:30 +00:00
TreeHugger Robot
60d820b050 Merge "media: Add new MediaMuxer constructor that takes FileDescriptor." 2017-01-26 08:22:01 +00:00
Hangyu Kuang
61c74c6a4b media: Add new MediaMuxer constructor that takes FileDescriptor.
Test: Run new mediamuxer CTS test.
Bug: 34221063
Change-Id: Iaad4f0254782dca3e5994e80af0848482847c618
2017-01-25 18:31:02 -08:00
Wei Jia
23dfee521a mediaplayer: add buffering settings API
Test: compiles, ensured that params is passed all the way to source
Bug:32524218

Change-Id: I90d65e10012ecc1a78989eba80d025d513ceaadf
2017-01-25 11:54:56 -08:00
Jerry Zhang
13bb2f4dda Add support for MTP perceived device type property.
Property value is based on the particular device.
This allows some hosts (windows) to apply a device
specific icon in file explorer.

Test: Connect device to windows, verify new icon
Bug: 25360563
Change-Id: I9d3468ca8c01a6f0d42ad543aef11ed265b6c825
2017-01-19 11:26:35 -08:00
Hangyu Kuang
e176ee1222 media: Add new API to set next output file.
Only support recording to MP4 file now. When the recorded file is approcaching
file size limit, application will receive
MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING callback from mediarecorder.
Application could use setNextOutputFile to set the next output file before or
after receiving this callback. Upon reaching filesize limit, recorder will swap
the output file internally and notify application with
MEDIA_RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED.

Test: Hack camera app to record more than filesize limit.
Bug: 28150626
Change-Id: I2daf8f798fe3631d6b7ef48ebea3a64ab4566f2d
2017-01-18 17:32:17 -08:00
Edwin Wong
4d1d84e8a0 Pass application packagename to drm plugin.
Get the application packagename to be used as part of a unique
identifier for drm plugin.

Test: Stream movies through Play Movies, Netflix and
Gts MediaCodecCencPlayer tests.
Verify the application's packagename is reachable in the drm plugin's
debug log.

bug: 27101531

Change-Id: I6473b58d78bc34191aca5896bb1f5fb79107ae47
2017-01-07 23:59:40 -08:00
Alex Klyubin
f271c6d266 resolve merge conflicts of b53d984 to master
Change-Id: I3fe63a5c0193c720b8ec4ca53834096de8433f26
2016-12-22 12:00:24 -08:00
Alex Klyubin
abdc2b47b3 Make users of MtpServer fill in DeviceInfo field values
This is part of weaning apps off accessing system identifiers via
system properties API. Apps should use android.os.Build API instead.

Bug: 33700679
Test: Enable MTP mode then check that mtp-detect output same as before this commit
Change-Id: I4e6696cdee18b9c3e987c432c095911e85a997db
2016-12-21 13:56:28 -08:00
Jerry Zhang
d9291d55f6 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." am: 1975240f17 am: 830874dbe7 am: 88672d7d29
am: 11dc0eccfb

Change-Id: Ibafebe4877052595cb34626bde9ac6fba1983fb0
2016-12-13 01:02:55 +00:00
Jerry Zhang
bb598ee16f Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers.
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.

Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
2016-12-12 11:05:32 -08:00
Wei Jia
400752a790 Merge "MediaPlayer: enable same seek modes as in MediaMetadataRetriever." 2016-12-01 22:08:11 +00:00
Wei Jia
ebc2b694d1 MediaPlayer: enable same seek modes as in MediaMetadataRetriever.
Test: manually check result of mediaplayer.seekTo
Bug: 32557491
Change-Id: Ib507fbfb86a24fcf9b42758e89e595a4a58d33b5
2016-12-01 12:32:34 -08:00
Marco Nelissen
7e5e1b0d72 No need to initialize the file sniffers anymore
Bug: 33166870

Change-Id: I9f944fcb7d63ca4eb31aec5e7e97e3e0e499cc39
2016-11-28 19:05:32 +00:00
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
618c1a9ae6 Merge "Make AmrInputStream use MediaCodec"
am: 866658261f

Change-Id: Id25833efb8baa54e729bdc823e5849819c53cd64
2016-11-11 20:10:00 +00:00
Marco Nelissen
01d023e966 Make AmrInputStream use MediaCodec
Bug: 32114618
Test: ran CTS test
Change-Id: I9fe77689bf0bcd1bc8f6c5a4d62135271c7bef8b
2016-11-11 10:53:09 -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
1d10b88f40 Merge "Use libaudioclient"
am: 0a05c49248

Change-Id: I134c9c5b95e446fcc18e2b35a3eca2a4a794e8c8
2016-11-07 17:22:36 +00:00
Marco Nelissen
74abdda6a0 Use libaudioclient
Test: build/boot
Change-Id: I7c730bfd47297f311e00798b5927888ddc3f5062
2016-11-04 19:31:54 -07:00
Marco Nelissen
9a9e54cfb7 Merge "Use libaudioclient" 2016-11-04 21:53:57 +00:00
John Reck
946d11d216 Merge "Re-unite sources with their headers"
am: e43444a00b

Change-Id: I8f3ef6a1ddcf78d28f7444b6e83c552b8305fd8c
2016-11-04 21:47:34 +00:00
John Reck
03b5d506bc 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
Merged-In: Ic4312eb61b197af114dded5691d5ae1ec82923f7
(cherry picked from commit f6113af2d6f6eebee68d3ac510fe96d38a7a39e9)
2016-11-04 13:27:37 -07: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
Eino-Ville Talvala
e175aa82b5 DO NOT MERGE ANYWHERE: 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 reallocation 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-09-09 15:11:56 -07: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