This change merges http://github.com/servo/media into this repository. It is only used by Servo and version upgrades are complicated by having two repositories. In addition, this avoids the need to refer to individual commit hashes in the Servo `Cargo.toml`. The hope is that merging these two repositories will lead to better code organization / simplification like we have seen with the WebXR support. Initiailly, the idea was that this media support could be shared with the wider Rust ecosystem, but I think that hasn't worked out as planned due to the fact that it is difficult to use the various media packaes outside of the Servo project and the fact that no one seems to be doing this. Some changes were made when importing the code: - The second commit in this PR addresses new clippy warnings from the imported code. - GStreamer Packages are no longer renamed in the media code, so that they are named the same as they are currently in Servo. - Some examples are not ported as they require being run interactively and depend on older version of important libraries like winit. Having these dependencies in the core part of Servo isn't very convenient. Removed examples: - `audio_decoder.rs`: This is meant to be run interactively with a file so isn't very useful for testing. - Depended on winit GUI (`player` subdirectory): - `media_element_source_node.rs` - `play_media_stream.rs` - `simple_player.rs` - `muted_player.rs` - `siple_webrtc.rs`: Depended on `webrtc` library: Testing: This is covered by existing tests. In addition, the job which runs the media examples is added to the unit test workflow. --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com>
1.7 KiB
Servo Media - Overview
The servo-media crate contains the backend implementation to support all Servo multimedia related functionality. This is:
- the HTMLMediaElement and the
<audio>and<video>elements. - the WebAudio API.
- the WebRTC API.
- the Media Capture and Streams APIs.
servo-media is supposed to run properly on Linux, macOS, Windows and Android. Check the build instructions for each specific platform.
servo-media is built modularly from different crates and it provides an abstraction that allows the implementation of multiple media backends. For now, the only functional backend is GStreamer. New backend implementations are required to implement the Backend trait. This trait is the public API that servo-media exposes to clients through the ServoMedia entry point. Check the examples folder to get a sense of how to use it effectively. Alternatively, you can also check how servo-media is integrated and used in Servo.