Commit Graph

6283 Commits

Author SHA1 Message Date
Insun Kang
ecdf034b87 MediaSession2 API set for audio focus handling
MediaPlayerInterface has:
- setAudioAttributes
- getAudioAttributes

MediaSession2 has:
- setAudioFocusRequest

Test: build
Bug: 72529899
Change-Id: I3b200198bc44c568d3c06583c23d9918c6380e32
2018-01-27 03:17:32 +09:00
Jaewan Kim
0d61a00cf5 MediaSession2: Add/remove playback listeners
Test: Run all MediaComponents test once
Change-Id: If88fa492d40f9d202e8bdfcebd06cd9b82554041
2018-01-27 03:17:32 +09:00
Jaewan Kim
f7a7706d14 MediaSession2: Fix timing issue
Session/Controller needs mProvider. However, if the createProvider()
interacts with other components, than other components may use session
/controller object before mProvider is set.

This CL prevents such issues by calling initialize() to communicate
with other components after the provider is set.

Test: Run all MediaComponents test once
Change-Id: I7f4c52136038a0522471015344881552b678a2ab
2018-01-27 03:17:32 +09:00
Insun Kang
0d2f3a4ab7 Merge "Revert "MediaSession2 API set for audio focus handling"" 2018-01-26 16:31:31 +00:00
Insun Kang
8b8dc9a114 Revert "MediaSession2 API set for audio focus handling"
This reverts commit b4689ed97f.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I76f1318941466c10fe08a49a87e4d529aa96391a
2018-01-26 16:28:40 +00:00
Jaewan Kim
81fc632569 Merge "MediaSession2 API set for audio focus handling" 2018-01-26 15:18:10 +00:00
Jaewan Kim
b228cc67cc Merge "MediaSession2: Add playlist parameter supports" 2018-01-26 15:09:31 +00:00
Hyundo Moon
80652ddb91 Merge "MediaSession2: Complete transport control commands" 2018-01-26 14:48:11 +00:00
Hyundo Moon
661433de8f MediaSession2: Add playlist parameter supports
This CL adds following APIs:
 - MediaPlayerInterface.set/getPlaylistParams()
 - MediaSession2.set/getPlaylistParams()
 - MediaController2.setPlaylistParams()
 - ControllerCallback.onPlaylistParamsChanged()

Bug: 72537520
Test: Passed MediaSession2Test
Change-Id: I84ea00ee0876725af1c0e01ad50da15fdb222418
2018-01-26 23:39:33 +09:00
Insun Kang
b4689ed97f MediaSession2 API set for audio focus handling
MediaPlayerInterface has:
- setAudioAttributes
- getAudioAttributes

MediaSession2 has:
- setAudioFocusRequest

Test: build
Bug: 72529899
Change-Id: I64b0238791f25bfd07138686166521a76bc36230
2018-01-26 23:33:15 +09:00
Insun Kang
0a16f268f5 VideoView2/MediaControlView2: Remove overriden onKeyDown/dispatchKeyEvent
Test: build
Change-Id: I4f3a397001e771eac1d1f0208d4e2f262c76b44c
2018-01-26 19:32:34 +09:00
Hyundo Moon
150cca8777 Merge "Add fromBundle/toBundle to PlaybackState2/PlaylistParams" 2018-01-26 09:44:47 +00:00
Hyundo Moon
6cb0712c53 Merge "VideoView2: Add custom actions API" 2018-01-26 09:42:02 +00:00
Hyundo Moon
78600c1a86 MediaSession2: Complete transport control commands
Bug: 72531854
Test: Builds successfully
Change-Id: I1d52580bd9c95e08561905aba19205caee649de1
2018-01-26 16:36:23 +09:00
Hyundo Moon
5b2e35ad09 Add fromBundle/toBundle to PlaybackState2/PlaylistParams
Bug: 72531009
Test: Builds successfully
Change-Id: I71ba2d59793620f7d5757f21e6a075f75bbdef05
2018-01-26 07:10:00 +00:00
Insun Kang
51e8d0a050 Merge "VideoView2: Apply API review comment" 2018-01-26 06:55:13 +00:00
TreeHugger Robot
6e2da09ab8 Merge "Add TYPE_BUS to isValidAudioDeviceTypeOut" 2018-01-26 05:39:27 +00:00
Jaewan Kim
1a2c263c7a MediaSession2: Change MediaPlayerBase to MediaPlayerInterface
Test: Run all MediaComponents tests once
Bug: 72527150
Change-Id: Ifd384ea274ec949caa767210b07e558844552077
2018-01-26 13:28:27 +09:00
Jaewan Kim
33573461df MediaSession2: Use Executor for callback handling
This also simplifies future work for adding more functions
Test: Run all MediaComponents test once

Change-Id: I37f1e205f95bcf506df5550c1e65a864e8a9028c
2018-01-26 13:27:17 +09:00
Hyundo Moon
46377a9aae VideoView2: Add custom actions API
Test: Using VideoViewTest application
Change-Id: I941bf0f9605918b0e0f9e4684327eee9ffe24e11
2018-01-26 12:58:55 +09:00
Insun Kang
df0728c15a VideoView2: Apply API review comment
- Lint error: setVideoURI --> setVideoUri
- Adds 'View' parameter to the listener methods
- Adds missing documents for constants
- Removes getAudioSessionId()
- Typos

Test: build
Change-Id: I217c7608a8b9fed4111d0c928a270784307bf378
2018-01-26 11:23:04 +09:00
TreeHugger Robot
ce6b2d6bb9 Merge changes from topic "product_partition"
* changes:
  Read media files from /product/media/audio
  Support /product partition
2018-01-26 01:10:16 +00:00
TreeHugger Robot
ae30c68489 Merge "VideoView2: Remove APIs supported by MediaSession" 2018-01-25 21:53:12 +00:00
Robert Shih
54573c5971 Merge "MediaExtractor: getSampleSize API" 2018-01-25 21:27:39 +00:00
TreeHugger Robot
4b7abff005 Merge "add getMetrics() apis for AudioTrack and AudioRecord" 2018-01-25 20:31:07 +00:00
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
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