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);
65 void clear_session_state ();
66 bool set_custom_setting (const std::string, const std::string);
67 const std::string get_custom_setting (const std::string);
68 void restore_settings_mask (int i) { _restore_settings_mask = i;}
69 int restore_settings_mask () const { return _restore_settings_mask;}
71 void set_offset (ARDOUR::frameoffset_t);
72 void manual_seek (ARDOUR::framepos_t, bool, ARDOUR::frameoffset_t);
75 bool synced_by_manual_seeks() { return sync_by_manual_seek; }
77 sigc::signal<void> Terminated;
78 PBD::Signal1<void,std::string> UiState;
79 void send_cmd (int what, int param);
82 void set_debug (bool onoff) { debug_enable = onoff; }
89 void parse_output (std::string d, size_t s);
93 void parameter_changed (std::string const & p);
95 typedef std::map<std::string,std::string> XJSettings;
97 int _restore_settings_mask;
98 bool skip_setting(std::string);
99 XJSettings xjadeo_settings;
101 void xjadeo_sync_setup ();
102 ARDOUR::framepos_t manually_seeked_frame;
103 bool sync_by_manual_seek;
104 sigc::connection clock_connection;
105 sigc::connection state_connection;
106 int state_clk_divide;
114 #endif /* __ardour_video_monitor_h__ */
116 #endif /* WITH_VIDEOTIMELINE */