Commit Graph

6557 Commits

Author SHA1 Message Date
TreeHugger Robot
d41fed72c7 Merge "Camera: Populate Image tranformation in reader and writer" into pi-dev 2018-03-20 12:33:37 +00:00
Emilian Peev
450a5ffdfd Camera: Populate Image tranformation in reader and writer
"ImageReader" and "ImageWriter" must pass information about the
specific buffer transformation.
Currently only the "ImageReader" implementation of the
"android.media.Image" abstract classs will populate the
corresponding transformation, the remaining implementations will
use the default identity tranformation.

Bug: 75316204
Test: Manual using test application,
Camera CTS

Change-Id: If5c12134fbbef8cc20c3d369986ba613bc4f2cec
2018-03-19 16:19:43 +00:00
Jaewan Kim
83bc984a6c MediaSession2: Implement fastForward() / rewind()
Bug: 74724709
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: Ibd313dc6eed82a5d7cc9fc156f7851aba13f9e29
2018-03-19 17:39:02 +09:00
Christofer Åkersten
72a86922d4 Remove Context requirement from updatable
Bug: 74843539
Test: runtest-cts-MediaComponents && atest VideoView2Test
Change-Id: Iba5422f8d092205316ec3fa2c10da6d3f983fde6
2018-03-17 18:56:28 +09:00
Hyundo Moon
78e4f84f04 MediaSession2: Implement getPlayerState/Position/BufferedPosition
Bug: 74578458
Test: Passed CTS
Change-Id: If215e8e16bdce9fdc04ca18ed8d08ed374d13a98
2018-03-16 18:03:17 +09:00
Jaewan Kim
f10ca2f960 MediaSession2: Implement PlaylistParams replacements
This includes following changes
  - Remove PlaylistParams
  - Implement PlaylistParams replacements. Here's the list.
    - get/setShuffleMode()
    - get/setRepeatMode()
    - Note: Playlist metadata APIs are already submitted (b/74174649)

Bug: 74116823, Bug: 74118768
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: I0267ffeaf92257eb7b81ffc8b6a3f40b5a2f6f9c
2018-03-16 12:21:29 +09:00
Jaewan Kim
8e17db5554 MediaSession2: Remove MediaSession2#registerPlayerEventCallback()
Bug: 74157064
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: Ia976c0ebe9f2b7eff0ae603db96ab106aa045cbc
2018-03-16 10:59:32 +09:00
Jaewan Kim
15fc050432 MediaSession2: Remove onPlaylistChanged() without metadata
Bug: 74174728
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: I84495aa19bc03009c81cdefdf8e65fbff4b7bcb6
2018-03-16 10:52:18 +09:00
Hyundo Moon
b0179a3a44 Merge "MediaSession2: Convert DataSourceDesc to MediaItem2 in MyPlayerEventCallback" into pi-dev 2018-03-16 00:18:41 +00:00
TreeHugger Robot
2d76c3ce82 Merge "MediaPlayer2Impl: fix null object reference." into pi-dev 2018-03-15 22:54:49 +00:00
TreeHugger Robot
991ae64ffe Merge "fix slow get caps -- DO NOT MERGE" into pi-dev 2018-03-15 21:40:32 +00:00
Wei Jia
371144fcc2 MediaPlayer2Impl: fix null object reference.
Test: cts tests pass
Bug: 74204684
Change-Id: I906eeb9d907ae1a798be585c54126f02eb66448f
2018-03-15 11:26:37 -07:00
Chong Zhang
a0b72a6cdd fix slow get caps -- DO NOT MERGE
When get caps is called on an MediaCodec object, try to
use the codec info for that MediaCodec first as it should
be available during codec construction. Only when that
somehow failed go and initialize the full MediaCodecList,
as building the entire list could be very slow.

And when cloning the CodecCapabilities from MediaCodecInfo,
copy the fields directly and the fields (other than the ones
modifiable by client) are immutable after construction.

bug: 74073607

Test:
CTS media post submit:
cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice

Change-Id: I4ae5f2431da8528e1eca093c5cfb98abcb4a5bbf
(cherry picked from commit 90d7304a83)
2018-03-15 18:17:53 +00:00
TreeHugger Robot
50f118a121 Merge "MediaPlayer2Impl: fix several functions" into pi-dev 2018-03-15 15:40:10 +00:00
Hyundo Moon
e14acb53fa MediaSession2: Convert DataSourceDesc to MediaItem2 in MyPlayerEventCallback
This CL adds a hidden API getMediaItem() in MediaPlaylistAgent.

Bug: 74506462
Test: Passed CTS
Change-Id: I1aefd7e47e1881fe14fcd1cc681095a6130624cf
2018-03-15 20:37:35 +09:00
Jaewan Kim
68c774a1ee MediaSession2: Implement skipTo APIs
This implements following APIs from both session and controller.
  - skipToPlaylistItem()
  - skipToNextItem()
  - skipToPreviousItem()

Bug: 74175632
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: I47d94346c997314ff39797bac3034aa507058036
2018-03-15 15:49:58 +09:00
Wei Jia
096d97ac3e MediaPlayer2Impl: fix several functions
Test: MediaPlayer2 plays
Bug: 74204684
Change-Id: I0e4fbd2915f2a726a6016c13f47e7d1433593c74
2018-03-14 14:46:24 -07:00
Jaewan Kim
009c393ca1 MediaSession2: Refactor incoming binder calls to the MediaSession2Stub
This CL refactors methods in MediaSession2Stub that handles incoming
binder calls from the controller by adding methods to do followings
in one place.
  1. Check if the session hasn't closed.
  2. Check if the controller is allowed for the command
  3. Call SessionCallback#onCommandRequest() for APIs that would be
     sent directly to the MediaPlayerBase or MediaPlaylistAgent if
     allowed.

This CL also adds missing command code for setRating().

Bug: 74581821
Test: Run CTS tests with MediaComponents/runcts.sh
Change-Id: I9b96e26b7644cff3c54269773590c73ff30f956c
2018-03-14 10:02:36 +09:00
Hyundo Moon
15d3ba624c Merge "MediaSession2: Replace PlaybackState2" into pi-dev 2018-03-13 12:03:55 +00:00
Hyundo Moon
c006dc2a85 MediaSession2: Replace PlaybackState2
This CL removes PlaybackState2 and replaces it with other APIs.

Bug: 74370608, Bug: 73971431
Test: Passed CTS
Change-Id: Ifa16b1d551957ab4bb06979ddf29b18772093035
2018-03-13 17:05:55 +09:00
Christofer Åkersten
623122cd98 Ensure members are non-null in callback
Bug: 74570008
Test: runtest-cts-MediaComponents -r 100
Change-Id: I59590afae4e67fa8a90f8a7b4a6be58ce54e2806
2018-03-13 06:23:34 +00:00
Jaewan Kim
c3efa17bdd Merge changes from topics "session2_additem", "session2_playlistmetadata", "session2_getplaylist" into pi-dev
* changes:
  MediaSession2: Implement add/remove/replacePlaylistItem()
  MediaSession2: Implement update/getPlaylistMetadata()
  MediaSession2: Implement get/setPlaylist()
2018-03-13 04:30:50 +00:00
Jaewan Kim
8562fd9504 MediaSession2: Implement add/remove/replacePlaylistItem()
Bug: 73149584
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: I29804f52eaca45de21fd66634e4eeee2c72a9a25
2018-03-13 11:59:18 +09:00
Jaewan Kim
dc5ab8095a MediaSession2: Implement update/getPlaylistMetadata()
Bug: 74174649
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: I3ac2dabfc7f532bf7d7262940e3dc309e97fd45a
2018-03-13 11:55:55 +09:00
Jaewan Kim
25db3cdb93 MediaSession2: Implement get/setPlaylist()
Bug: 74326040
Test: Run CtsMediaTests for MediaSession2
Change-Id: Ib799c03edd2f79c6f9ffa989aea1137018ec55b3
2018-03-13 11:48:30 +09:00
TreeHugger Robot
8807436378 Merge "heif: add option for specifying bitmap pixel format" into pi-dev 2018-03-13 02:29:25 +00:00
TreeHugger Robot
2b83982b2b Merge "Make MP2 operations asynchronous and send matching notifications" into pi-dev 2018-03-13 00:09:02 +00:00
Chong Zhang
a89f6e1bb2 heif: add option for specifying bitmap pixel format
Add an option similar to BitmapFactory.Options to the bitmap
extraction APIs added in P to allow the app to specify bitmap's
pixel format. MediaMetadataRetriever's old getFrameAtTime()
only allows extraction in RGB565, for image use case the bitdepth
could be too low.

Also change return type of getFramesAtIndex to List as
Lint is complaining about returning raw arrays.

bug: 63633199
bug: 73886998

Change-Id: I40f0a421c767483e32c7744180dc5a187681e066
2018-03-12 21:23:00 +00:00
Chong Zhang
f78a08c2d9 Merge "heif: add definition for HEVC Main Still Picture profile" into pi-dev 2018-03-12 19:40:00 +00:00
Dongwon Kang
69d2d51a59 Make MP2 operations asynchronous and send matching notifications
Test: testPlayVideo & testEventCallback & testPlaylist
Bug: 74204782
Change-Id: I7a0f7d1ba5334c68380ef928294dc52cae76c185
2018-03-12 11:33:34 -07:00
TreeHugger Robot
89a2b6c560 Merge "Implement CodecProfileLevel.{equals|hashCode}" into pi-dev 2018-03-12 17:45:57 +00:00
TreeHugger Robot
2e94d509b3 Merge "MediaPlayer2Impl: fix getBufferedPosition" into pi-dev 2018-03-10 01:00:35 +00:00
Marco Nelissen
6db0f4dac8 Merge "Rework thumbnail cleanup" into oc-mr1-dev
am: b20a329f4c

Change-Id: I17b77312edb4fa03af1e89543ed5c27f4501d51c
2018-03-09 23:00:20 +00:00
Wei Jia
c3725a94bb MediaPlayer2Impl: fix getBufferedPosition
Test: MediaPlayer2 plays
Bug: 74204684
Change-Id: Ide7c2ebe7e29c16d427a8aa6aa4b0384e8a2539f
2018-03-09 14:50:04 -08:00
Wonsik Kim
62b01c7d26 Implement CodecProfileLevel.{equals|hashCode}
Bug: 74435947
Test: atest CtsMediaTestCases:MediaCodecListTest
Change-Id: Ia77182538c5a151bb561f7d273f7cbaa29671a4c
2018-03-09 19:15:39 +00:00
Hyundo Moon
5cef8984ba Merge "MediaSession2: Ensure NonNull/Nullable for parameters of public methods" into pi-dev 2018-03-09 08:28:08 +00:00
Hyundo Moon
c896d9d7e6 MediaSession2: Ensure NonNull/Nullable for parameters of public methods
Bug: 73863865
Test: runtest-MediaComponents
Change-Id: Id40f221ae60b1e63afd9ff71950589fe13a7f526
2018-03-09 14:00:11 +09:00
TreeHugger Robot
790a31ee31 Merge "MediaSession2: Implement MediaSession2#updatePlayer()" into pi-dev 2018-03-09 04:37:29 +00:00
TreeHugger Robot
af6cb35749 Merge "MediaPlayer2Impl: fix getPlayerState." into pi-dev 2018-03-09 03:10:41 +00:00
Wei Jia
be6e3024bd MediaPlayer2Impl: fix getPlayerState.
Test: MediaPlayer2 plays
Bug: 74204684
Change-Id: Ib27930287485f074be6a8df4a90fb78023153ccd
2018-03-08 13:56:42 -08:00
Marco Nelissen
6d2096f388 Rework thumbnail cleanup
Bug: 63766886
Test: ran CTS tests
Change-Id: I1f92bb014e275eafe3f42aef1f8c817f187c6608
2018-03-08 21:46:15 +00:00
Jaewan Kim
9af5bc8370 MediaSession2: Implement MediaSession2#updatePlayer()
Bug: 74364873
Test: Run MediaSession2Test in CTS
Change-Id: I5161c0d771afd5036e2c09b2cc2a165f80c534f7
2018-03-08 18:11:55 +09:00
Sungsoo Lim
5f8a8ee0e5 Make MediaPlaylistAgent updatable
Bug: 74366050
Test: build
Change-Id: Iea8e4d9b6a11393bd837da90394d95529fdbe5eb
2018-03-08 17:28:23 +09:00
Sungsoo Lim
ec75d51e74 VideoView2: Remove setRouteAttributes
Being consistent, create route player internally and do not expose it
since VideoView2 creats a MediaPlayer inside and do not expose it.

Bug: 72527212
Test: manually with VideoViewTest
Change-Id: I6db3bc668f6ab77587fed49b2d34611bc3c30465
2018-03-08 13:55:21 +09:00
Jaewan Kim
525c88c2b7 MediaSession2: Clean up TODOs under frameworks/base
This change includes
  - Addressed trivial TODOs (takes less than 1min)
  - Renamed playlist controller to playlist agent
  - Renamed mplc to playlistAgent
  - Renamed mpb to player
  - Assigned buganizer issues for TODOs

Bug: 74361045
Test: Run MediaComponentsTest
Change-Id: I45e97081b5a3f24988c3daadd007edcb51be5288
2018-03-08 13:54:34 +09:00
Jean-Michel Trivi
4e532f59dc Merge "AudioService: don't send BECOMING_NOISY when dyn policy affects media" into pi-dev 2018-03-07 21:37:55 +00:00
Chong Zhang
e536bf7b22 heif: add definition for HEVC Main Still Picture profile
Add corresponding def to OMX for HEVC Main Still Picture.

bug: 63633199
Change-Id: I2d968f5871e3afcd08758c2d5e1452b6c13d0862
2018-03-07 19:48:45 +00:00
TreeHugger Robot
5a169cf2f6 Merge "System sounds get its own dnd toggle" into pi-dev 2018-03-07 16:39:40 +00:00
TreeHugger Robot
aa79f03ca6 Merge "MediaSession2: Fix random NPE in MediaBrowser2Test" into pi-dev 2018-03-07 11:23:29 +00:00
Sungsoo Lim
be1033fda2 Merge changes from topics "mplc", "session2_onDataSourceMissingHelper" into pi-dev
* changes:
  Remove MediaPlaylistController, add MediaPlaylistAgent
  MediaSession2: Add SessionCallback#onCurrentMediaItemChanged()
  MediaSession2: Add onDataSourceMissingHelper
2018-03-07 07:59:53 +00:00