feat(music): mpv audio playback engine with gapless queue service
Audio-only mpv core on every platform (dedicated com.plezy/mpv_audio_player channels): parameterized android/windows/ linux mpv plugins and a new apple MpvAudioPlayerCore, all skipping video/window paths (vid=no, audio-display=no, gapless-audio=weak). MusicPlaybackService drives an in-memory queue with shuffle/repeat, file-loaded-event gapless arming (property edges coalesce and the android bridge drops them), per-track progress reporting, OS media controls, audio focus, sleep timer, and error auto-skip. PlaybackCoordinator enforces one live native player: starting video disposes the audio core first.
This commit is contained in:
@@ -9,21 +9,26 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/// Plugin for MPV video playback on Linux.
|
||||
/// Plugin for MPV playback on Linux.
|
||||
///
|
||||
/// This plugin renders mpv video through Flutter's GPU-accelerated
|
||||
/// texture pipeline via FlTextureGL.
|
||||
/// The video instance renders mpv video through Flutter's GPU-accelerated
|
||||
/// texture pipeline via FlTextureGL. The audio-only instance (music
|
||||
/// playback) skips all texture/GL work and runs mpv with video disabled.
|
||||
|
||||
#define MPV_PLUGIN_TYPE (mpv_plugin_get_type())
|
||||
|
||||
G_DECLARE_FINAL_TYPE(MpvPlugin, mpv_plugin, MPV, PLUGIN, GObject)
|
||||
|
||||
/// Creates a new MpvPlugin instance.
|
||||
MpvPlugin* mpv_plugin_new(FlPluginRegistrar* registrar);
|
||||
/// Creates a new MpvPlugin instance on the given method channel name (the
|
||||
/// event channel is |channel_name| + "/events").
|
||||
MpvPlugin* mpv_plugin_new(FlPluginRegistrar* registrar, const gchar* channel_name, gboolean audio_only);
|
||||
|
||||
/// Registers the plugin with Flutter.
|
||||
/// Registers the video plugin with Flutter.
|
||||
void mpv_plugin_register_with_registrar(FlPluginRegistrar* registrar);
|
||||
|
||||
/// Registers the audio-only (music) plugin with Flutter.
|
||||
void mpv_audio_plugin_register_with_registrar(FlPluginRegistrar* registrar);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif // MPV_PLUGIN_H_
|
||||
|
||||
Reference in New Issue
Block a user