[mediaplayer] don't panic if the audio render stalls

This CL changes the behavior of the media player when the audio
renderer holds on to packets too long, which generally happens due to
scheduling issues. Because the player has allocated a limited amount
of space for transferring packets between itself and the renderer,
that space can be exhausted if the renderer doesn't retire packets
quickly enough.

The fix is to drop packets instead of panicking. There are a few
paths that had to be fixed to enable this. Sometimes the memory
allocation failures occur in a callback from the audio decoder.
Sometimes audio has to be interleaved after the decoder, and the
allocation failure is detected there. Sometimes (when no decoder
is needed) audio needs to be copied from system memory into vmo
memory, and the failure happens prior to the copy.

Two tests have been added to replicate these failure modes. Those
tests produced panics before the fixes were introduced.

TEST: new CQ tests
Change-Id: I26582d19481c6716f6a4141e6717b68670ea44f1
7 files changed
tree: 69dffa7288c0fe53117777ba2eb89ad490f81cdf
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. examples/
  7. garnet/
  8. peridot/
  9. products/
  10. scripts/
  11. sdk/
  12. src/
  13. third_party/
  14. tools/
  15. zircon/
  16. .clang-format
  17. .dir-locals.el
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. AUTHORS
  22. BUILD.gn
  23. CODE_OF_CONDUCT.md
  24. CONTRIBUTING.md
  25. LICENSE
  26. OWNERS
  27. PATENTS
  28. README.md
  29. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See the documentation.