Merge branch 'master' into windows
[ardour.git] / gtk2_ardour / export_video_dialog.cc
index cd45bb368ed25179f0e3588b1032ea53d3a263e4..09283d4c8dc98aef61728f3d13049f8a434aecbd 100644 (file)
@@ -30,6 +30,8 @@
 #include <sigc++/bind.h>
 #include <libgen.h>
 
+#include <glib/gstdio.h>
+
 #include "pbd/error.h"
 #include "pbd/convert.h"
 #include "gtkmm2ext/utils.h"
@@ -409,8 +411,8 @@ void
 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;
@@ -420,9 +422,9 @@ ExportVideoDialog::finished ()
                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);
        }
 }
@@ -558,7 +560,7 @@ ExportVideoDialog::launch_export ()
        audio_progress_connection.disconnect();
        status->finish ();
        if (status->aborted()) {
-               unlink (insnd.c_str());
+               ::g_unlink (insnd.c_str());
                Gtk::Dialog::response(RESPONSE_CANCEL);
                return;
        }
@@ -575,14 +577,14 @@ ExportVideoDialog::encode_pass (int pass)
        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;
        }