mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-11-22 00:50:59 +00:00
player: register external plugins only once
In case of multiple graph tab the player was registering several time the gtk4paintablesink
This commit is contained in:
parent
3689d4d57c
commit
3fbaa3166d
2 changed files with 4 additions and 4 deletions
|
@ -12,6 +12,10 @@ use gtk::glib;
|
|||
pub fn init() -> Result<()> {
|
||||
std::env::set_var("GST_XINITTHREADS", "1");
|
||||
gst::init()?;
|
||||
#[cfg(feature = "gtk4-plugin")]
|
||||
{
|
||||
gstgtk4::plugin_register_static().expect("Failed to register gstgtk4 plugin");
|
||||
}
|
||||
gtk::init()?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -77,10 +77,6 @@ impl Player {
|
|||
current_state: Cell::new(PipelineState::Stopped),
|
||||
n_video_sink: Cell::new(0),
|
||||
}));
|
||||
#[cfg(feature = "gtk4-plugin")]
|
||||
{
|
||||
gstgtk4::plugin_register_static().expect("Failed to register gstgtk4 plugin");
|
||||
}
|
||||
|
||||
Ok(pipeline)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue