# dnf group install "Development Tools"
# ... lzma-sdk-devel libtool ...
"fedora")
- dnf install groups "Development Tools"
+ dnf group install "Development Tools"
dnf -y --best --allowerasing \
install nasm yasm libavc1394-devel libusbx-devel flac-devel \
libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \
libpng-devel bzip2-devel zlib-devel kernel-headers libavc1394 \
festival-devel libdc1394-devel libiec61883-devel esound-devel \
flac-devel libsndfile-devel libtheora-devel linux-firmware \
- ivtv-firmware libvorbis-devel texinfo xz-devel lzma-devel cmake git \
+ ivtv-firmware libvorbis-devel texinfo xz-devel cmake git \
ctags patch gcc-c++ perl-XML-XPath libtiff-devel python dvdauthor \
gettext-devel inkscape udftools autoconf automake numactl-devel \
jbigkit-devel libvdpau-devel libva-devel gtk2-devel mesa-vdpau-drivers
void Canvas::clear(int flash)
{
- BC_WindowBase *cwdw = get_canvas();
- if( !cwdw ) return;
- cwdw->set_bg_color(get_clear_color());
- cwdw->clear_box(0,0, cwdw->get_w(), cwdw->get_h());
- if( flash ) cwdw->flash();
+ BC_WindowBase *window = get_canvas();
+ if( !window ) return;
+ window->set_bg_color(get_clear_color());
+ window->clear_box(0,0, window->get_w(), window->get_h());
+ if( flash ) window->flash();
+}
+
+void Canvas::clear_borders(EDL *edl)
+{
+ BC_WindowBase *window = get_canvas();
+ if( !window ) return;
+
+ int window_w = window->get_w();
+ int window_h = window->get_h();
+ float output_x1,output_y1, output_x2,output_y2;
+ float canvas_x1,canvas_y1, canvas_x2,canvas_y2;
+ get_transfers(edl,
+ output_x1, output_y1, output_x2, output_y2,
+ canvas_x1, canvas_y1, canvas_x2, canvas_y2);
+ int color = get_clear_color();
+ window->set_color(color);
+
+ if( canvas_y1 > 0 ) {
+ window->draw_box(0, 0, window_w, canvas_y1);
+ window->flash(0, 0, window_w, canvas_y1);
+ }
+
+ if( canvas_y2 < window_h ) {
+ window->draw_box(0, canvas_y2, window_w, window_h-canvas_y2);
+ window->flash(0, canvas_y2, window_w, window_h-canvas_y2);
+ }
+
+ if( canvas_x1 > 0 ) {
+ window->draw_box(0, canvas_y1, canvas_x1, canvas_y2-canvas_y1);
+ window->flash(0, canvas_y1, canvas_x1, canvas_y2-canvas_y1);
+ }
+
+ if( canvas_x2 < window_w ) {
+ window->draw_box(canvas_x2, canvas_y1,
+ window_w-canvas_x2, canvas_y2-canvas_y1);
+ window->flash(canvas_x2, canvas_y1,
+ window_w-canvas_x2, canvas_y2-canvas_y1);
+ }
}
+int Canvas::get_clear_color()
+{
+ BC_WindowBase *cwdw = get_canvas();
+ if( !cwdw ) return 0;
+ return cwdw->get_bg_color();
+}
CanvasOutput::CanvasOutput(Canvas *canvas,
int x, int y, int w, int h)
- : BC_SubWindow(x, y, w, h, BLACK)
+ : BC_SubWindow(x, y, w, h, canvas->get_clear_color())
{
this->canvas = canvas;
}
CanvasFullScreen::CanvasFullScreen(Canvas *canvas, int w, int h)
- : BC_FullScreen(canvas->subwindow, w, h, BLACK, 0, 0, 0)
+ : BC_FullScreen(canvas->subwindow, w, h, canvas->get_clear_color(), 0, 0, 0)
{
this->canvas = canvas;
}
virtual void toggle_controls() {}
virtual int get_cwindow_controls() { return 0; }
virtual int get_fullscreen();
- virtual int get_clear_color() { return 0; }
+ virtual int get_clear_color();
virtual void set_fullscreen(int value);
int cursor_leave_event_base(BC_WindowBase *caller);
// Updates the stores
virtual void update_zoom(int x, int y, float zoom) {};
void check_boundaries(EDL *edl, int &x, int &y, float &zoom);
+ void clear_borders(EDL *edl);
void update_scrollbars(int flush);
// Get scrollbar positions relative to output.
// No correction is done if output is smaller than canvas
int CWindowCanvas::get_clear_color()
{
int color = mwindow->edl->session->cwindow_clear_color;
- if( color < 0 ) color = get_canvas()->get_bg_color();
+ if( color < 0 ) color = Canvas::get_clear_color();
return color;
}
if(!command->is_cleared)
{
// If we get here, the virtual console was not used.
- color_frame(command, 0,0,0,0);
+ int color = command->canvas->get_clear_color();
+ int r = (color>>16) & 0xff; // always rgb
+ int g = (color>>8) & 0xff;
+ int b = (color>>0) & 0xff;
+ color_frame(command, r/255.f, g/255.f, b/255.f, 0.f);
}
// Texture
// Using pbuffer for refresh frame.
if( command->frame ) {
command->frame->enable_opengl();
+ command->frame->set_opengl_state(VFrame::SCREEN);
color = command->frame->get_clear_color();
alpha = command->frame->get_clear_alpha();
int color_model = command->canvas->mwindow->edl->session->color_model;
is_yuv = BC_CModels::is_yuv(color_model);
}
+ else
+ color = command->canvas->get_clear_color();
int a = alpha;
int r = (color>>16) & 0xff;
int g = (color>>8) & 0xff;
#include "mainsession.h"
#include "trackcanvas.h"
#include "transportque.h"
+#include "videodevice.h"
+#include "vdevicex11.h"
#include "vrender.h"
// Start tracking after arming so the tracking position doesn't change.
// The tracking for a single frame command occurs during PAUSE
init_tracking();
- if( !command->single_frame() ) {
- EDL *edl = command->get_edl();
- if( edl && edl->tracks->playable_video_tracks() )
- clear_output();
- }
+ clear_borders();
// Dispatch the command
start_render_engine();
break;
}
}
-void PlaybackEngine::clear_output()
+void PlaybackEngine::clear_borders()
{
- BC_WindowBase *cwdw = output->get_canvas();
- if( !cwdw ) return;
- cwdw->lock_window("PlaybackEngine::clear_output");
- output->clear();
- cwdw->unlock_window();
+ EDL *edl = command->get_edl();
+ if( render_engine ) {
+ PlaybackConfig *config = edl->session->playback_config;
+ if( config->vconfig->driver == PLAYBACK_X11_GL ) {
+ VDeviceBase *vdriver = render_engine->video->get_output_base();
+ ((VDeviceX11*)vdriver)->clear_output();
+ return;
+ }
+ }
+ BC_WindowBase *window = output->get_canvas();
+ if( !window ) return;
+ window->lock_window("PlaybackEngine::clear_output");
+ output->clear_borders(edl);
+ window->unlock_window();
}
void PlaybackEngine::stop_playback(int wait_tracking)
void create_cache();
void perform_change();
void sync_parameters(EDL *edl);
- void clear_output();
+ void clear_borders();
// Set wait_tracking for events that change the cursor location but
// be sure to unlock the windows
void interrupt_playback(int wait_tracking = 0);
delete bitmap; bitmap = 0;
delete output_frame; output_frame = 0;
// Clear borders if size changed
- if( size_change ) {
-//printf("VDeviceX11::new_output_buffer %d w=%d h=%d "
-// "canvas_x1=%d canvas_y1=%d canvas_x2=%d canvas_y2=%d\n",
-// __LINE__, // (int)output->w, (int)output->h,
-// (int)canvas_x1, (int)canvas_y1, (int)canvas_x2, (int)canvas_y2);
- window->set_color(BLACK);
-
- if( canvas_y1 > 0 ) {
- window->draw_box(0, 0, output->w, canvas_y1);
- window->flash(0, 0, output->w, canvas_y1);
- }
-
- if( canvas_y2 < output->h ) {
- window->draw_box(0, canvas_y2, output->w, output->h - canvas_y2);
- window->flash(0, canvas_y2, output->w, output->h - canvas_y2);
- }
-
- if( canvas_x1 > 0 ) {
- window->draw_box(0, canvas_y1, canvas_x1, canvas_y2 - canvas_y1);
- window->flash(0, canvas_y1, canvas_x1, canvas_y2 - canvas_y1);
- }
-
- if( canvas_x2 < output->w ) {
- window->draw_box(canvas_x2, canvas_y1,
- output->w - canvas_x2, canvas_y2 - canvas_y1);
- window->flash(canvas_x2, canvas_y1,
- output->w - canvas_x2, canvas_y2 - canvas_y1);
- }
- }
+ if( size_change )
+ output->clear_borders(edl);
}
}
void VDeviceX11::clear_output()
{
is_cleared = 1;
+// clear front and back buffers
output->mwindow->playback_3d->clear_output(output, 0);
output->mwindow->playback_3d->clear_output(output, output_frame);
}