mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-14 19:59:59 +01:00
Smooth speed change (fix issue #96)
Use GST_SEEK_FLAG_INSTANT_RATE_CHANGE seeking event available since gst version 1.18 for a smooth (non flushing) change of play speed
This commit is contained in:
@@ -4401,7 +4401,7 @@ void SourceController::RenderMediaPlayer(MediaSource *ms)
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x - buttons_height_ );
|
||||
// speed slider
|
||||
float speed = static_cast<float>(mediaplayer_active_->playSpeed());
|
||||
if (ImGui::DragFloat( "##Speed", &speed, 0.01f, -10.f, 10.f, UNICODE_MULTIPLY " %.2f", 2.f))
|
||||
if (ImGui::DragFloat( "##Speed", &speed, 0.01f, -10.f, 10.f, UNICODE_MULTIPLY " %.2f"))
|
||||
mediaplayer_active_->setPlaySpeed( static_cast<double>(speed) );
|
||||
// store action on mouse release
|
||||
if (ImGui::IsItemDeactivatedAfterEdit()){
|
||||
|
||||
Reference in New Issue
Block a user