X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fvideo_monitor.cc;h=38a5a08177bfb82b5bf6145e2aeb26596b435613;hb=8112d6472ecaf688a24572c397f2bfa4e1dd38a6;hp=c94b0463727f6f78a6cf36860a95d88bb827e7a3;hpb=a390d8d3ca9f6e080b790a4d40f1687b498b1ed3;p=ardour.git diff --git a/gtk2_ardour/video_monitor.cc b/gtk2_ardour/video_monitor.cc index c94b046372..38a5a08177 100644 --- a/gtk2_ardour/video_monitor.cc +++ b/gtk2_ardour/video_monitor.cc @@ -1,29 +1,32 @@ /* - Copyright (C) 2010 Paul Davis - Author: Robin Gareus - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Copyright (C) 2013-2016 Tim Mayberry + * Copyright (C) 2013-2018 Paul Davis + * Copyright (C) 2013-2019 Robin Gareus + * Copyright (C) 2013 John Emmas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +#include -*/ #include "pbd/file_utils.h" #include "pbd/convert.h" +#include "ardour/filesystem_paths.h" + #include "gui_thread.h" #include "timers.h" #include "utils.h" - -#include #include "public_editor.h" #include "editor.h" #include "video_monitor.h" @@ -129,7 +132,14 @@ VideoMonitor::open (std::string filename) manually_seeked_frame = 0; osdmode = 10; // 1: frameno, 2: timecode, 8: box starting = 15; + + std::string ardour_mono_file; + if (find_file (ARDOUR::ardour_data_search_path(), "ArdourMono.ttf", ardour_mono_file)) { + process->write_to_stdin("osd font "+ ardour_mono_file +"\n"); + } + process->write_to_stdin("load " + filename + "\n"); + process->write_to_stdin("set fps -1\n"); process->write_to_stdin("window resize 100%\n"); process->write_to_stdin("window ontop on\n"); @@ -150,6 +160,7 @@ VideoMonitor::open (std::string filename) process->write_to_stdin("notify settings\n"); process->write_to_stdin("window letterbox on\n"); process->write_to_stdin("osd mode 10\n"); + for(XJSettings::const_iterator it = xjadeo_settings.begin(); it != xjadeo_settings.end(); ++it) { if (skip_setting(it->first)) { continue; } process->write_to_stdin(it->first + " " + it->second + "\n"); @@ -381,7 +392,7 @@ VideoMonitor::parse_output (std::string d, size_t /*s*/) xjadeo_settings["window letterbox"] = value; } else if(key == "osdmode") { knownstate |= 1; - osdmode = atoi(value); + osdmode = atoi(value) & ~0x40; if (starting || atoi(xjadeo_settings["osd mode"]) != osdmode) { if (!starting && _session) _session->set_dirty (); if ((osdmode & 1) == 1) { UiState("xjadeo-window-osd-frame-on"); } @@ -472,7 +483,9 @@ void VideoMonitor::srsupdate () { if (!_session) { return; } - if (editor->dragging_playhead()) { return ;} + if (editor->dragging_playhead() || editor->preview_video_drag_active()) { + return; + } manual_seek(_session->audible_sample(), false, NO_OFFSET); }