NO-OP whitespace & foratting of header files
[ardour.git] / gtk2_ardour / transcode_video_dialog.h
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_transcode_video_dialog_h__
21 #define __gtk_ardour_transcode_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 "transcode_ffmpeg.h"
32
33 enum VtlTranscodeOption {
34  VTL_IMPORT_REFERENCE = 0,
35  VTL_IMPORT_TRANSCODED = 1,
36  VTL_IMPORT_NO_VIDEO = 2
37 };
38
39 /** @class TranscodeVideoDialog
40  *  @brief dialog-box and controller for importing video-files
41  */
42 class TranscodeVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
43 {
44 public:
45         TranscodeVideoDialog (ARDOUR::Session*, std::string);
46         ~TranscodeVideoDialog ();
47
48         std::string get_filename () { return path_entry.get_text(); }
49         std::string get_audiofile () { return audiofile; }
50         VtlTranscodeOption import_option ();
51         bool detect_ltc () { return ltc_detect.get_active (); }
52
53         void on_response (int response_id) {
54                 Gtk::Dialog::on_response (response_id);
55         }
56
57 private:
58         void on_show ();
59         void open_browse_dialog ();
60         void abort_clicked ();
61         void scale_combo_changed ();
62         void audio_combo_changed ();
63         void video_combo_changed ();
64         void aspect_checkbox_toggled ();
65         void bitrate_checkbox_toggled ();
66         void update_bitrate ();
67         void launch_audioonly ();
68         void launch_transcode ();
69         void launch_extract ();
70         void dialog_progress_mode ();
71         bool aborted;
72         bool pending_audio_extract;
73         std::string audiofile;
74         std::string infn;
75         double m_aspect;
76
77         PBD::Signal0<void> StartNextStage;
78         void finished ();
79         void update_progress (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
80
81         TranscodeFfmpeg *transcoder;
82
83         Gtk::Label        path_label;
84         Gtk::Entry        path_entry;
85         Gtk::Button       browse_button;
86         Gtk::Button       transcode_button;
87
88         Gtk::VBox* vbox;
89         Gtk::Button *cancel_button;
90         Gtk::Button abort_button;
91
92         Gtk::VBox*  progress_box;
93         Gtk::Label  progress_label;
94         Gtk::ProgressBar pbar;
95
96         Gtk::ComboBoxText video_combo;
97         Gtk::ComboBoxText scale_combo;
98         Gtk::CheckButton  aspect_checkbox;
99         Gtk::Adjustment   height_adjustment;
100         Gtk::SpinButton   height_spinner;
101         Gtk::ComboBoxText audio_combo;
102         Gtk::CheckButton  ltc_detect;
103         Gtk::CheckButton  bitrate_checkbox;
104         Gtk::Adjustment   bitrate_adjustment;
105         Gtk::SpinButton   bitrate_spinner;
106 #if 1 /* tentative debug mode */
107         Gtk::CheckButton  debug_checkbox;
108 #endif
109
110 };
111
112 #endif /* __gtk_ardour_transcode_video_dialog_h__ */