Expand description
Inline audio playback.
Why a private playbin instead of [gtk::MediaFile]? GTK’s media backend is
built on GstPlay, which hardcodes the playbin3 pipeline and attaches its GL
video sink. On some systems that combination races decodebin3’s handling of
id3demux for mp3 files carrying an ID3v2 tag and aborts the whole process
(gstdecodebin3.c: mq_slot_handle_stream_start: assertion failed: (collection)), deterministically and even without pressing play. playbin
(v1) uses decodebin, which handles the same files fine, so audio previews
go through it instead. Video previews keep using GtkMediaFile.
The gstreamer binding is optional
(the audio Cargo feature, on by default). With it disabled, AudioPlayer
is a stub whose AudioPlayer::new always returns None, and no audio file
is offered an inline player.
Structs§
- Audio
Player - One audio stream playing through a private
playbinelement.