Upgrade MediaPlayer with gstreamer playbin (for GST > 18)

Change implementation of gst pipeline in MediaPlayer to use gstreamer playbin. This makes everything works more smoothly (including instant rate change). This also opens the possibility to allow audio mixing. Other bugfixes include set play speed rate at start, add video effects on reopen media player.
This commit is contained in:
Bruno Herbelin
2023-08-07 19:40:08 +02:00
parent 1b658e9b40
commit 5419622c74
5 changed files with 282 additions and 150 deletions

View File

@@ -1668,10 +1668,8 @@ void SourceControlWindow::RenderMediaPlayer(MediaSource *ms)
ImGui::SameLine();
ImGui::SetCursorPosX(rendersize.x - buttons_height_ / 1.4f);
if (ImGuiToolkit::IconButton(12,14,"Reset speed" )) {
mediaplayer_active_->setPlaySpeed( 1.0 );
oss << ": Speed x1";
Action::manager().store(oss.str());
if (ImGuiToolkit::IconButton(12,14,"Reset" )) {
mediaplayer_active_->reopen();
}
// restore buttons style
@@ -1858,7 +1856,7 @@ void SourceControlWindow::RenderMediaPlayer(MediaSource *ms)
close = true;
// apply to pipeline
mediaplayer_active_->setEffect(_description);
mediaplayer_active_->setVideoEffect(_description);
}
ImGui::PopStyleColor(1);