Commit Graph

7792 Commits

Author SHA1 Message Date
Jeff Sharkey
3479d6d783 Merge "Compare ringtones using IDs." into qt-dev
am: 8be2c7def9

Change-Id: I30bdc4f3e14158a2cbbbf883c345d39ff57e6f35
2019-05-16 15:41:46 -07:00
Jeff Sharkey
0da5bd1845 Compare ringtones using IDs.
Comparing by constructing full Uris doesn't work when one of the
values has been canonicalized.

Bug: 132816653
Test: atest android.media.cts.RingtoneManagerTest#testAccessMethods
Change-Id: Id4b26820e76ec3d1d56ba6cf3c76375dafcf92c0
2019-05-16 13:39:29 -06:00
Jeff Sharkey
8e6487f884 Merge "Missing thumbnails should throw." into qt-dev
am: b26d003713

Change-Id: Ia3fa8f5ffc0953d3e981fa2663b892e55aafa0c5
2019-05-14 12:47:23 -07:00
Jeff Sharkey
4cf4a8b0ec Missing thumbnails should throw.
Bug: 132248209
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Iac17eaa17c25041de13069f1e73a70006051ab8b
2019-05-14 11:25:49 -06:00
Jeff Sharkey
bd0a4e743b Merge "Parse Exif OffsetTime in MediaScanner" into qt-dev
am: 6b8a715861

Change-Id: I4273aca5f13030f99241e07545b34c9e0b50fc47
2019-05-12 07:30:13 -07:00
Jeff Sharkey
6b8a715861 Merge "Parse Exif OffsetTime in MediaScanner" into qt-dev 2019-05-12 14:12:11 +00:00
Ken Narita
fd1323e73f Parse Exif OffsetTime in MediaScanner
MediaScanner parses Exif OffsetTime value to use UTC time
for DATE_TAKEN value.

Bug: 62856173
Change-Id: Iffb7e0ae296b73ce6fb6515246871f0dcfe42bb0
2019-05-11 18:34:31 -06:00
Eric Laurent
a9d5bf49d1 Merge "MediaPLayer: remove unused code" into qt-dev
am: 1b62363005

Change-Id: Ib9f078319d03a3b176a17837a575a08f1c1e6bb8
2019-05-10 18:03:07 -07:00
TreeHugger Robot
1b62363005 Merge "MediaPLayer: remove unused code" into qt-dev 2019-05-10 23:33:28 +00:00
Kevin Rocard
b8dbb29c8b Merge "Fix APC documentation" into qt-dev
am: 30e37c12e6

Change-Id: I2124309f7aaf2d96c0fa1d850087a98d8a6308a4
2019-05-10 15:38:34 -07:00
Kevin Rocard
db0ff41675 Fix APC documentation
Bug: 129948989
Test: m -j offline-sdk-docs
Change-Id: I0205979e37f397794e0dc4f390ad4aad5c74c630
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-05-10 11:09:01 -07:00
TreeHugger Robot
2e3702f579 Merge "Inline calls to MimeUtils." into qt-dev-plus-aosp 2019-05-10 16:44:19 +00:00
Hyundo Moon
b65ae655ad Merge changes I0a5c576b,I54fcf97b into qt-dev
am: d1cbccb628

Change-Id: I795b95edc9648e01bd5c654ea6c26fd68cbb8586
2019-05-10 02:34:09 -07:00
Hyundo Moon
d1cbccb628 Merge changes I0a5c576b,I54fcf97b into qt-dev
* changes:
  Remove MediaParceledListSlice
  Remove MediaSessionServiceImpl
2019-05-10 03:42:49 +00:00
Eric Laurent
9d7df41b17 MediaPLayer: remove unused code
remove mBypassInterruptionPolicy unused since
app ops are managed by PlayerBase.

Bug: 131873101
Test: make
Change-Id: Ifb07fd0f4e5a14384b71ac010a35614969b9761e
2019-05-09 17:14:12 -07:00
Henry Fang
8ea082a303 Merge "Add encryption information to TvTrackInfo" am: 3e6a8c1c0e
am: 21401590f0

Change-Id: I618dddbc1e89b2d1169c14f54cf1ab50d26c5cab
2019-05-09 13:17:06 -07:00
Henry Fang
21401590f0 Merge "Add encryption information to TvTrackInfo"
am: 3e6a8c1c0e

Change-Id: I294b50fdcf3fbf366971f23f7487f05799353124
2019-05-09 12:24:45 -07:00
TreeHugger Robot
1ef70c3781 Merge "AudioService: implement de-registration (release) of recorders" into qt-dev 2019-05-09 18:26:30 +00:00
TreeHugger Robot
8af653e8b2 Merge "Fix AudioRecordingConfiguration.anonymizedCopy method" into qt-dev 2019-05-09 16:28:30 +00:00
Mikhail Naganov
cfe4c2627e AudioService: implement de-registration (release) of recorders
Clients must unregister themselves when client-side AudioRecord
goes away. This allows removing the tracking record sooner than
the client app goes away.

"DEATH" event has been renamed to "RELEASE". Client death is handled
the same way as regular release.

Bug: 123312504
Test: start and stop audio recording, check "dumpsys audio"
Change-Id: I6a9578b29ab3c41bac2bf4c823224276efbe1beb
2019-05-09 09:25:45 -07:00
Hyundo Moon
bb07e9bc5c Remove MediaParceledListSlice
Bug: 132233794
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
      atest CtsMediaTestCases:android.media.cts.MediaSessionManagerTest;
      atest CtsMediaTestCases:android.media.cts.MediaSession2Test;
      atest CtsMediaTestCases:android.media.cts.MediaController2Test;
      atest CtsMediaTestCases:android.media.cts.MediaSession2ServiceTest;
Change-Id: I0a5c576b3fc9d2e236256d8f9f4e992914b147be
2019-05-09 17:11:44 +09:00
Kyeongkab.Nam
2843b7e22f Add encryption information to TvTrackInfo
Add TIF API for getting encryption status of each tracks in order for
TV App to use it.

Test: build
Bug: 112835103
Change-Id: I3065358d20d17c688e3349140b44d443fc34965d
2019-05-09 01:20:12 +00:00
Kevin Rocard
b14fdecc4e Do not try to unregister APC multiple time
If audioRecord.release() is called explicitly, APC DP is released.
When the AudioRecord.finalizer() is called by the JVM, the APC DP would
be released again, leading to misleading error message.

Bug: 131064451
Test: call AudioRecord release and check that the finalizer do not log a
      release failure
Change-Id: Ia7092274ea8ac8e0a6754dfe2541f823f650384d
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-05-08 23:37:31 +00:00
Mikhail Naganov
fc27a5cf69 Fix AudioRecordingConfiguration.anonymizedCopy method
Client port ID must not be anonymized as it is used by
AudioRecord class to filter out the corresponding
recording configuration.

Bug: 123312504
Bug: 131756086
Test: atest CtsMediaTestCases:AudioRecordTest#testAudioRecordInfoCallback
      atest CtsMediaTestCases:AudioRecordTest#testGetActiveRecordingConfiguration

Change-Id: I3e32395e9df107db76cfc940fecda8d066c05d97
2019-05-08 17:21:50 +00:00
Tobias Thierer
533b333485 Inline calls to MimeUtils.
MimeMap is a configurable replacement for MimeUtils. This
CL inlines calls to MimeUtils, in preparation for its
removal.

Bug: 120171727
Test: atest com.android.mediaframeworktest.unit.MediaFileTest
Change-Id: I8a2bfec55d913cd0f85ed13fc9cdc052208ed729
Merged-In: I8a2bfec55d913cd0f85ed13fc9cdc052208ed729
(cherry picked from commit 524a364754)
2019-05-08 13:00:11 +00:00
Winson Chiu
8197beee18 Merge "Call MediaStore#scanFile directly in RingtoneManager" into qt-dev 2019-05-07 17:21:16 +00:00
Hyundo Moon
fefe5c7ff1 Merge "Enhance Javadoc of playback speed related APIs" into qt-dev 2019-05-07 05:13:24 +00:00
Winson
295336f6e8 Call MediaStore#scanFile directly in RingtoneManager
Reproduced the failing case, even without thread pool changes.
Since RingtoneManager was blocking on the call anyways, changing it
to use the synchronous scanFile method directly should be fine.

Bug: 131882699

Test: manual add MP3 with RingtonePickerActivity

Change-Id: I53b49ed17403cda93ecfefb6985133b161a96983
2019-05-06 17:06:02 -07:00
Robert Shih
c9b5dfcf80 Merge "MediaCodec: save MediaCrypto ref until reset/release" into qt-dev 2019-05-03 18:20:16 +00:00
Hyundo Moon
7d8de6909a Enhance Javadoc of playback speed related APIs
This CL also makes throw IllegalArgumentException when controller
tries to set the speed to zero.

Bug: 131873534
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
      atest CtsMediaTestCases:android.media.cts.MediaSessionManagerTest;
Change-Id: I78f775df369de48b1ebda66fdb6e251b6e0865c1
2019-05-03 14:19:58 +09:00
TreeHugger Robot
b037feb130 Merge "Fix can't create thumbnail and wrong orientation issue" into qt-dev 2019-05-02 05:01:15 +00:00
TreeHugger Robot
935f4e8d4b Merge "AudioAttributes: fix setInternalLegacyStreamType()" into qt-dev 2019-05-02 00:37:32 +00:00
Eric Laurent
e6c8972013 AudioAttributes: fix setInternalLegacyStreamType()
Make sure that the content type is always properly set from
legacy stream type in the case where the product strategy matching
this legacy stream type does not specify it.

Bug: 129506383
Test: playback with Youtube and check content type with audio service
dumpsys

Change-Id: Ibaac0edc21bc44a56c632fb420b94deee710869d
2019-05-01 14:24:40 -07:00
Lajos Molnar
01f8b0f44c Merge "media: make CodecCapabilities PerformancePoints hashable" into qt-dev 2019-05-01 20:01:26 +00:00
Robert Shih
f9f07c780f MediaCodec: save MediaCrypto ref until reset/release
Bug: 121191296
Test: MediaCodecTest
Change-Id: I9c13a7c0aef379a09575d3e802944d94712b48a1
2019-05-01 11:59:24 -07:00
Tomoharu Kasahara
bc99e9202e Make min/max sampling rate configurable
Platform may support lower or higher sample rate but
it's limited with the fixed value.
This change makes it possible to configure min/max
limit by system properties.

Bug: 30483830
Test: Use MediaCodecInfo for the codec which has higher
 sampling rate.

Change-Id: Ifb6da86d21b530fb908e68bdb71474aee4d1b581
2019-04-29 10:31:49 -07:00
Lajos Molnar
c79f2cb253 media: make CodecCapabilities PerformancePoints hashable
- this allows them to be used in HashSets, etc.

Bug: 131430634
Change-Id: I4279a5fc0572857c2b840fd5a1ac0aa3e1b746ee
2019-04-29 10:18:05 -07:00
Lajos Molnar
6de33e1ca7 Merge "media: MediaCodecInfo: remove PerformancePoint logs" into qt-dev 2019-04-29 16:44:41 +00:00
Ivan Chiang
6da7b0adcc Fix can't create thumbnail and wrong orientation issue
- When MediaMetadataRetriever can't create the thumbnail of some
  HEIF files, attempt decoding it from ExifInterface.

- ImageDecoder can't create the thumbnail with getThumbnailBytes
  from ExifInterface in some cases. It will occur DecodeException:
  Failed to create image decoder with message 'unimplemented'Input
  contained an error. Attempt to decoding the full image in these
  cases.

- Use orientation from ExifInterface to transform the thumbnail to
  right orientation.

Test: manual
Test: atest ThumbnailUtilsTest
Bug: 130775874
Fix: 130446058
Change-Id: Icd0726ec49fe85651150736199c3caa184fa1a3f
2019-04-29 21:18:57 +08:00
Hyundo Moon
4338969838 Use ParceledListSlice in MediaSessionManager#getSession2Tokens
Bug: 126474946
Test: atest CtsMediaTestCases:android.media.cts.MediaSession2Test;
      atest CtsMediaTestCases:android.media.cts.MediaController2Test;
      atest CtsMediaTestCases:android.media.cts.MediaSession2ServiceTest;
      atest CtsMediaTestCases:android.media.cts.MediaSessionManagerTest;
Change-Id: Ia364853d6cf638ab7128c64693b6a8cc6063036a
2019-04-29 17:00:23 +09:00
Ray Essick
777341dadd Merge "Extend MediaCodecInfo to support AV1 decoder" into qt-dev 2019-04-27 19:15:27 +00:00
Andy Hung
2d87d7a4ba Merge "MediaCodec: Fix documentation on float raw audio buffers" into qt-dev 2019-04-26 23:50:32 +00:00
Andy Hung
cc6bc4b383 MediaCodec: Fix documentation on float raw audio buffers
Test: make docs, check html
Bug: 131423214
Change-Id: If2d6f78cc5f77a5c7b5b8b936ae9f3216387561e
2019-04-26 15:34:57 -07:00
Kevin Rocard
337f8ce4fd Propagate to apps capture opt-in
Allows public apps to detect if playback have opted-out of being
capture.

Bug: 129948989
Test: atest AudioPlaybackConfigurationTest
Change-Id: Id2c2ad195e5fdeba89926dcdbbe9fa22c2d25891
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-04-26 21:52:29 +00:00
Rakesh Kumar
a839a21243 Extend MediaCodecInfo to support AV1 decoder
Test: cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases \
 -t android.media.cts.DecoderTest#testAV1HdrStaticMetadata
Bug: 123756486

Change-Id: I1f4e1d30aab764dabc5d33339a7e862e8017e5ed
2019-04-26 13:55:03 -07:00
Lajos Molnar
27ff6911e8 media: MediaCodecInfo: remove PerformancePoint logs
Bug: 131425771
Change-Id: I0b26410fe97d579ab761f27aa9b7585df52fc108
2019-04-26 12:28:52 -07:00
Mikhail Naganov
a00883db12 AudioService: Track client app recording activity
Update RecordActivityMonitor to use events sent from clients
about their recording activity and coalesce them with
configuration update events sent from audioserver (APM). This
allows providing a high-level view on the recording
configurations consistent with client expectations.

For recorders that are managed entrirely on the server side
(AAudio MMAP) all events do contain configs. These recorders
do not have an associated death handler and need to be cleared
on audioserver restart.

Clearing client-managed trackers on audioserver restart is not
needed anymore. Clients will either continue
recording (AudioRecord handles IAudioRecord re-instantation) or
stop recording and notify AudioService about that.

Bug: 123312504
Test: android.media.cts.AudioRecordingConfigurationTest
      AudioRecordTest#testAudioRecordInfoCallback
      MediaRecorderTest#testAudioRecordInfoCallback
      manual testing using Oboe and Solo test apps

Change-Id: I4718f983c2d90e9c3e7480719a24bd187df7f80a
2019-04-24 15:13:48 -07:00
Jean-Michel Trivi
22ad8a5eb9 Merge "AudioAttributes: fix regression with setLegacyStreamType in Builder" into qt-dev 2019-04-24 16:54:32 +00:00
Jean-Michel Trivi
9f70d4e29b AudioAttributes: fix regression with setLegacyStreamType in Builder
A regression was introduced by commit @6d69bde which caused a new
  Builder instance to be created when using setLegacyStreamType(),
  instead of returning the current one.

Bug: 130274354
Test: atest android.media.cts.AudioAttributesTest#testSetLegacyStreamOnBuilder
Change-Id: Ib66a0beb5f0f4489a6003cb9be6b8313b3318eac
2019-04-24 08:20:17 -07:00
Hyundo Moon
9b72ad0924 Make MediaController#getSessionInfo() as @NonNull
Bug: 131069100
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
Change-Id: I5ecf04fd090dc684f5c7a84c1375de1639f7b4bd
2019-04-22 23:59:54 +09:00