2 Copyright (C) 2010 Paul Davis
3 Author: Robin Gareus <robin@gareus.org>
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.
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.
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.
20 #ifdef WITH_VIDEOTIMELINE
22 #ifndef __gtk_ardour_transcode_video_dialog_h__
23 #define __gtk_ardour_transcode_video_dialog_h__
29 #include "ardour/types.h"
30 #include "ardour/template_utils.h"
31 #include "ardour_dialog.h"
33 #include "transcode_ffmpeg.h"
35 enum VtlTranscodeOption {
36 VTL_IMPORT_NO_VIDEO = 0,
37 VTL_IMPORT_REFERENCE = 1,
38 VTL_IMPORT_TRANSCODED = 2
41 /** @class TranscodeVideoDialog
42 * @brief dialog-box and controller for importing video-files
44 class TranscodeVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
47 TranscodeVideoDialog (ARDOUR::Session*, std::string);
48 ~TranscodeVideoDialog ();
50 std::string get_filename () { return path_entry.get_text(); }
51 std::string get_audiofile () { return audiofile; }
52 VtlTranscodeOption import_option ();
56 void open_browse_dialog ();
57 void abort_clicked ();
58 void scale_combo_changed ();
59 void audio_combo_changed ();
60 void video_combo_changed ();
61 void aspect_checkbox_toggled ();
62 void bitrate_checkbox_toggled ();
63 void update_bitrate ();
64 void launch_audioonly ();
65 void launch_transcode ();
66 void launch_extract ();
67 void dialog_progress_mode ();
69 bool pending_audio_extract;
70 std::string audiofile;
74 PBD::Signal0<void> StartNextStage;
76 void update_progress (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
78 TranscodeFfmpeg *transcoder;
80 Gtk::Label path_label;
81 Gtk::Entry path_entry;
82 Gtk::Button browse_button;
83 Gtk::Button transcode_button;
86 Gtk::Button *cancel_button;
87 Gtk::Button abort_button;
89 Gtk::VBox* progress_box;
90 Gtk::Label progress_label;
91 Gtk::ProgressBar pbar;
93 Gtk::ComboBoxText video_combo;
94 Gtk::ComboBoxText scale_combo;
95 Gtk::CheckButton aspect_checkbox;
96 Gtk::Adjustment height_adjustment;
97 Gtk::SpinButton height_spinner;
98 Gtk::ComboBoxText audio_combo;
99 Gtk::CheckButton bitrate_checkbox;
100 Gtk::Adjustment bitrate_adjustment;
101 Gtk::SpinButton bitrate_spinner;
102 #if 1 /* tentative debug mode */
103 Gtk::CheckButton debug_checkbox;
108 #endif /* __gtk_ardour_transcode_video_dialog_h__ */
110 #endif /* WITH_VIDEOTIMELINE */