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 #ifdef WITH_VIDEOTIMELINE
22 #ifndef __ardour_video_monitor_h__
23 #define __ardour_video_monitor_h__
27 #include "ardour/ardour.h"
28 #include "ardour/types.h"
29 #include "ardour/session.h"
30 #include "ardour/session_handle.h"
31 #include "system_exec.h"
38 enum XJSettingOptions {
48 /** @class VideoMonitor
49 * @brief communication with xjadeo's remote-control interface
51 class VideoMonitor : public sigc::trackable , public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
54 VideoMonitor (PublicEditor*, std::string);
55 virtual ~VideoMonitor ();
57 void set_filename (std::string filename);
58 void set_fps (float f) {fps = f;}
62 void open (std::string);
64 void set_session (ARDOUR::Session *s);
66 void clear_session_state ();
67 void query_full_state (bool);
68 bool set_custom_setting (const std::string, const std::string);
69 const std::string get_custom_setting (const std::string);
70 void restore_settings_mask (int i) { _restore_settings_mask = i;}
71 int restore_settings_mask () const { return _restore_settings_mask;}
73 void set_offset (ARDOUR::frameoffset_t);
74 void manual_seek (ARDOUR::framepos_t, bool, ARDOUR::frameoffset_t);
77 bool synced_by_manual_seeks() { return sync_by_manual_seek; }
79 sigc::signal<void> Terminated;
80 PBD::Signal1<void,std::string> UiState;
81 void send_cmd (int what, int param);
84 void set_debug (bool onoff) { debug_enable = onoff; }
91 void parse_output (std::string d, size_t s);
94 void parameter_changed (std::string const & p);
96 typedef std::map<std::string,std::string> XJSettings;
98 int _restore_settings_mask;
99 bool skip_setting(std::string);
100 XJSettings xjadeo_settings;
102 void xjadeo_sync_setup ();
103 ARDOUR::framepos_t manually_seeked_frame;
104 bool sync_by_manual_seek;
105 sigc::connection clock_connection;
106 sigc::connection state_connection;
107 int state_clk_divide;
116 #endif /* __ardour_video_monitor_h__ */
118 #endif /* WITH_VIDEOTIMELINE */