Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
GTK+ 4.0 Getting Audio/Video Playback Integration
Benjamin Otte has just committed his big batch of multimedia widgets for GTK4. Here's some of what has been added:
GtkMediaStream: The base class for playback of audio/video streams and uses GdkPaintable for rendering.
GtkMediaFile: The new interface implementing GtkMediaStream for the playback of media files.
GtkMediaControls: The implementation of controls for a GtkMediaStream and modeled around GNOME's Totem multimedia player user-interface.
GtkVideo: A simple video player widget.
As of Git today there are FFmpeg and GStreamer implementations of GtkMediaFile. GStreamer is the default back-end for this GTK4 media playback support. Basic examples of this new functionality can be found via the gtk-demo code for a basic GTK video player. Clone from Git if you want this new functionality ahead of the initial GTK+ 4.0 release expected later this year.