ardour
export_video_dialog.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 Paul Davis
3  Author: Robin Gareus <robin@gareus.org>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 
19 */
20 #ifndef __gtk_ardour_export_video_dialog_h__
21 #define __gtk_ardour_export_video_dialog_h__
22 
23 #include <string>
24 
25 #include <gtkmm.h>
26 
27 #include "ardour/types.h"
28 #include "ardour/template_utils.h"
29 #include "ardour_dialog.h"
30 
31 #include "time_selection.h"
32 #include "transcode_ffmpeg.h"
33 
42 {
43  public:
46 
47  std::string get_exported_filename () { return outfn_path_entry.get_text(); }
48 
49  void apply_state(TimeSelection &tme, bool range);
50 
51  XMLNode& get_state ();
52  void set_state (const XMLNode &);
53 
54  private:
56 
57  void on_show ();
58  void abort_clicked ();
59  void launch_export ();
60  void encode_pass (int);
61  void change_file_extension (std::string);
62  void width_value_changed ();
63  void height_value_changed ();
64 
66 
67  void open_outfn_dialog ();
68  void open_invid_dialog ();
69  void scale_checkbox_toggled ();
70  void preset_combo_changed ();
73  void fps_checkbox_toggled ();
74 
75  bool _aborted;
76  bool _twopass;
77  bool _firstpass;
78  bool _normalize;
79 
80  void finished ();
82 
84  sigc::connection audio_progress_connection;
85  gint audio_progress_display ();
87 
89  std::string _insnd;
90 
94 
95  Gtk::Label outfn_path_label;
96  Gtk::Entry outfn_path_entry;
97  Gtk::Button outfn_browse_button;
98  Gtk::Label invid_path_label;
99  Gtk::Entry invid_path_entry;
100  Gtk::Button invid_browse_button;
101  Gtk::ComboBoxText insnd_combo;
102  Gtk::Button transcode_button;
103 
104  Gtk::VBox* vbox;
105  Gtk::Button *cancel_button;
106  Gtk::Button abort_button;
107 
108  Gtk::VBox* progress_box;
109  Gtk::ProgressBar pbar;
110 
111  Gtk::ComboBoxText audio_codec_combo;
112  Gtk::ComboBoxText video_codec_combo;
113  Gtk::ComboBoxText video_bitrate_combo;
114  Gtk::ComboBoxText audio_bitrate_combo;
115  Gtk::ComboBoxText audio_samplerate_combo;
116  Gtk::ComboBoxText preset_combo;
117 
118  Gtk::CheckButton scale_checkbox;
119  Gtk::CheckButton scale_aspect;
120  Gtk::Adjustment width_adjustment;
121  Gtk::SpinButton width_spinner;
122  Gtk::Adjustment height_adjustment;
123  Gtk::SpinButton height_spinner;
124  Gtk::CheckButton aspect_checkbox;
125  Gtk::ComboBoxText aspect_combo;
126  Gtk::CheckButton normalize_checkbox;
127  Gtk::CheckButton twopass_checkbox;
128  Gtk::CheckButton optimizations_checkbox;
130  Gtk::CheckButton deinterlace_checkbox;
131  Gtk::CheckButton bframes_checkbox;
132  Gtk::CheckButton fps_checkbox;
133  Gtk::ComboBoxText fps_combo;
134  Gtk::CheckButton meta_checkbox;
135 #if 1 /* tentative debug mode */
136  Gtk::CheckButton debug_checkbox;
137 #endif
138 };
139 
140 #endif /* __gtk_ardour_export_video_dialog_h__ */
Gtk::ComboBoxText video_bitrate_combo
void update_progress(ARDOUR::framecnt_t, ARDOUR::framecnt_t)
Gtk::Adjustment width_adjustment
Gtk::CheckButton aspect_checkbox
TimeSelection export_range
Gtk::CheckButton scale_aspect
Gtk::CheckButton debug_checkbox
wrapper around ffmpeg and ffprobe command-line utils
Gtk::ProgressBar pbar
Gtk::Button * cancel_button
Gtk::Button outfn_browse_button
Gtk::ComboBoxText fps_combo
Gtk::CheckButton twopass_checkbox
Gtk::ComboBoxText aspect_combo
Gtk::Button transcode_button
Gtk::SpinButton height_spinner
boost::shared_ptr< ARDOUR::ExportStatus > status
Gtk::CheckButton bframes_checkbox
Gtk::CheckButton fps_checkbox
Gtk::Button invid_browse_button
sigc::connection audio_progress_connection
int64_t framecnt_t
Definition: types.h:76
Gtk::CheckButton meta_checkbox
Gtk::ComboBoxText audio_bitrate_combo
TranscodeFfmpeg * _transcoder
void change_file_extension(std::string)
Gtk::CheckButton optimizations_checkbox
Gtk::Adjustment height_adjustment
Gtk::CheckButton normalize_checkbox
Gtk::CheckButton deinterlace_checkbox
Gtk::ComboBoxText preset_combo
Gtk::ComboBoxText audio_samplerate_combo
Gtk::CheckButton scale_checkbox
std::string get_exported_filename()
Gtk::ComboBoxText audio_codec_combo
Definition: xml++.h:95
Gtk::ComboBoxText video_codec_combo
Gtk::Label optimizations_label
void set_state(const XMLNode &)
Gtk::SpinButton width_spinner
void apply_state(TimeSelection &tme, bool range)
Gtk::ComboBoxText insnd_combo
dialog box and controller for video-file export