ardour
video_monitor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 Paul Davis
3  Author: Robin Gareus <robin@gareus.org>
4 
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.
9 
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.
14 
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.
18 
19 */
20 #ifndef __ardour_video_monitor_h__
21 #define __ardour_video_monitor_h__
22 
23 #include <string>
24 
25 #include "ardour/ardour.h"
26 #include "ardour/types.h"
27 #include "ardour/session.h"
28 #include "ardour/session_handle.h"
29 #include "ardour/system_exec.h"
30 
31 namespace ARDOUR {
32  class Session;
33 }
34 class PublicEditor;
35 
41  XJ_OSD = 16,
42  XJ_OFFSET = 32,
44 };
45 
49 class VideoMonitor : public sigc::trackable , public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
50 {
51  public:
52  VideoMonitor (PublicEditor*, std::string);
53  virtual ~VideoMonitor ();
54 
55  void set_filename (std::string filename);
56  void set_fps (float f) {fps = f;}
57  bool is_started ();
58  bool start ();
59  void quit ();
60  void open (std::string);
61 
62  void set_session (ARDOUR::Session *s);
63  void save_session ();
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);
69 
72  void srsupdate ();
73  void querystate ();
75 
76  sigc::signal<void> Terminated;
77  PBD::Signal1<void,std::string> UiState;
78  void send_cmd (int what, int param);
79 
80 #if 1
81  void set_debug (bool onoff) { debug_enable = onoff; }
82 #endif
83 
84  protected:
87  float fps;
88  void parse_output (std::string d, size_t s);
89  void terminated ();
90  void forward_keyevent (unsigned int);
91 
92  void parameter_changed (std::string const & p);
93 
94  typedef std::map<std::string,std::string> XJSettings;
95 
97  bool skip_setting(std::string);
98  XJSettings xjadeo_settings;
99 
100  void xjadeo_sync_setup ();
104  sigc::connection clock_connection;
105  sigc::connection state_connection;
107  int starting;
109  int osdmode;
110 
111  PBD::Signal1<void, unsigned int> XJKeyEvent;
112 #if 1
114 #endif
115 };
116 
117 #endif /* __ardour_video_monitor_h__ */
void manual_seek(ARDOUR::framepos_t, bool, ARDOUR::frameoffset_t)
ARDOUR::framepos_t manually_seeked_frame
void set_debug(bool onoff)
Definition: video_monitor.h:81
XJSettings xjadeo_settings
Definition: video_monitor.h:98
bool set_custom_setting(const std::string, const std::string)
VideoMonitor(PublicEditor *, std::string)
void send_cmd(int what, int param)
Representation of the interface of the Editor class.
tuple f
Definition: signals.py:35
void set_offset(ARDOUR::frameoffset_t)
void restore_settings_mask(int i)
Definition: video_monitor.h:67
PBD::Signal1< void, unsigned int > XJKeyEvent
void save_session()
PBD::Signal1< void, std::string > UiState
Definition: video_monitor.h:77
void query_full_state(bool)
communication with xjadeo's remote-control interface
Definition: video_monitor.h:49
std::map< std::string, std::string > XJSettings
Definition: video_monitor.h:94
bool skip_setting(std::string)
bool synced_by_manual_seeks()
Definition: video_monitor.h:74
sigc::connection clock_connection
XJSettingOptions
Definition: video_monitor.h:36
int restore_settings_mask() const
Definition: video_monitor.h:68
Definition: amp.h:29
void parameter_changed(std::string const &p)
void set_session(ARDOUR::Session *s)
void xjadeo_sync_setup()
void open(std::string)
int64_t framepos_t
Definition: types.h:66
ARDOUR::SystemExec * process
Definition: video_monitor.h:86
int64_t frameoffset_t
Definition: types.h:71
PublicEditor * editor
Definition: video_monitor.h:85
void set_filename(std::string filename)
bool sync_by_manual_seek
void set_fps(float f)
Definition: video_monitor.h:56
const std::string get_custom_setting(const std::string)
sigc::connection state_connection
sigc::signal< void > Terminated
Definition: video_monitor.h:76
int _restore_settings_mask
Definition: video_monitor.h:96
void forward_keyevent(unsigned int)
ARDOUR::frameoffset_t video_offset
void parse_output(std::string d, size_t s)
virtual ~VideoMonitor()