#include "i18n.h"
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
using namespace PBD;
+using namespace VideoUtils;
TranscodeFfmpeg::TranscodeFfmpeg (std::string f)
: infile(f)
#endif
std::string ff_file_path;
- if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("ffmpeg_harvid"), ff_file_path)) { ffmpeg_exe = ff_file_path; }
+ if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("ffmpeg_harvid"), ff_file_path)) { ffmpeg_exe = ff_file_path; }
else if (Glib::file_test(X_("C:\\Program Files\\harvid\\ffmpeg.exe"), Glib::FILE_TEST_EXISTS)) {
ffmpeg_exe = X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe");
}
ffmpeg_exe = X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe");
}
- if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("ffprobe_harvid"), ff_file_path)) { ffprobe_exe = ff_file_path; }
+ if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("ffprobe_harvid"), ff_file_path)) { ffprobe_exe = ff_file_path; }
else if (Glib::file_test(X_("C:\\Program Files\\harvid\\ffprobe.exe"), Glib::FILE_TEST_EXISTS)) {
ffprobe_exe = X_("C:\\Program Files\\ffmpeg\\ffprobe.exe");
}
}
if (ffmpeg_exe.empty() || ffprobe_exe.empty()) {
- warning << _(
+ warning << string_compose(
+ _(
"No ffprobe or ffmpeg executables could be found on this system.\n"
"Video import and export is not possible until you install those tools.\n"
- "Ardour requires ffmpeg and ffprobe from ffmpeg.org - version 1.1 or newer.\n"
+ "%1 requires ffmpeg and ffprobe from ffmpeg.org - version 1.1 or newer.\n"
"\n"
- "The tools are included with the Ardour releases from ardour.org "
+ "The tools are included with the %1 releases from ardour.org "
"and also available with the video-server at http://x42.github.com/harvid/\n"
"\n"
"Important: the files need to be installed in $PATH and named ffmpeg_harvid and ffprobe_harvid.\n"
"If you already have a suitable ffmpeg installation on your system, we recommend creating "
"symbolic links from ffmpeg to ffmpeg_harvid and from ffprobe to ffprobe_harvid.\n"
- ) << endmsg;
+ ), PROGRAM_NAME) << endmsg;
return;
}
ffexecok = true;
* SystemExec::Terminated is emitted and ffcmd set to NULL */
int timeout = 300; // 1.5 sec
while (ffcmd && --timeout > 0) {
- usleep(5000);
+ Glib::usleep(5000);
}
if (timeout == 0 || ffoutput.empty()) {
return false;
}
bool
-TranscodeFfmpeg::extract_audio (std::string outfile, ARDOUR::framecnt_t samplerate, unsigned int stream)
+TranscodeFfmpeg::extract_audio (std::string outfile, ARDOUR::framecnt_t /*samplerate*/, unsigned int stream)
{
if (!probeok) return false;
if (stream >= m_audio.size()) return false;
{
if (!ffcmd || !ffcmd->is_running()) { return;}
ffcmd->write_to_stdin("q");
+#ifdef WIN32
+ Sleep(1000);
+#else
sleep (1);
+#endif
if (ffcmd) {
ffcmd->terminate();
}