2 Copyright (C) 2010 Paul Davis
3 Author: Robin Gareus <robin@gareus.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_video_monitor_h__
21 #define __ardour_video_monitor_h__
25 #include "ardour/ardour.h"
26 #include "ardour/types.h"
27 #include "ardour/session.h"
28 #include "ardour/session_handle.h"
29 #include "system_exec.h"
36 enum XJSettingOptions {
46 /** @class VideoMonitor
47 * @brief communication with xjadeo's remote-control interface
49 class VideoMonitor : public sigc::trackable , public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
52 VideoMonitor (PublicEditor*, std::string);
53 virtual ~VideoMonitor ();
55 void set_filename (std::string filename);
56 void set_fps (float f) {fps = f;}
60 void open (std::string);
62 void set_session (ARDOUR::Session *s);
64 void query_full_state (bool);
65 bool set_custom_setting (const std::string, const std::string);
66 const std::string get_custom_setting (const std::string);
67 void restore_settings_mask (int i) { _restore_settings_mask = i;}
68 int restore_settings_mask () const { return _restore_settings_mask;}
70 void set_offset (ARDOUR::frameoffset_t);
71 void manual_seek (ARDOUR::framepos_t, bool, ARDOUR::frameoffset_t);
74 bool synced_by_manual_seeks() { return sync_by_manual_seek; }
76 sigc::signal<void> Terminated;
77 PBD::Signal1<void,std::string> UiState;
78 void send_cmd (int what, int param);
81 void set_debug (bool onoff) { debug_enable = onoff; }
88 void parse_output (std::string d, size_t s);
90 void forward_keyevent (unsigned int);
92 void parameter_changed (std::string const & p);
94 typedef std::map<std::string,std::string> XJSettings;
96 int _restore_settings_mask;
97 bool skip_setting(std::string);
98 XJSettings xjadeo_settings;
100 void xjadeo_sync_setup ();
101 ARDOUR::framepos_t manually_seeked_frame;
102 ARDOUR::frameoffset_t video_offset;
103 bool sync_by_manual_seek;
104 sigc::connection clock_connection;
105 sigc::connection state_connection;
106 int state_clk_divide;
111 PBD::Signal1<void, unsigned int> XJKeyEvent;
117 #endif /* __ardour_video_monitor_h__ */