[Cin] Ctimebar.C
Andrew Randrianasulu
randrianasulu at gmail.com
Mon Mar 2 19:34:40 CET 2020
Hi, all
So, I tried to debug non-working/freezing timebar in Compositor ....
BC_WindowBase::dispatch_event 956 Cinelerra: Составитель 0xe277658 6 (MotionNotify)
BC_WindowBase::dispatch_event this=0xe3d9b40 1360
BC_WindowBase::dispatch_event 956 Cinelerra: Составитель 0xdae2758 4 (ButtonPress)
CTimeBar:pixel_to_Position
CTimeBar: pixel, 110
CTimebar:pix_to_pos: Got EDL!
CTimebar:pix_to_pos: prev_start 0.000000, prev_end -1.000000
CTimeBar:pixel_to_pos start, 0, end 0
BC_WindowBase::dispatch_event this=0xe2d10450 1360
BC_WindowBase::dispatch_event this=0xe849748 1360
BC_WindowBase::dispatch_event this=0xe582418 1360
BC_WindowBase::dispatch_event this=0xe1480d0 1360
BC_WindowBase::dispatch_event this=0xe920510 1360
BC_WindowBase::dispatch_event this=0xe582418 1360
additional printfs added by me:
diff --git a/cinelerra-5.1/cinelerra/ctimebar.C b/cinelerra-5.1/cinelerra/ctimebar.C
index b9fb0bd..e0a1ee5 100644
--- a/cinelerra-5.1/cinelerra/ctimebar.C
+++ b/cinelerra-5.1/cinelerra/ctimebar.C
@@ -59,23 +59,30 @@ EDL* CTimeBar::get_edl()
void CTimeBar::draw_time()
{
+ printf("CTimeBar::draw_time before draw_range");
draw_range();
+ printf("CTimeBar::draw_time after draw_range");
}
double CTimeBar::pixel_to_position(int pixel)
{
+ printf("CTimeBar:pixel_to_Position \n");
+ printf("CTimeBar: pixel, %i \n", pixel);
double start = 0, end = get_edl_length();
EDL *edl = get_edl();
if( edl ) {
+ printf("CTimebar:pix_to_pos: Got EDL!\n");
double preview_start = edl->local_session->preview_start;
double preview_end = edl->local_session->preview_end;
+ printf("CTimebar:pix_to_pos: prev_start %f, prev_end %f \n", preview_start, preview_end);
if( preview_end >= 0 || preview_start > 0 )
start = preview_start;
if( preview_end >= 0 && preview_end < end )
end = preview_end;
}
if( start > end ) start = end;
+ printf("CTimeBar:pixel_to_pos start, %d, end %d \n" , start, end);
return start + (double)pixel * (end - start) / get_w();
}
Hm, so preview end for some reason become negative???
More information about the Cin
mailing list