Ardour  9.0-pre0-822-g12e3bc5c20
export_video_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013-2017 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 #pragma once
19 
20 #include <string>
21 
22 #include <ytkmm/box.h>
23 #include <ytkmm/button.h>
24 #include <ytkmm/checkbutton.h>
25 #include <ytkmm/comboboxtext.h>
26 #include <ytkmm/entry.h>
27 #include <ytkmm/label.h>
28 #include <ytkmm/progressbar.h>
29 
30 #include "ardour/export_status.h"
31 #include "ardour/types.h"
32 
33 #include "ardour_dialog.h"
34 #include "time_selection.h"
35 #include "transcode_ffmpeg.h"
36 
45 {
46 public:
49 
50  std::string get_exported_filename ()
51  {
52  return outfn_path_entry.get_text ();
53  }
54 
55  void apply_state (TimeSelection& tme, bool range);
56 
57  XMLNode& get_state () const;
58  void set_state (const XMLNode&);
59 
60 private:
61 
62  void abort_clicked ();
63  void launch_export ();
64  void encode_video ();
65  void finished (int);
66 
70 
73 
74  bool _aborted;
75  bool _normalize;
76 
77  std::shared_ptr<ARDOUR::ExportStatus> status;
78 
80  sigc::connection _audio_progress_connection;
83  std::string _insnd;
84 
85  Gtk::Label outfn_path_label;
86  Gtk::Entry outfn_path_entry;
87  Gtk::Button outfn_browse_button;
88  Gtk::Label invid_path_label;
89  Gtk::Entry invid_path_entry;
90  Gtk::Button invid_browse_button;
91  Gtk::ComboBoxText insnd_combo;
92  Gtk::Button transcode_button;
93 
94  Gtk::VBox* vbox;
95  Gtk::Button* cancel_button;
96  Gtk::Button abort_button;
97 
98  Gtk::VBox* progress_box;
99  Gtk::ProgressBar pbar;
100 
101  Gtk::ComboBoxText audio_bitrate_combo;
102  Gtk::ComboBoxText audio_sample_rate_combo;
103 
104  Gtk::CheckButton normalize_checkbox;
105  Gtk::CheckButton copy_video_codec_checkbox;
106  Gtk::CheckButton meta_checkbox;
107  Gtk::CheckButton debug_checkbox;
108 };
109 
dialog box and controller for video-file export
Gtk::Button outfn_browse_button
Gtk::CheckButton debug_checkbox
Gtk::CheckButton meta_checkbox
Gtk::CheckButton normalize_checkbox
void open_invid_dialog()
void set_state(const XMLNode &)
void set_original_file_information()
void open_outfn_dialog()
XMLNode & get_state() const
Gtk::ComboBoxText audio_sample_rate_combo
Gtk::ComboBoxText audio_bitrate_combo
std::shared_ptr< ARDOUR::ExportStatus > status
std::string get_exported_filename()
TranscodeFfmpeg * _transcoder
Gtk::CheckButton copy_video_codec_checkbox
Gtk::ComboBoxText insnd_combo
void finished(int)
Gtk::Button * cancel_button
Gtk::Button invid_browse_button
sigc::connection _audio_progress_connection
void apply_state(TimeSelection &tme, bool range)
Gtk::Button transcode_button
Gtk::ProgressBar pbar
gint audio_progress_display()
TimeSelection _export_range
void update_progress(ARDOUR::samplecnt_t, ARDOUR::samplecnt_t)
wrapper around ffmpeg and ffprobe command-line utils
Definition: xml++.h:114
Temporal::samplecnt_t samplecnt_t