2013-03-12 17:00:09 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2013-2017 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.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2013-03-12 17:00:09 -04:00
|
|
|
#ifndef __gtk_ardour_export_video_dialog_h__
|
|
|
|
#define __gtk_ardour_export_video_dialog_h__
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/checkbutton.h>
|
2022-02-07 16:46:23 -05:00
|
|
|
#include <gtkmm/comboboxtext.h>
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/entry.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/progressbar.h>
|
2013-03-12 17:00:09 -04:00
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
#include "ardour/export_status.h"
|
2013-03-12 17:00:09 -04:00
|
|
|
#include "ardour/types.h"
|
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
#include "ardour_dialog.h"
|
2013-09-12 16:46:11 -04:00
|
|
|
#include "time_selection.h"
|
2013-03-12 17:00:09 -04:00
|
|
|
#include "transcode_ffmpeg.h"
|
|
|
|
|
|
|
|
/** @class ExportVideoDialog
|
|
|
|
* @brief dialog box and controller for video-file export
|
|
|
|
*
|
|
|
|
* The ExportVideoDialog includes audio export functions,
|
|
|
|
* video-encoder presets, progress dialogs and uses
|
|
|
|
* \ref TranscodeFfmpeg to communicate with ffmpeg.
|
|
|
|
*/
|
2022-02-07 16:46:23 -05:00
|
|
|
class ExportVideoDialog : public ArdourDialog, public PBD::ScopedConnectionList
|
2013-03-12 17:00:09 -04:00
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2015-02-27 17:17:26 -05:00
|
|
|
ExportVideoDialog ();
|
2013-03-12 17:00:09 -04:00
|
|
|
~ExportVideoDialog ();
|
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
std::string get_exported_filename ()
|
|
|
|
{
|
|
|
|
return outfn_path_entry.get_text ();
|
|
|
|
}
|
2013-03-12 17:00:09 -04:00
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
void apply_state (TimeSelection& tme, bool range);
|
2015-02-27 17:17:26 -05:00
|
|
|
|
2022-04-06 23:56:45 -04:00
|
|
|
XMLNode& get_state () const;
|
2022-02-07 16:46:23 -05:00
|
|
|
void set_state (const XMLNode&);
|
2017-04-20 13:03:52 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2013-03-12 17:00:09 -04:00
|
|
|
|
|
|
|
void abort_clicked ();
|
|
|
|
void launch_export ();
|
2022-02-07 16:46:23 -05:00
|
|
|
void encode_video ();
|
|
|
|
void finished (int);
|
2015-02-27 20:31:08 -05:00
|
|
|
|
|
|
|
void set_original_file_information ();
|
2022-02-07 16:46:23 -05:00
|
|
|
void update_progress (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
|
|
|
|
gint audio_progress_display ();
|
2013-03-12 17:00:09 -04:00
|
|
|
|
|
|
|
void open_outfn_dialog ();
|
|
|
|
void open_invid_dialog ();
|
|
|
|
|
2015-02-27 20:31:08 -05:00
|
|
|
bool _aborted;
|
|
|
|
bool _normalize;
|
2013-03-12 17:00:09 -04:00
|
|
|
|
2013-04-03 19:04:27 -04:00
|
|
|
boost::shared_ptr<ARDOUR::ExportStatus> status;
|
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
TimeSelection _export_range;
|
|
|
|
sigc::connection _audio_progress_connection;
|
|
|
|
float _previous_progress;
|
|
|
|
TranscodeFfmpeg* _transcoder;
|
|
|
|
std::string _insnd;
|
2013-03-12 17:00:09 -04:00
|
|
|
|
|
|
|
Gtk::Label outfn_path_label;
|
|
|
|
Gtk::Entry outfn_path_entry;
|
|
|
|
Gtk::Button outfn_browse_button;
|
|
|
|
Gtk::Label invid_path_label;
|
|
|
|
Gtk::Entry invid_path_entry;
|
|
|
|
Gtk::Button invid_browse_button;
|
|
|
|
Gtk::ComboBoxText insnd_combo;
|
|
|
|
Gtk::Button transcode_button;
|
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
Gtk::VBox* vbox;
|
|
|
|
Gtk::Button* cancel_button;
|
|
|
|
Gtk::Button abort_button;
|
2013-03-12 17:00:09 -04:00
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
Gtk::VBox* progress_box;
|
2013-03-12 17:00:09 -04:00
|
|
|
Gtk::ProgressBar pbar;
|
|
|
|
|
2022-04-14 19:53:55 -04:00
|
|
|
Gtk::ComboBoxText audio_bitrate_combo;
|
|
|
|
Gtk::ComboBoxText audio_sample_rate_combo;
|
|
|
|
|
2022-02-07 16:46:23 -05:00
|
|
|
Gtk::CheckButton normalize_checkbox;
|
2022-04-14 19:53:55 -04:00
|
|
|
Gtk::CheckButton copy_video_codec_checkbox;
|
2022-02-07 16:46:23 -05:00
|
|
|
Gtk::CheckButton meta_checkbox;
|
|
|
|
Gtk::CheckButton debug_checkbox;
|
2013-03-12 17:00:09 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __gtk_ardour_export_video_dialog_h__ */
|