X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Frenderengine.C;h=0d8b06342fba9f7d1896f53f62aa06c29f7e5763;hp=aa16aafaca6a4347c93cee82d0f0e35de91a906d;hb=1529091cdf16df199a901aabe6e8fa1813a933af;hpb=4710b00debcb86b8ff626c4af3473afe338408ae diff --git a/cinelerra-5.1/cinelerra/renderengine.C b/cinelerra-5.1/cinelerra/renderengine.C index aa16aafa..0d8b0634 100644 --- a/cinelerra-5.1/cinelerra/renderengine.C +++ b/cinelerra-5.1/cinelerra/renderengine.C @@ -24,6 +24,7 @@ #include "asset.h" #include "audiodevice.h" #include "bcsignals.h" +#include "canvas.h" #include "condition.h" #include "edl.h" #include "edlsession.h" @@ -468,18 +469,16 @@ void RenderEngine::run() close_output(); if( playback_engine ) { - double position = command->single_frame() ? command->playbackstart : + double position = command->command == CURRENT_FRAME || + command->command == LAST_FRAME ? command->playbackstart : playback_engine->is_playing_back && !interrupted ? ( command->get_direction() == PLAY_FORWARD ? command->end_position : command->start_position ) : playback_engine->get_tracking_position() ; - if( command->displacement ) { - position -= 1./command->get_edl()->session->frame_rate; - if( position < 0 ) position = 0; - } + position -= command->displacement; + if( position < 0 ) position = 0; playback_engine->is_playing_back = 0; - playback_engine->tracking_position = position; - playback_engine->stop_tracking(); + playback_engine->stop_tracking(position); } render_active->unlock(); @@ -493,4 +492,11 @@ void RenderEngine::wait_done() render_active->unlock(); } +void RenderEngine::update_scope(VFrame *frame) +{ + if( !video || !output || !output->scope_on() ) return; + output->lock_canvas("RenderEngine::update_scope"); + output->process_scope(video, frame); + output->unlock_canvas(); +}