1240 Commits

Author SHA1 Message Date
Wei Jia
c3c31a5382 MediaPlayer2: move MediaPlayer2 native code to libmediaplayer2
Test: MediaPlayer2 plays
Bug: 63934228
Change-Id: Ie674b01b6e839d5ca0af76d8b712c395da64b57a
2018-02-05 16:18:27 -08:00
TreeHugger Robot
94baed8b7c Merge "MediaPlayer2: add native DataSourceDesc." 2018-02-02 18:45:49 +00:00
TreeHugger Robot
677fb050f7 Merge "MediaPlayer2: remove setRetransmitEndpoint" 2018-02-02 07:03:10 +00:00
Wei Jia
23c46f88eb MediaPlayer2: remove setRetransmitEndpoint
Test: MediaPlayer2 plays
Bug: 63934228
Change-Id: Ifc5ef24175405acde6c65af51c7e85d2bfc01f87
2018-02-01 18:36:46 -08:00
Wei Jia
913074c074 MediaPlayer2: add native DataSourceDesc.
Test: MediaPlayer2 plays.
Bug: 63934228
Change-Id: I3ebfd183cb3c817de3b3bcbe583e4351bf4f5734
2018-02-01 10:42:58 -08:00
Mikhail Naganov
29f479d502 Merge "Add audio presentation interface to Java API" 2018-02-01 16:46:07 +00:00
TreeHugger Robot
faf852539a Merge "Support query active microphones in MediaRecorder." 2018-02-01 07:52:55 +00:00
Dongwon Kang
caa83bcf33 Merge "MetaData now lives in libmediaextractor" 2018-01-31 00:08:59 +00:00
TreeHugger Robot
0bdcee3b45 Merge "Add new secure stop methods" 2018-01-30 02:16:44 +00:00
TreeHugger Robot
be3d0d5ee4 Merge "Clean up MediaMetadataRetriever use" 2018-01-29 21:33:20 +00:00
Marco Nelissen
4045a06d21 MetaData now lives in libmediaextractor
Bug: 67908544
Test: build, boot
Change-Id: Ied00ea8f51ad7adad7a4384d416508d22ec9a31c
2018-01-29 11:29:09 -08:00
jiabin
589f6a299e Support query active microphones in MediaRecorder.
This is part of device enumeration. With the new add API, developer
could get the active microphones information for each channel.

Bug: 64038649
Test: Run cts and check the print log.
Change-Id: I6de3339add858cb1f6b7f948995bd013570d4260
2018-01-26 17:53:43 -08:00
Previr Rangroo
58822bec4e Add audio presentation interface to Java API
In order to enable applications to query audio sub-selection
information of one audio programme delivered by Next Generation Audio
streams, implement presentation API in MediaExtractor.

Bug: 63901775
Test: make
Change-Id: I2b0bfc5d1089614aa93d58fec99324d7a0ed464b
Signed-off-by: Previr Rangroo <prang@dolby.com>
2018-01-26 15:49:57 -08:00
Jeff Tinker
1bfb3d2160 Add new secure stop methods
Methods are needed to release a secure stop by ID and
return a list of secure stops.

Test: gts media tests

bug:67361434
bug:64001680
Change-Id: Id35fb082175a0b152e7a6032b147f1d3b221719b
2018-01-26 10:39:17 -08:00
TreeHugger Robot
839c570b20 Merge "MediaPlayer2: remove unused methods" 2018-01-25 22:58:15 +00:00
Robert Shih
54573c5971 Merge "MediaExtractor: getSampleSize API" 2018-01-25 21:27:39 +00:00
Wei Jia
04a6e93ef7 MediaPlayer2: remove unused methods
Also use shared lib of libutils.
Test: MediaPlayer2 plays
Bug: 63934228
Change-Id: I6f4f4e927cccd11a0e43c84347bcdc4e3a3b88de
2018-01-25 12:29:10 -08:00
Ray Essick
510225b5ef add getMetrics() apis for AudioTrack and AudioRecord
add getMetrics() method to access media.metrics for AudioTrack and
AudioRecord. Includes the code paths and the sdk documentation
for the keys and what they return.

Moves the media metrics JNI support routines from media to core
to support these audiotrack/record operations being there; still
accessible to the existing operations in the media libraries.

Bug: 72179020
Bug: 72178968
Test: enhanced CTS
Change-Id: I3f05beba31aacb9b96854f8a774cb8f669ee1625
2018-01-25 08:05:14 -08:00
Wei Jia
0a8a8f0b26 add MediaPlayer2
Forked from 9070e295864b83deca9020ca8bdd9ff790e631a9
Test: plays local files, callback source and streaming.
Bug: 63934228
Change-Id: I692007c07eb2819f8ad1d843e4e2b1fc96fbecca
2018-01-24 11:03:37 -08:00
Rahul Frias
bbf96b1af1 Merge "Add new values to KeyRequestType" 2018-01-24 07:36:14 +00:00
Robert Shih
d908f38e19 MediaExtractor: getSampleSize API
Return size of the current sample in bytes.

Bug: 63934228
Change-Id: I5e1a173b218304a4b2eb5aff9d6325f6442cf727
2018-01-23 15:34:44 -08:00
Rahul Frias
8f761ba1cd Add new values to KeyRequestType
Two additional KeyRequestTypes have been added, None and Update. None
indicates that no key request is needed as keys have already been
loaded. Update indicates that while keys have previously been loaded,
an additional (non-renewal) license request is needed.

Bug: 70335058
Change-Id: Id8575fd4c8e8d71009373235a3944b4ec47849da
2018-01-23 13:45:17 -08:00
Adam Stone
c06e10e241 Add definition and stub for getMetrics.
This adds a stub for supporting retrieving metrics from the MediaDrm
interface.

BUG: 64001676

Test: Ran the new CTS unit test added in a related CL.

Change-Id: I84cafb79dd6e6f860b058a58fb52113a4e699f7d
2018-01-23 13:36:31 -08:00
Jeff Tinker
3eb07f46a7 Add new MediaDrm methods
Methods for querying HDCP, security levels and
number of sessions

bug:64001680
bug:33657579

Test: cts: MediaDrmMockTest, ClearKeySystemTest
gts: GtsMediaTestCases

Change-Id: Ie616f96ab6b74410a3d7548a7f34b20cf0831d0c
2018-01-22 13:34:06 -08:00
Marco Nelissen
463ec6b40c Clean up MediaMetadataRetriever use
MediaMetaRetriever derives from RefBase, so we should treat it as such.

Bug: 30816425
Test: build, boot, CTS
Change-Id: Ifa089636c5d997cd9e17bf23b9e5f49a7ee2cbed
2018-01-10 14:00:29 -08:00
Jerry Zhang
f9c5c2574d Add MtpStorageManager for monitoring filesystem events
MtpStorageManager keeps track of file information and
send notifications for new files. MtpDatabase now uses
this instead of MediaProvider for getting object information,
although some operations are still reflected into MP.

Since MtpStorageManager handles storage ids, remove
that field from StorageVolume and VolumeInfo.

Clean up a lot of the jni code for MtpDatabase.

Bug: 63143623
Test: Test every MtpOperation in a variety of situations on Linux and
Windows. Also use the shell to manipulate files. Verify that the cache
is consistent throughout, and the operations behave as expected. Verify
files created by the shell appear.
Test: adb shell am instrument -w android.mtp /android.support.test.runner.AndroidJUnitRunner
Change-Id: Id4ea810047b0c323399cd833047733e5daafb30a
2017-12-15 00:59:41 +00:00
Wei Jia
852d236287 SoundPool: remove unused header file.
Test: compiles
Bug: 69805888
Change-Id: I4f7a6247da9a3aed03c4dc550aee29cdbec136df
2017-12-07 17:04:36 -08:00
TreeHugger Robot
b1a28a75b7 Merge "SoundPool: remove unused header file" 2017-12-06 20:30:16 +00:00
Wei Jia
e6b9370c5a SoundPool: remove unused header file
Test: compiles
Bug: 63934228
Change-Id: I48014e809a37c8a9ab27d4e4688dd7e604f80119
2017-12-06 09:02:33 -08:00
kyle_tso
4c53804386 Merge "Support scanDirectories with JNI callback function" am: 5747c2b81c am: 34be883ebd
am: baa1210d25

Change-Id: I7145485a3ae3ae3791e8aaefed650874fd41887e
2017-12-06 03:53:46 +00:00
kyle_tso
baa1210d25 Merge "Support scanDirectories with JNI callback function" am: 5747c2b81c
am: 34be883ebd

Change-Id: I57a54d520cd953c7b99e6815e7894421166368d4
2017-12-06 03:42:11 +00:00
kyle_tso
34be883ebd Merge "Support scanDirectories with JNI callback function"
am: 5747c2b81c

Change-Id: I8996fb568c4024ccf76a5643049de8cee6f811c6
2017-12-06 03:22:30 +00:00
jiabin
fe3e6024ed Add AudioRouting interface in MediaRecorder.
Bug: 64038649
Test: Run cts in RoutingTest
      Switching input device when using MediaRecorder

Change-Id: I3f2a9f670565c6e55d612c1477a505fa3d096e3d
2017-11-28 17:25:46 -08:00
kyle_tso
b4aa69fd11 Support scanDirectories with JNI callback function
MtpServer needs this function to update the database for directory
copy operation.

Test: Call this function from MtpServer and database is updated in
directory copy scenario.

Change-Id: I9b316f4dbf7f35922292c33ab02f9efebc867aa8
Signed-off-by: kyle_tso <kyle_tso@htc.com>
2017-11-22 20:30:42 +08:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Wei Jia
49ca7252e4 MediaPlayer: simplify buffering control.
Test: pass cts tests
Bug: 36280094
Change-Id: If1e2dac511d038b88f7e867eb7ff8b345cb04478
2017-11-12 15:07:00 -08:00
Jae Shin
a0f51ba484 Remove libmedia_omx_defaults from libmedia
libmedia_omx_defaults includes source files and this default was
used in both libmedia.so and libmedia_omx.so. This is an issue because
libmedia_omx and libmedia are both loaded in the framework process
through dependency chains such as libstagefright ->
libstagefright_omx_utils -> libmedia_omx.

To fix the issue, libmedia_omx_defaults is removed from libmedia and
libmedia now depends on libmedia_omx. Other modules/libs that originally
depended on libmedia and need access to libmedia_omx_defaults' source
files, now depend on libmedia_omx as well.

Bug: 67871061
Test: mma -j and boot test
Change-Id: I096d58d1e3338b70d5dae9d0f9919b908070d071
2017-11-07 02:53:16 +00:00
TreeHugger Robot
f8a6f1da8f Merge "Add AudioRouting interface in MediaPlayer" 2017-11-03 19:54:39 +00:00
TreeHugger Robot
416a66cd6c Merge "Fix exception on MediaDrm invalid property access" 2017-11-03 07:52:50 +00:00
Jeff Tinker
eb13c764c6 Fix exception on MediaDrm invalid property access
Accessing an invalid MediaDrm property would result in
an IllegalStateException.  This change causes
IllegalArgumentException to be thrown instead, which
is more appropriate.

Test: android.media.cts.ClearKeySystemTest passes
  and it fails prior to this CL.

bug:68765217
Change-Id: I858575dc8fe643a88381da49b543c5cc0d266e02
2017-11-02 18:13:02 +00:00
jiabin
6e5a628ab6 Add AudioRouting interface in MediaPlayer
Bug: b/64038649
Test: Run cts in RoutingTest
      && switch output device when using MediaPlayer playing music/video

Change-Id: I48dcfd40c3a6ce01c818f6268cc86ed02b7eaa58
2017-11-01 09:53:17 -07:00
Chong Zhang
884162b81b Merge "heif: support heif image sequence and dual-function files" 2017-10-31 18:34:51 +00:00
Chong Zhang
ab2cf191c0 Merge "mtp: fix double free of thumbnail data" into nyc-dev am: 914bc14e82 am: f9e16c9899 am: 396487f5aa am: 5330335288 am: db258ebba8 am: e3ac25eb0c am: bd7101937a am: b48acd86c0
am: c4ac607916

Change-Id: I23eeff8ab3dfd281585ef4650a6f036b6c80f4f9
2017-10-31 01:09:46 +00:00
Chong Zhang
c4ac607916 Merge "mtp: fix double free of thumbnail data" into nyc-dev am: 914bc14e82 am: f9e16c9899 am: 396487f5aa am: 5330335288 am: db258ebba8 am: e3ac25eb0c am: bd7101937a
am: b48acd86c0

Change-Id: I5aba8558427da76da5bbe331c207f04415990ac1
2017-10-31 00:55:23 +00:00
Chong Zhang
b48acd86c0 Merge "mtp: fix double free of thumbnail data" into nyc-dev am: 914bc14e82 am: f9e16c9899 am: 396487f5aa am: 5330335288 am: db258ebba8 am: e3ac25eb0c
am: bd7101937a

Change-Id: I78a26c3abfb72e9b873b719506f869df0aa87da1
2017-10-31 00:41:00 +00:00
Chong Zhang
bd7101937a Merge "mtp: fix double free of thumbnail data" into nyc-dev am: 914bc14e82 am: f9e16c9899 am: 396487f5aa am: 5330335288 am: db258ebba8
am: e3ac25eb0c

Change-Id: Iba4bcd510ea20aa6fe928074912a864fe325680a
2017-10-31 00:26:33 +00:00
Chong Zhang
e3ac25eb0c Merge "mtp: fix double free of thumbnail data" into nyc-dev am: 914bc14e82 am: f9e16c9899 am: 396487f5aa am: 5330335288
am: db258ebba8

Change-Id: Ic9821f05d30a57fad1567e834804cec6ff5dca97
2017-10-31 00:11:32 +00:00
Chong Zhang
396487f5aa Merge "mtp: fix double free of thumbnail data" into nyc-dev am: 914bc14e82
am: f9e16c9899

Change-Id: Id780ff2bfb2f3881cbf33032971ed3b397a2fcde
2017-10-30 23:16:40 +00:00
Chong Zhang
4342f08fab heif: support heif image sequence and dual-function files
- Add a few methods to MediaMetadataRetriever to get still
  images and frames by index.

- Declare keys in MediaFormat related to heif still images.

bug: 63633199

test:
cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice

Change-Id: I9556b27f7395a163aadd01e979930061878994d0
2017-10-30 19:59:43 +00:00
Chong Zhang
e6b98532ee mtp: fix double free of thumbnail data
bug: 67864232
Change-Id: I6eb51be839df12317273830521c70a4ed80f9496
2017-10-24 17:03:43 -07:00