Ardour  8.12
video_monitor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013-2018 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 #ifndef __ardour_video_monitor_h__
19 #define __ardour_video_monitor_h__
20 
21 #include <string>
22 
23 #include "ardour/ardour.h"
24 #include "ardour/types.h"
25 #include "ardour/session.h"
26 #include "ardour/session_handle.h"
27 #include "ardour/system_exec.h"
28 
29 namespace ARDOUR {
30  class Session;
31 }
32 class PublicEditor;
33 
39  XJ_OSD = 16,
40  XJ_OFFSET = 32,
42 };
43 
47 class VideoMonitor : public sigc::trackable , public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
48 {
49  public:
50  VideoMonitor (PublicEditor*, std::string);
51  virtual ~VideoMonitor ();
52 
53  void set_filename (std::string filename);
54  void set_fps (float f) {fps = f;}
55  bool is_started ();
56  bool start ();
57  void quit ();
58  void open (std::string);
59 
61  void save_session ();
62  void query_full_state (bool);
63  bool set_custom_setting (const std::string, const std::string);
64  const std::string get_custom_setting (const std::string);
67 
70  void srsupdate ();
71  void querystate ();
73 
74  sigc::signal<void> Terminated;
75  PBD::Signal1<void,std::string> UiState;
76  void send_cmd (int what, int param);
77 
78 #if 1
79  void set_debug (bool onoff) { debug_enable = onoff; }
80 #endif
81 
82  protected:
85  float fps;
86  void parse_output (std::string d, size_t s);
87  void terminated ();
88  void forward_keyevent (unsigned int);
89 
90  void parameter_changed (std::string const & p);
91 
92  typedef std::map<std::string,std::string> XJSettings;
93 
95  bool skip_setting(std::string);
97 
102  sigc::connection clock_connection;
103  sigc::connection state_connection;
105  int starting;
107  int osdmode;
108 
109  PBD::Signal1<void, unsigned int> XJKeyEvent;
110 #if 1
112 #endif
113 };
114 
115 #endif /* __ardour_video_monitor_h__ */
Representation of the interface of the Editor class.
communication with xjadeo's remote-control interface
Definition: video_monitor.h:48
void open(std::string)
VideoMonitor(PublicEditor *, std::string)
void parameter_changed(std::string const &p)
void set_debug(bool onoff)
Definition: video_monitor.h:79
void save_session()
bool is_started()
void send_cmd(int what, int param)
PBD::Signal1< void, std::string > UiState
Definition: video_monitor.h:75
void querystate()
void forward_keyevent(unsigned int)
bool synced_by_manual_seeks()
Definition: video_monitor.h:72
bool skip_setting(std::string)
std::map< std::string, std::string > XJSettings
Definition: video_monitor.h:92
void set_session(ARDOUR::Session *s)
ARDOUR::sampleoffset_t video_offset
void parse_output(std::string d, size_t s)
bool set_custom_setting(const std::string, const std::string)
void set_offset(ARDOUR::sampleoffset_t)
void query_full_state(bool)
int restore_settings_mask() const
Definition: video_monitor.h:66
sigc::signal< void > Terminated
Definition: video_monitor.h:74
sigc::connection clock_connection
PBD::Signal1< void, unsigned int > XJKeyEvent
int _restore_settings_mask
Definition: video_monitor.h:94
bool sync_by_manual_seek
sigc::connection state_connection
void srsupdate()
PublicEditor * editor
Definition: video_monitor.h:83
void terminated()
ARDOUR::SystemExec * process
Definition: video_monitor.h:84
virtual ~VideoMonitor()
const std::string get_custom_setting(const std::string)
XJSettings xjadeo_settings
Definition: video_monitor.h:96
ARDOUR::samplepos_t manually_seeked_frame
Definition: video_monitor.h:99
void set_filename(std::string filename)
void xjadeo_sync_setup()
void manual_seek(ARDOUR::samplepos_t, bool, ARDOUR::sampleoffset_t)
void set_fps(float f)
Definition: video_monitor.h:54
void restore_settings_mask(int i)
Definition: video_monitor.h:65
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t
XJSettingOptions
Definition: video_monitor.h:34
@ XJ_OFFSET
Definition: video_monitor.h:40
@ XJ_WINDOW_POS
Definition: video_monitor.h:36
@ XJ_WINDOW_SIZE
Definition: video_monitor.h:35
@ XJ_OSD
Definition: video_monitor.h:39
@ XJ_FULLSCREEN
Definition: video_monitor.h:41
@ XJ_LETTERBOX
Definition: video_monitor.h:38
@ XJ_WINDOW_ONTOP
Definition: video_monitor.h:37