commit | 2e3f07f2bc8e8105956f5657b844da3afe48cd3c | [log] [tgz] |
---|---|---|
author | Dale Sather <dalesat@fuchsia.infra.roller.google.com> | Tue Sep 27 23:51:21 2022 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Sep 27 16:52:45 2022 -0700 |
tree | baf8991804dd29fbcc995db95c5d078ede4be8cd | |
parent | 851e3b4adc42d7177c5b84cd9b6579aba335dff3 [diff] |
[roll] Roll fuchsia [media/sounds] Use discardable VMOs in soundplayer This CL modifies soundplayer so it uses discardable VMOs for sounds added with the AddSoundFromFile method. This involves keeping the fd for the lifetime of the sound and re-reading the file should the system discard the VMO containing the decoded content from the file. The Sound type, which represents an added sound, now has LockForRead, LockForWrite and Unlock methods. In the Sound type itself, these do nothing. In the new DiscardableSound type, these methods lock and unlock the VMO containing the decoded content. LockForRead restores the data in the VMO if any part of the VMO was discarded. DiscardableVmo owns the fd for the file, which is needed to restore the VMO contents. It also has SetFormat and SetSize methods, the latter actually allocating the VMO, if it hasn't been allocated already. SetFormat and SetSize set those properties the first time they're called. Subsequently, they just verify that the format and size haven't changed. This characteristic allows the WAV and OGG/OPUS demux/decoders to behave consistently regardless of whether they are reading the file for the first time or restoring. Most of the new logic is tested by the existing tests. New tests have been added that use a subclass of DiscardableSound that always restores on LockForRead. This tests the restore path without needing to actually discard the VMOs, which can only be done system-wide currently. Test: unit tests added Original-Fixed: fxb/105585 Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/727985 Original-Revision: c8341aaa2cf8322367edf3eb915c9fe14bca7966 GitOrigin-RevId: db2cbada910c7ee1f97b9fde9cf0e3f9b6187ad3 Change-Id: I5d8335c10d8cac1ca11d4e3de2023667406d5dfa
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia
on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party
.