Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
19 
20 #include <string>
21 
22 #include "ardour/ardour.h"
23 #include "ardour/types.h"
24 #include "ardour/session.h"
25 #include "ardour/session_handle.h"
26 #include "ardour/system_exec.h"
27 
28 namespace ARDOUR {
29  class Session;
30 }
31 class PublicEditor;
32 
38  XJ_OSD = 16,
39  XJ_OFFSET = 32,
41 };
42 
46 class VideoMonitor : public sigc::trackable , public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
47 {
48  public:
49  VideoMonitor (PublicEditor*, std::string);
50  virtual ~VideoMonitor ();
51 
52  void set_filename (std::string filename);
53  void set_fps (float f) {fps = f;}
54  bool is_started ();
55  bool start ();
56  void quit ();
57  void open (std::string);
58 
60  void save_session ();
61  void query_full_state (bool);
62  bool set_custom_setting (const std::string, const std::string);
63  const std::string get_custom_setting (const std::string);
66 
69  void srsupdate ();
70  void querystate ();
72 
73  sigc::signal<void> Terminated;
74  PBD::Signal<void(std::string)> UiState;
75  void send_cmd (int what, int param);
76 
77 #if 1
78  void set_debug (bool onoff) { debug_enable = onoff; }
79 #endif
80 
81  protected:
84  float fps;
85  void parse_output (std::string d, size_t s);
86  void terminated ();
87  void forward_keyevent (unsigned int);
88 
89  void parameter_changed (std::string const & p);
90 
91  typedef std::map<std::string,std::string> XJSettings;
92 
94  bool skip_setting(std::string);
96 
101  sigc::connection clock_connection;
102  sigc::connection state_connection;
104  int starting;
106  int osdmode;
107 
108  PBD::Signal<void(unsigned int)> XJKeyEvent;
109 #if 1
111 #endif
112 };
113 
Representation of the interface of the Editor class.
communication with xjadeo's remote-control interface
Definition: video_monitor.h:47
void open(std::string)
VideoMonitor(PublicEditor *, std::string)
void parameter_changed(std::string const &p)
void set_debug(bool onoff)
Definition: video_monitor.h:78
void save_session()
bool is_started()
void send_cmd(int what, int param)
void querystate()
void forward_keyevent(unsigned int)
bool synced_by_manual_seeks()
Definition: video_monitor.h:71
bool skip_setting(std::string)
std::map< std::string, std::string > XJSettings
Definition: video_monitor.h:91
PBD::Signal< void(std::string)> UiState
Definition: video_monitor.h:74
void set_session(ARDOUR::Session *s)
ARDOUR::sampleoffset_t video_offset
Definition: video_monitor.h:99
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:65
sigc::signal< void > Terminated
Definition: video_monitor.h:73
sigc::connection clock_connection
int _restore_settings_mask
Definition: video_monitor.h:93
bool sync_by_manual_seek
sigc::connection state_connection
void srsupdate()
PublicEditor * editor
Definition: video_monitor.h:82
void terminated()
ARDOUR::SystemExec * process
Definition: video_monitor.h:83
virtual ~VideoMonitor()
const std::string get_custom_setting(const std::string)
XJSettings xjadeo_settings
Definition: video_monitor.h:95
ARDOUR::samplepos_t manually_seeked_frame
Definition: video_monitor.h:98
void set_filename(std::string filename)
void xjadeo_sync_setup()
void manual_seek(ARDOUR::samplepos_t, bool, ARDOUR::sampleoffset_t)
PBD::Signal< void(unsigned int)> XJKeyEvent
void set_fps(float f)
Definition: video_monitor.h:53
void restore_settings_mask(int i)
Definition: video_monitor.h:64
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t
XJSettingOptions
Definition: video_monitor.h:33
@ XJ_OFFSET
Definition: video_monitor.h:39
@ XJ_WINDOW_POS
Definition: video_monitor.h:35
@ XJ_WINDOW_SIZE
Definition: video_monitor.h:34
@ XJ_OSD
Definition: video_monitor.h:38
@ XJ_FULLSCREEN
Definition: video_monitor.h:40
@ XJ_LETTERBOX
Definition: video_monitor.h:37
@ XJ_WINDOW_ONTOP
Definition: video_monitor.h:36