206 bool osd_update =
false;
217 osd_update = (prev_osdmode !=
osdmode);
222 osd_update = (prev_osdmode !=
osdmode);
227 osd_update = (prev_osdmode !=
osdmode);
244 std::ostringstream osstream; osstream <<
"osd mode " <<
osdmode <<
"\n";
266 std::string line = d;
267 std::string::size_type
start = 0;
268 std::string::size_type end = 0;
271 end = d.find(
'\n', start);
272 if (end == std::string::npos)
break;
273 line = d.substr(start,end-start);
275 if (line.length() <4 || line.at(0)!=
'@')
continue;
278 printf(
"xjadeo: '%s'\n", line.c_str());
281 int status =
atoi(line.substr(1,3));
282 switch(status / 100) {
293 printf(
"xjadeo: error '%s'\n", line.c_str());
298 std::string::size_type equalsign = line.find(
'=');
299 std::string::size_type comment = line.find(
'#');
300 if (comment != std::string::npos) { line = line.substr(0,comment); }
301 if (equalsign != std::string::npos) {
302 std::string key = line.substr(5, equalsign - 5);
303 std::string value = line.substr(equalsign + 1);
305 if (status == 310 && key==
"keypress") {
311 std::string msg = line.substr(5);
312 printf(
"xjadeo: async '%s' -> '%s'\n", key, value);
318 std::string msg = line.substr(5);
319 printf(
"xjadeo: async '%s'\n", msg.c_str());
336 std::string::size_type equalsign = line.find(
'=');
337 std::string::size_type comment = line.find(
'#');
338 if (comment != std::string::npos) { line = line.substr(0,comment); }
339 if (equalsign != std::string::npos) {
340 std::string key = line.substr(5, equalsign - 5);
341 std::string value = line.substr(equalsign + 1);
343 std::cout <<
"parsed: " << key <<
" => " << value << std::endl;
345 if (key ==
"windowpos") {
351 }
else if(key ==
"windowsize") {
357 }
else if(key ==
"windowontop") {
361 if (
atoi(value)) {
UiState(
"xjadeo-window-ontop-on"); }
362 else {
UiState(
"xjadeo-window-ontop-off"); }
366 }
else if(key ==
"fullscreen") {
370 if (
atoi(value)) {
UiState(
"xjadeo-window-fullscreen-on"); }
371 else {
UiState(
"xjadeo-window-fullscreen-off"); }
375 }
else if(key ==
"letterbox") {
379 if (
atoi(value)) {
UiState(
"xjadeo-window-letterbox-on"); }
380 else {
UiState(
"xjadeo-window-letterbox-off"); }
384 }
else if(key ==
"osdmode") {
389 if ((
osdmode & 1) == 1) {
UiState(
"xjadeo-window-osd-frame-on"); }
390 if ((
osdmode & 1) == 0) {
UiState(
"xjadeo-window-osd-frame-off"); }
391 if ((
osdmode & 2) == 2) {
UiState(
"xjadeo-window-osd-timecode-on"); }
392 if ((
osdmode & 2) == 0) {
UiState(
"xjadeo-window-osd-timecode-off"); }
398 }
else if(key ==
"offset") {
406 printf(
"xjadeo: '%s' -> '%s'\n", key.c_str(), value.c_str());
444 SessionHandlePtr::set_session (s);
448 if (!node) {
return;}
453 for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
454 xjadeo_settings[(*niter)->property(
X_(
"k"))->value()] = (*niter)->property(
X_(
"v"))->value();
471 #define NO_OFFSET (ARDOUR::max_framepos) //< skip setting or modifying offset
497 video_frame_offset = floor(offset *
fps / audio_sample_rate);
505 std::ostringstream osstream1; osstream1 << -1 * video_frame_offset;
524 video_frame = floor(when *
fps / audio_sample_rate);
528 if (video_frame < 0 ) video_frame = 0;
534 std::cout <<
"seek: " << video_frame << std::endl;
536 std::ostringstream osstream; osstream << video_frame;
547 if (p !=
"external-sync" && p !=
"sync-source") {
559 bool my_manual_seek =
true;
562 my_manual_seek =
false;
framepos_t audible_frame() const
void manual_seek(ARDOUR::framepos_t, bool, ARDOUR::frameoffset_t)
double timecode_frames_per_second() const
framecnt_t nominal_frame_rate() const
ARDOUR::framepos_t manually_seeked_frame
int atoi(const string &s)
bool emulate_key_event(Gtk::Widget *, unsigned int)
PBD::Signal0< void > Terminated
XJSettings xjadeo_settings
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.
LIBPBD_API Transmitter warning
void set_offset(ARDOUR::frameoffset_t)
const XMLNodeList & children(const std::string &str=std::string()) const
std::ostream & endmsg(std::ostream &ostr)
SessionConfiguration config
XMLNode * add_child(const char *)
framecnt_t frame_rate() const
PBD::Signal1< void, unsigned int > XJKeyEvent
PBD::Signal1< void, std::string > UiState
void query_full_state(bool)
std::list< XMLNode * > XMLNodeList
virtual bool dragging_playhead() const =0
bool skip_setting(std::string)
LIBARDOUR_API RCConfiguration * Config
sigc::connection clock_connection
void parameter_changed(std::string const &p)
int write_to_stdin(std::string d, size_t len=0)
void set_session(ARDOUR::Session *s)
ARDOUR::SystemExec * process
PBD::Signal1< void, std::string > ParameterChanged
XMLProperty * add_property(const char *name, const std::string &value)
static PublicEditor & instance()
int start(int stderr_mode=1)
sigc::connection fps_connect(const sigc::slot< void > &slot)
XMLNode * extra_xml(const std::string &str, bool add_if_missing=false)
const std::string get_custom_setting(const std::string)
PBD::Signal2< void, std::string, size_t > ReadStdout
sigc::connection state_connection
sigc::signal< void > Terminated
int _restore_settings_mask
void remove_nodes_and_delete(const std::string &)
sigc::connection rapid_connect(const sigc::slot< void > &slot)
XMLNodeList::const_iterator XMLNodeConstIterator
void forward_keyevent(unsigned int)
ARDOUR::frameoffset_t video_offset
ARDOUR::Session * _session
void parse_output(std::string d, size_t s)