#include <sigc++/bind.h>
+#include <glib/gstdio.h>
+
#include "pbd/error.h"
#include "pbd/convert.h"
#include "gtkmm2ext/utils.h"
#include "ardour/session_metadata.h"
#include "ardour/broadcast_info.h"
-#include "utils.h"
#include "opts.h"
#include "export_video_dialog.h"
#include "utils_videotl.h"
ExportVideoDialog::finished ()
{
if (aborted) {
- unlink(outfn_path_entry.get_text().c_str());
- unlink (insnd.c_str());
+ ::g_unlink(outfn_path_entry.get_text().c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
} else if (twopass && firstpass) {
firstpass = false;
if (twopass_checkbox.get_active()) {
std::string outfn = outfn_path_entry.get_text();
std::string p2log = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
- unlink (p2log.c_str());
+ ::g_unlink (p2log.c_str());
}
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_ACCEPT);
}
}
insnd = fnp->get_path(fmp);
/* do sound export */
+ fmp->set_soundcloud_upload(false);
_session->get_export_handler()->add_export_config (tsp, ccp, fmp, fnp, b);
_session->get_export_handler()->do_export();
status = _session->get_export_status ();
if (gtk_events_pending()) {
gtk_main_iteration ();
} else {
- usleep (10000);
+ Glib::usleep (10000);
}
}
audio_progress_connection.disconnect();
status->finish ();
if (status->aborted()) {
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
transcoder = new TranscodeFfmpeg(invid);
if (!transcoder->ffexec_ok()) {
/* ffmpeg binary was not found. TranscodeFfmpeg prints a warning */
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
if (!transcoder->probe_ok()) {
/* video input file can not be read */
warning << _("Export Video: Video input file cannot be read.") << endmsg;
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
ffs.clear();
if (fps_checkbox.get_active()) {
- ffs["-r"] = fps_combo.get_active_text();
+ ffs["-r"] = fps_combo.get_active_text();
+ transcoder->set_fps(atof(fps_combo.get_active_text()));
}
if (scale_checkbox.get_active()) {
ffs["-an"] = "-y";
ffs["-passlogfile"] = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
ffs["-f"] = get_file_extension(invid).empty()?"mov":get_file_extension(invid);
-#ifdef _OS_WIN32
+#ifdef PLATFORM_WINDOWS
outfn = "NUL";
#else
outfn = "/dev/null";
std::ostringstream osstream; osstream << duration_s;
ffs["-t"] = osstream.str();
- if (fps_checkbox.get_active()) {
- transcoder->set_duration(duration_s * atof(fps_combo.get_active_text()));
- } else {
- transcoder->set_duration(duration_s * transcoder->get_fps());
- }
+ transcoder->set_duration(duration_s * transcoder->get_fps());
if (insnd_combo.get_active_row_number() == 0 || insnd_combo.get_active_row_number() == 2) {
framepos_t start, snend;