Commit Graph

6863 Commits

Author SHA1 Message Date
Adam Stone
82bdfc2814 Merge "Enabling the getMetrics call in MediaDrm" 2018-01-25 18:25:40 +00:00
TreeHugger Robot
f39867e610 Merge "MediaSession2: Apply apilint" 2018-01-25 16:52:19 +00: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
Adam Stone
27507d8696 Merge changes from topic "DrmMetrics-MostFrameworkMetrics"
* changes:
  Add session times metric definitions.
  Adds additional metric constants.
2018-01-25 14:00:17 +00:00
Adam Stone
4c61677aba Merge "Added support for getKeyRequest metric." 2018-01-25 11:20:57 +00:00
Sungsoo Lim
82af545ca6 VideoView2: Remove APIs supported by MediaSession
Developers can use a MediaController instance from
getMediaController() instead.

Test: build
Change-Id: If58a040155a2a6894227aa89c20e7dbed6643c4e
2018-01-25 17:14:43 +09:00
Adam Stone
e0c4729a78 Enabling the getMetrics call in MediaDrm
This method is the MediaDrm implementation providing metrics to the
media application. This method is comparable to the getMetrics call on
MediaCodec.

Bug: 64001676

Test: CTS tests to verify metrics and regressed on GPlay Movies.
Change-Id: I0334178b8f93921a0ba24584f345e477c393bbad
2018-01-24 21:34:59 -08:00
Jaekyun Seok
c31033f43c Read media files from /product/media/audio
Bug: 64195575
Test: tested reading media files from /product/media/audio after moving
files from /system/media/audio to /product/media/audio

Change-Id: Ic690965e2b5f0e237d21df1db0fd0354a76d7c90
2018-01-25 12:44:57 +09:00
Chong Zhang
9519257763 Merge "MediaCodec: expose constant quality mode" 2018-01-25 02:47:59 +00:00
Jaewan Kim
e62f9b24d4 MediaSession2: Apply apilint
Test: make update-api and fixed trivial issues
Change-Id: I213f286cb4da73ce84fc69f7ae5e8e637f940045
2018-01-25 11:19:41 +09:00
Adam Stone
716f425072 Add session times metric definitions.
Adds the session start and end times metric definition to the MediaDrm
API.

Bug: 4001676

Test: Regressed unit tests and ran Google Play Movies. New tests pending.
Change-Id: Ib5e9f62057d3a23cc1d13ff1b8f69c14c5116722
2018-01-24 16:58:56 -08:00
Adam Stone
035f45f06e Adds additional metric constants.
This represents the bulk of the remaining metric constants that will be
supported in Android Pi.

BUG: 64001676

Test: New unit tests in an assoicated CL. Also, tested with GPlay/Walleye.
Change-Id: I06f43532688306ca37af3cfaa1c36bb9c8e54373
2018-01-24 16:58:34 -08:00
Adam Stone
0fceb518fb Added support for getKeyRequest metric.
This adds a metric constant name for success and failure counts of
getKeyRequest.

BUG: 64001676

Test: Added a CTS test case for the metric and ran on a device.
Change-Id: I84992536320d87a716c14cd461b8f4d2245f3431
2018-01-24 16:52:00 -08:00
Chong Zhang
8883329936 MediaCodec: expose constant quality mode
Also fix a bug where the supported bitcontrol mode
bitmask is wrong.

bug: 63633199
Change-Id: Ib2c21b0d846bcc31f61027d875f801a2282c1101
2018-01-24 15:10:03 -08:00
Wei Jia
8069cd9861 Merge "add MediaPlayer2" 2018-01-24 22:35:43 +00:00
Jaewan Kim
aecd38757b Merge "MediaSession2: Last changes before API unhide" 2018-01-24 22:12:04 +00:00
Mikhail Naganov
43a8ebb899 Add AudioFormat.ENCODING_E_AC3_JOC
Added to Java API only. Conversion from/to native
depends on having the constant on the native side.

Bug: 63901775
Test: make
Change-Id: I816562d40e98684d6ae1d4c27460324c99926525
2018-01-24 13:24:35 -08:00
Andy Hung
c4d2827c96 Merge "AudioSystem: Inform AudioFlinger of total memory" 2018-01-24 20:28:46 +00:00
Jaewan Kim
04de5de9a0 MediaSession2: Last changes before API unhide
This CL includes
- Rename SessionToken to SessionToken2
- Add repeat/shuffle mode support in PlaylistParam
- Add Executor params in session builder
- Add more APIs for MediaPlayerBase

Test: Run all MediaComponents tests once
Change-Id: Ia61632b7a09fab7f41fd89e9489a01af13d6c3c2
2018-01-25 04:59:05 +09:00
Jaewan Kim
1252c015a5 Merge "Change MediaControlView2 APIs" 2018-01-24 19:58:02 +00:00
Wei Jia
0a8a8f0b26 add MediaPlayer2
Forked from 9070e29586
Test: plays local files, callback source and streaming.
Bug: 63934228
Change-Id: I692007c07eb2819f8ad1d843e4e2b1fc96fbecca
2018-01-24 11:03:37 -08:00
TreeHugger Robot
2cef59dc7b Merge "Fix type in comment" 2018-01-24 18:10:21 +00:00
Jaewan Kim
4099b6e6fe MediaSession2: Public APIs for MediaBrowser2 and MediaLibraryService2
Test: Run MediaComponents test once
Change-Id: Icea9f7db7f13ed8354c7ce36b069f45ad7ddbfa8
2018-01-25 02:20:14 +09:00
Jaewan Kim
17b19b7305 MediaSession2: Public APIs for MediaSession2 and MediaController2
Test: Run MediaComponentsTests once
Change-Id: I0373f927063ab8feb340c6d91b2adc99bbcf92a4
2018-01-25 01:58:35 +09:00
Jin Seok Park
482173e03c Change MediaControlView2 APIs
Test: build
Change-Id: Ida307fa16f76e680aa12b92cbce4a8635cac17b2
2018-01-24 16:13:42 +00:00
Insun Kang
ae70ca2e1f MediaSession2: Define setAudioAttributes / setAudioFocusRequest
Test: build
Change-Id: I8ed824e1f1bd536ac37647d94f88195ec7b51bdc
2018-01-24 22:00:51 +09:00
Jin Seok Park
421e7ec3df Merge "Put latest MediaControlView2/VideoView2 code" 2018-01-24 11:24:17 +00:00
Jaewan Kim
495ea5f826 Merge "MediaSession2: Stop overriding MediaPlayerBase for session/controller" 2018-01-24 11:05:21 +00:00
Jaewan Kim
cf707c4741 MediaSession2: Stop overriding MediaPlayerBase for session/controller
Implement AutoClosable instead

Test: Run all MediaComponents test once
Change-Id: Ibb1dac06b80230d62e17111bf2da1b2df81a164c
2018-01-24 19:16:21 +09:00
Sungsoo Lim
c9af5b3076 Merge "VideoView2: Add API for MediaRouter intergration" 2018-01-24 10:15:29 +00:00
Hyundo Moon
efeb45eabd Put latest MediaControlView2/VideoView2 code
This CL brings latest MediaControlView2/VideoView2 code from
experimental, and it does the following:
 - Fullscreen button support (ag/3490251)
 - Set prev/next listener and controlling button visibility (ag/3498244)

Test: Ran VideoViewTest app
Change-Id: I1a64a9c98dcc625b504785728673edbee7b6935d
2018-01-24 19:07:38 +09:00
Jaewan Kim
7800fef943 Merge "MediaSession2: Add MediaSession2.CommandButton" 2018-01-24 10:00:42 +00:00
Rahul Frias
bbf96b1af1 Merge "Add new values to KeyRequestType" 2018-01-24 07:36:14 +00:00
Jaewan Kim
e542bf01d0 MediaSession2: Add MediaSession2.CommandButton
And also adds APIs to share custom layout

Test: Run all MediaComponents tests once
Change-Id: I4d18a023d2809d5405e72a73f14ae1150dee34bc
2018-01-24 15:52:26 +09:00
Jin Seok Park
8b314b2b5d Merge "Add API documentation for MediaControlView2" 2018-01-24 06:35:28 +00:00
TreeHugger Robot
c1ac0355ce Merge "Fixing bugs in Notification proto dumping." 2018-01-24 06:24:29 +00:00
Sungsoo Lim
af2a1ad069 VideoView2: Add API for MediaRouter intergration
Test: build
Change-Id: I3d52d332f587ea8c5b1fa97de512805001e9a130
2018-01-24 15:12:26 +09:00
Jin Seok Park
d9ce1bce82 Add API documentation for MediaControlView2
Test: ran 'make doc-comment-check-docs' after removing @hide tag.
Change-Id: I0eb45ed92e853ec1683c54863f0fdecccd2aa6e9
2018-01-24 14:36:28 +09:00
Jaewan Kim
2bdb9af08f Merge changes from topics "medialibraryservice2", "mediabrowser2"
* changes:
  MediaSession2: Initial commit of MediaLibraryService2
  MediaSession2: Initial commit of MediaBrowser2
2018-01-24 04:41:09 +00:00
Jaewan Kim
bcecf31a97 MediaSession2: Initial commit of MediaLibraryService2
MediaLibraryService2 is the new name for the MediaBrowserService

Test: Run all MediaComponents tests once
Change-Id: I7a1ae20ff59aa4714cff08e43cdabb5b8c557b98
2018-01-24 10:52:20 +09:00
Jaewan Kim
ec877287fb MediaSession2: Initial commit of MediaBrowser2
Test: Run all MediaComponents tests once
Change-Id: I284806ff97da4ba53d7e4de9a39864f70f69a942
2018-01-24 10:51:33 +09:00
Scott Randolph
5ed210fbaf Add TYPE_BUS to isValidAudioDeviceTypeOut
TYPE_BUS was defined, but hadn't yet been added to the enum definition
and the associated validator.

Test:  Build mojave
Change-Id: I866cdc49e6f445585f39e32dbb93a4d608962295
2018-01-23 17:39:39 -08:00
Andy Hung
7958358ddb AudioSystem: Inform AudioFlinger of total memory
To better allocate per-client memory blocks.

Test: Debug logging
Bug: 64161002
Change-Id: I389bdea250a74322fab616f1009f51c6c73aef07
2018-01-23 17:14:25 -08:00
Scott Randolph
589f96285b Fix type in comment
missing letter in a word...

Test:  NA
Change-Id: I1a031ad60040e92e8f357c3c789c43e9b83959df
2018-01-23 17:03:55 -08: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
e7d255976f Add CounterMetric and a single use case.
This adds a new class CounterMetric which is used to hold metric
information.  It also adds a single use case for recording and
reporting a counter metric.

BUG: 64001676

Test: Added and ran a new test for the specific CounterMetric use case.
Change-Id: I94ff9d4d965d55af4d78b3f9545f07d634b5abbd
2018-01-23 13:39:55 -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
Kweku Adams
bc84aecc76 Fixing bugs in Notification proto dumping.
Also changing method signatures to be more in line with our convention.
Based on some of the changes I went through, it looks like:
1. We were only legitimately saving the very last NotificationRecord
that was dumped.
2. We weren't dumping any NotificationChannels into
NotificationChannelGroup protos.

Bug: 65750824
Test: Android builds
Change-Id: I8c1ef90cf69d8ea00a7bad0c67445741056e23ef
2018-01-23 13:36:23 -08:00
TreeHugger Robot
e74fa6c231 Merge "Add new MediaDrm methods" 2018-01-23 17:07:40 +00:00