mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-15 01:46:34 +01:00
check for xjadeo/xjremote >= 0.7.7
This commit is contained in:
parent
889f62328b
commit
436eecbb3c
2 changed files with 47 additions and 0 deletions
|
|
@ -719,6 +719,11 @@ VideoTimeLine::set_video_server_docroot(std::string vsr) {
|
|||
}
|
||||
|
||||
/* video-monitor for this timeline */
|
||||
void
|
||||
VideoTimeLine::xjadeo_readversion (std::string d, size_t /* s */) {
|
||||
xjadeo_version += d;
|
||||
}
|
||||
|
||||
void
|
||||
VideoTimeLine::find_xjadeo () {
|
||||
std::string xjadeo_file_path;
|
||||
|
|
@ -770,6 +775,45 @@ VideoTimeLine::find_xjadeo () {
|
|||
"see also http://manual.ardour.org/video-timeline/setup/")
|
||||
<< endmsg;
|
||||
}
|
||||
if (found_xjadeo ()) {
|
||||
ARDOUR::SystemExec version_check(_xjadeo_bin, X_("--version"));
|
||||
xjadeo_version = "";
|
||||
version_check.ReadStdout.connect_same_thread (*this, boost::bind (&VideoTimeLine::xjadeo_readversion, this, _1 ,_2));
|
||||
version_check.Terminated.connect_same_thread (*this, boost::bind (&VideoTimeLine::xjadeo_readversion, this, "\n" ,1));
|
||||
if (version_check.start(2)) {
|
||||
warning << _(
|
||||
"Video-monitor 'xjadeo' cannot be launched."
|
||||
) << endmsg;
|
||||
_xjadeo_bin = X_("");
|
||||
return;
|
||||
}
|
||||
|
||||
version_check.wait ();
|
||||
int timeout = 300;
|
||||
while (xjadeo_version.empty() && --timeout) {
|
||||
Glib::usleep(10000);
|
||||
}
|
||||
|
||||
bool v_ok = false;
|
||||
size_t vo = xjadeo_version.find(" version ");
|
||||
if (vo != string::npos) {
|
||||
int v_major, v_minor, v_micro;
|
||||
if(sscanf(xjadeo_version.substr(vo + 9, string::npos).c_str(),"%d.%d.%d",
|
||||
&v_major, &v_minor, &v_micro) == 3)
|
||||
{
|
||||
if (v_major >= 1) v_ok = true;
|
||||
else if (v_major == 0 && v_minor >= 8) v_ok = true;
|
||||
else if (v_major == 0 && v_minor >= 7 && v_micro >= 7) v_ok = true;
|
||||
}
|
||||
}
|
||||
if (!v_ok) {
|
||||
_xjadeo_bin = X_("");
|
||||
warning << _(
|
||||
"Video-monitor 'xjadeo' is too old. "
|
||||
"Please install xjadeo version 0.7.7 or later. http://xjadeo.sf.net/"
|
||||
) << endmsg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -123,6 +123,9 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p
|
|||
std::string video_server_url;
|
||||
std::string server_docroot;
|
||||
|
||||
void xjadeo_readversion (std::string d, size_t s);
|
||||
std::string xjadeo_version;
|
||||
|
||||
typedef std::list<VideoImageFrame*> VideoFrames;
|
||||
VideoFrames video_frames;
|
||||
VideoImageFrame *get_video_frame (framepos_t vfn, int cut=0, int rightend = -1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue