Use labs() for long instead of abs()
[ardour.git] / gtk2_ardour / transcode_video_dialog.cc
index bf253925fed272d21c75b70adf3aa7958455512c..e4e1978dd958d0689d99f1a141fd5c440c2202a9 100644 (file)
@@ -1,22 +1,22 @@
 /*
-    Copyright (C) 2010,2013 Paul Davis
   Author: Robin Gareus <robin@gareus.org>
-
-    This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2013-2017 Paul Davis <paul@linuxaudiosystems.com>
* Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2015 AndrĂ© Nusser <andre.nusser@googlemail.com>
+ *
* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 #include <cstdio>
 #include <string>
 #include <sstream>
@@ -321,7 +321,7 @@ TranscodeVideoDialog::abort_clicked ()
 }
 
 void
-TranscodeVideoDialog::update_progress (framecnt_t c, framecnt_t a)
+TranscodeVideoDialog::update_progress (samplecnt_t c, samplecnt_t a)
 {
        if (a == 0 || c > a) {
                pbar.set_pulse_step(.5);
@@ -377,7 +377,7 @@ TranscodeVideoDialog::launch_extract ()
        audio_stream = audio_combo.get_active_row_number() -1;
        progress_label.set_text (_("Extracting Audio.."));
 
-       if (!transcoder->extract_audio(audiofile, _session->nominal_frame_rate(), audio_stream)) {
+       if (!transcoder->extract_audio(audiofile, _session->nominal_sample_rate(), audio_stream)) {
                ARDOUR_UI::instance()->popup_error(_("Audio Extraction Failed."));
                audiofile="";
                Gtk::Dialog::response(RESPONSE_CANCEL);
@@ -544,6 +544,7 @@ TranscodeVideoDialog::open_browse_dialog ()
 {
        Gtk::FileChooserDialog dialog(_("Save Transcoded Video File"), Gtk::FILE_CHOOSER_ACTION_SAVE);
        dialog.set_filename (path_entry.get_text());
+       Gtkmm2ext::add_volume_shortcuts (dialog);
 
        dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
        dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);