summaryrefslogtreecommitdiff
path: root/gtk2_ardour/video_monitor.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-04-04 00:51:03 +0200
committerRobin Gareus <robin@gareus.org>2013-04-04 01:05:49 +0200
commit1040801ffe7a4d51ebd1593b7552d5d2a71be7c7 (patch)
tree077f249ee8941d600a4047307572a0af96219f52 /gtk2_ardour/video_monitor.cc
parentddfc047f0e1578277f8e70c454df7b4f85904ff1 (diff)
vtl: video-monitor letterbox & orig-zoom to menu
Diffstat (limited to 'gtk2_ardour/video_monitor.cc')
-rw-r--r--gtk2_ardour/video_monitor.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/gtk2_ardour/video_monitor.cc b/gtk2_ardour/video_monitor.cc
index fabe4201dd..5bc6bb6777 100644
--- a/gtk2_ardour/video_monitor.cc
+++ b/gtk2_ardour/video_monitor.cc
@@ -118,7 +118,7 @@ VideoMonitor::open (std::string filename)
manually_seeked_frame = 0;
osdmode = 10; // 1: frameno, 2: timecode, 8: box
sync_by_manual_seek = false;
- starting = 7;
+ starting = 15;
process->write_to_stdin("load " + filename + "\n");
process->write_to_stdin("set fps -1\n");
process->write_to_stdin("window resize 100%\n");
@@ -132,7 +132,7 @@ VideoMonitor::open (std::string filename)
process->write_to_stdin(it->first + " " + it->second + "\n");
}
if (!state_connection.connected()) {
- starting = 7;
+ starting = 15;
querystate();
state_clk_divide = 0;
/* TODO once every two second or so -- state_clk_divide hack below */
@@ -197,6 +197,13 @@ VideoMonitor::send_cmd (int what, int param)
if (param) process->write_to_stdin("window zoom on\n");
else process->write_to_stdin("window zoom off\n");
break;
+ case 6:
+ if (param) process->write_to_stdin("window letterbox on\n");
+ else process->write_to_stdin("window letterbox off\n");
+ break;
+ case 7:
+ process->write_to_stdin("window resize 100%");
+ break;
default:
break;
}
@@ -280,6 +287,11 @@ VideoMonitor::parse_output (std::string d, size_t s)
}
xjadeo_settings["window zoom"] = value;
} else if(key == "letterbox") {
+ if (starting || xjadeo_settings["window letterbox"] != value) {
+ starting &= ~8;
+ if (atoi(value.c_str())) { UiState("xjadeo-window-letterbox-on"); }
+ else { UiState("xjadeo-window-letterbox-off"); }
+ }
xjadeo_settings["window letterbox"] = value;
} else if(key == "osdmode") {
if (starting || xjadeo_settings["osd mode"] != value) {