From: Good Guy Date: Tue, 4 Sep 2018 16:00:03 +0000 (-0600) Subject: prev/next label fix in viewer, inout highlight, modify folder layout, ffmpeg scan... X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=d60a59baa6cfe24c0fb153ed9e150a834ba29feb;p=goodguy%2Fhistory.git prev/next label fix in viewer, inout highlight, modify folder layout, ffmpeg scan errmsg, opengl pbuffer tweak --- diff --git a/cinelerra-5.1/cinelerra/binfolder.C b/cinelerra-5.1/cinelerra/binfolder.C index 84f97699..9082f42c 100644 --- a/cinelerra-5.1/cinelerra/binfolder.C +++ b/cinelerra-5.1/cinelerra/binfolder.C @@ -1772,7 +1772,7 @@ void ModifyFolderGUI::create_objects() add_subwindow(text_box = new BC_TextBox(x, y, 300, 1, thread->folder->title)); y += text_box->get_h() + 10; int lh = get_h() - y - BC_OKButton::calculate_h() - 30; - int lw = get_w() - x - 120; + int lw = get_w() - x - 160; add_subwindow(folder_list = new BinFolderList(thread->folder, thread->agui->mwindow, this, x, y, lw, lh)); folder_list->create_objects(); @@ -1799,7 +1799,7 @@ int ModifyFolderGUI::resize_event(int w, int h) int lx = folder_list->get_x(); int ly = folder_list->get_y(); int lh = h - ly - BC_OKButton::calculate_h() - 30; - int lw = w - lx - 120; + int lw = w - lx - 160; folder_list->reposition_window(lx, ly, lw, lh); int x1 = lx + lw + 15; add_filter->reposition_window(x1, add_filter->get_y()); diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 541c5f0a..2845788d 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -2992,6 +2992,7 @@ int FFMPEG::scan(IndexState *index_state, int64_t *scan_position, int *canceled) if( !frame ) { fprintf(stderr,"FFMPEG::scan: "); fprintf(stderr,_("av_frame_alloc failed\n")); + fprintf(stderr,"FFMPEG::scan:file=%s\n", file_base->asset->path); return -1; } @@ -3037,6 +3038,7 @@ int FFMPEG::scan(IndexState *index_state, int64_t *scan_position, int *canceled) } fprintf(stderr,"FFMPEG::scan: "); fprintf(stderr,_("codec open failed\n")); + fprintf(stderr,"FFMPEG::scan:file=%s\n", file_base->asset->path); avcodec_free_context(&avctx); } diff --git a/cinelerra-5.1/cinelerra/mainsession.C b/cinelerra-5.1/cinelerra/mainsession.C index 280867e7..bab1e227 100644 --- a/cinelerra-5.1/cinelerra/mainsession.C +++ b/cinelerra-5.1/cinelerra/mainsession.C @@ -253,8 +253,8 @@ void MainSession::default_window_positions(int window_config) awindow_w = root_x + root_w - awindow_x - border_left - border_right; awindow_h = mwindow_h; - bwindow_w = 520; - bwindow_h = 340; + bwindow_w = 600; + bwindow_h = 360; ewindow_w = 640; ewindow_h = 240; diff --git a/cinelerra-5.1/cinelerra/timebar.C b/cinelerra-5.1/cinelerra/timebar.C index e386bea5..10a095f9 100644 --- a/cinelerra-5.1/cinelerra/timebar.C +++ b/cinelerra-5.1/cinelerra/timebar.C @@ -309,6 +309,29 @@ void TimeBar::update_highlights() } else if( out_point ) out_point->update(0); + + draw_inout_highlight(); +} + +void TimeBar::draw_inout_highlight() +{ + EDL *edl = get_edl(); + if( !edl->local_session->inpoint_valid() ) return; + if( !edl->local_session->outpoint_valid() ) return; + double in_position = edl->local_session->get_inpoint(); + double out_position = edl->local_session->get_outpoint(); + if( in_position >= out_position ) return; + int in_x = position_to_pixel(in_position); + int out_x = position_to_pixel(out_position); + CLAMP(in_x, 0, get_w()); + CLAMP(out_x, 0, get_w()); + set_color(GREEN); + int lw = 5; + set_line_width(lw); + set_inverse(); + draw_line(in_x, get_h()-2*lw, out_x, get_h()-2*lw); + set_opaque(); + set_line_width(1); } void TimeBar::update_points() diff --git a/cinelerra-5.1/cinelerra/timebar.h b/cinelerra-5.1/cinelerra/timebar.h index 40a0220a..54d952c4 100644 --- a/cinelerra-5.1/cinelerra/timebar.h +++ b/cinelerra-5.1/cinelerra/timebar.h @@ -161,6 +161,7 @@ public: void update_points(); // Make sure widgets are highlighted according to selection status void update_highlights(); + void draw_inout_highlight(); // Update highlight cursor during a drag virtual void update_cursor(); diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index d13197b4..bc423328 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -598,7 +598,7 @@ void VWindowEditing::toggle_label() } } -void VWindowEditing::prev_label() +void VWindowEditing::prev_label(int cut) { if(vwindow->get_edl()) { @@ -628,7 +628,7 @@ void VWindowEditing::prev_label() } } -void VWindowEditing::next_label() +void VWindowEditing::next_label(int cut) { if(vwindow->get_edl()) { diff --git a/cinelerra-5.1/cinelerra/vwindowgui.h b/cinelerra-5.1/cinelerra/vwindowgui.h index e09eb4c3..f5a36a06 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.h +++ b/cinelerra-5.1/cinelerra/vwindowgui.h @@ -143,8 +143,8 @@ public: void unset_inoutpoint(); void to_clip(); void toggle_label(); - void prev_label(); - void next_label(); + void prev_label(int cut); + void next_label(int cut); double get_position(); void set_position(double position); diff --git a/cinelerra-5.1/guicast/vframe3d.C b/cinelerra-5.1/guicast/vframe3d.C index 65d9d5ce..aba006b8 100644 --- a/cinelerra-5.1/guicast/vframe3d.C +++ b/cinelerra-5.1/guicast/vframe3d.C @@ -99,10 +99,6 @@ void VFrame::to_texture() return; case VFrame::SCREEN: - if((get_w() % 4) || (get_h() % 4)) { - printf("VFrame::to_texture w=%d h=%d\n", get_w(), get_h()); - return; - } if(pbuffer) { enable_opengl(); screen_to_texture(); @@ -151,30 +147,22 @@ void VFrame::to_texture() void VFrame::create_pbuffer() { - if( pbuffer && (pbuffer->w != get_w() || pbuffer->h != get_h() || - pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id() ) ) - { + int ww = (get_w()+3) & ~3, hh = (get_h()+3) & ~3; + if( pbuffer && (pbuffer->w != ww || pbuffer->h != hh || + pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id() ) ) { delete pbuffer; pbuffer = 0; } - if((get_w() % 4) || (get_h() % 4)) - { - printf("VFrame::create_pbuffer w=%d h=%d\n", get_w(), get_h()); - return; - } - - if(!pbuffer) - { - pbuffer = new BC_PBuffer(get_w(), get_h()); + if( !pbuffer ) { + pbuffer = new BC_PBuffer(ww, hh); } } void VFrame::enable_opengl() { create_pbuffer(); - if(pbuffer) - { + if( pbuffer ) { pbuffer->enable_opengl(); } }