prev/next label fix in viewer, inout highlight, modify folder layout, ffmpeg scan...
authorGood Guy <good1.2guy@gmail.com>
Tue, 4 Sep 2018 16:00:03 +0000 (10:00 -0600)
committerGood Guy <good1.2guy@gmail.com>
Tue, 4 Sep 2018 16:00:03 +0000 (10:00 -0600)
cinelerra-5.1/cinelerra/binfolder.C
cinelerra-5.1/cinelerra/ffmpeg.C
cinelerra-5.1/cinelerra/mainsession.C
cinelerra-5.1/cinelerra/timebar.C
cinelerra-5.1/cinelerra/timebar.h
cinelerra-5.1/cinelerra/vwindowgui.C
cinelerra-5.1/cinelerra/vwindowgui.h
cinelerra-5.1/guicast/vframe3d.C

index 84f9769999dc051c86679f8934401791da94b6dc..9082f42c267028b5461eb5338456d27a536b4847 100644 (file)
@@ -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());
index 541c5f0a4cd0bc4a4ec809408e930076ad2f1177..2845788dc626178e0663e6dc7ddeb36625af0c9e 100644 (file)
@@ -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);
        }
 
index 280867e7d884f226a6c7891d121de6ea1b7a55fb..bab1e227ed8390d491c15bac1f5b0f347977615a 100644 (file)
@@ -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;
index e386bea54120c4ffb2e6d769aa3a2105ba29a769..10a095f9546edbb81a97c4a0a10ec38bca83a73c 100644 (file)
@@ -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()
index 40a0220a082ac2f52da410f70ae1a0dc220198ae..54d952c45c5bf252377141da084b4f0adfedcc3b 100644 (file)
@@ -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();
 
index d13197b4869f7f679b26f83acfc660de0bd2c67f..bc423328da44ebbc7c42b767fdd12c8837439a13 100644 (file)
@@ -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())
        {
index e09eb4c3fe72510fa88d38dd78c765409d7d0372..f5a36a06849e0d94b67df45e0036f7dbbf2fd1f8 100644 (file)
@@ -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);
 
index 65d9d5ce7485e29b0c0b996cc0bc1093331e3d6a..aba006b8a11c43270ec1ab5ef53f16ae0b343105 100644 (file)
@@ -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();
        }
 }