Internships/ProjectIdeas/GStreamerVhostDeviceSound

From QEMU

GStreamer Backend for vhost-device-sound

Summary: Implement a GStreamer audio backend in rust-vmm's vhost-device-sound crate.

Project Description:

virtio-sound device emulation has recently been developed in the Rust vhost-device-sound crate. The crate currently contains audio backends for the ALSA and PipeWire sound APIs. The aim of this project is to build a new GStreamer audio backend.

Audio backends are written by implementing the AudioBackend trait. Refer to alsa.rs and pipewire.rs for examples of existing backends. The Stream and Buffer structs are used to transfer audio samples between the virtio-sound device and the sound API (e.g. GStreamer).

The backend should be implemented using the GStreamer Rust bindings. Mono and stereo playback and capture should be supported. The GStreamer pipelines for playback and capture will be hardcoded and only Linux needs to be supported.

Application Phase Tasks:

  • Familiarize yourself with the vhost-device-sound crate's AudioBackend trait and Stream and Buffer structs.
  • Familiarize yourself with the GStreamer Rust bindings.

Internship Tasks:

  • Write a skeleton for the GStreamer audio backend in the vhost-device-sound crate. Reviewing how the ALSA and PipeWire backends work is a helpful guide.
  • Implement playback functionality in the GStreamer audio backend for vhost-device-sound.
  • Implement capture functionality in the GStreamer audio backend for vhost-device-sound.
  • Implement automated tests with cargo test.
  • Test the implementation with QEMU, which can act as a vhost-user frontend.
  • As a stretch goal, contribute to the rust-vmm/vhost-device repo by fixing issues.

Links:

Details:

  • Project Size: 180 hrs
  • Skill level: intermediate
  • Language: Rust
  • Mentors: Dorinda Bassey <dbassey@redhat.com>, Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
  • Suggested by: Dorinda Bassey, Matias Ezequiel Vara Larsen