[mediaplayer] fix issues preventing opus playback

This CL addresses the following issues, which otherwise prevent
opus playback from working:
1) The opus decoder produces interleaved output (in constrast to most
   ffmpeg audio decoders), but it allocates buffers 6 times as large
   as the generated packet (AVFrame, in ffmpeg terminology). This
   creates a situation in which the VMO used by the audio renderer is
   quickly exhausted. The ffmpeg audio decoder wrapper was modified
   to allocate system memory for the decoder and then copy only the
   relevant part of the payload buffer into a buffer allocated from
   the provided allocator (the one managing the renderer's VMO, in
   this case).
2) ffmpeg was complaining that the codec context's pkt_timebase field
   was not set. Though this had no audible effect, this CL fixes that
   anyway.
3) The AudioConsumer test UnsupportedCodec was using the opus codec
   designation, which is now supported. That designation was replaced
   with a nonsense string.

TEST: added an end-to-end test for opus
      $ fx test mediaplayer_tests
      The new test will fail until opus integration into the ffmpeg
      prebuilt is complete.

Bug: 50035

Change-Id: I9d854253222224490a48e497082ae24510bd4eb7
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/380304
Commit-Queue: Dale Sather <dalesat@google.com>
Reviewed-by: Austin Foxley <afoxley@google.com>
Testability-Review: Austin Foxley <afoxley@google.com>
7 files changed
tree: f7295c0135cdedfb8d03bd83a53085268f0d8bc2
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. garnet/
  7. products/
  8. scripts/
  9. sdk/
  10. src/
  11. third_party/
  12. tools/
  13. zircon/
  14. .clang-format
  15. .clang-tidy
  16. .dir-locals.el
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  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 fuchsia.dev.