vtl: debug xjadeo communication
[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 #ifdef WITH_VIDEOTIMELINE
21
22 #ifndef __gtk_ardour_transcode_video_dialog_h__
23 #define __gtk_ardour_transcode_video_dialog_h__
24
25 #include <string>
26
27 #include <gtkmm.h>
28
29 #include "ardour/types.h"
30 #include "ardour/template_utils.h"
31 #include "ardour_dialog.h"
32
33 #include "transcode_ffmpeg.h"
34
35 /** @class TranscodeVideoDialog
36  *  @brief dialog-box and controller for importing video-files
37  */
38 class TranscodeVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
39 {
40   public:
41         TranscodeVideoDialog (ARDOUR::Session*, std::string);
42         ~TranscodeVideoDialog ();
43
44         std::string get_filename () { return path_entry.get_text(); }
45         std::string get_audiofile () { return audiofile; }
46
47   private:
48         void on_show ();
49         void open_browse_dialog ();
50         void abort_clicked ();
51         void scale_combo_changed ();
52         void audio_combo_changed ();
53         void aspect_checkbox_toggled ();
54         void bitrate_checkbox_toggled ();
55         void update_bitrate ();
56         void launch_audioonly ();
57         void launch_transcode ();
58   void launch_extract ();
59         void prepare_copy ();
60         void launch_copy ();
61         void dialog_progress_mode ();
62         bool aborted;
63         bool pending_audio_extract;
64         bool pending_copy_file;
65         std::string audiofile;
66         std::string infn;
67         double m_aspect;
68
69         PBD::Signal0<void> StartNextStage;
70         void finished ();
71         void update_progress (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
72
73         TranscodeFfmpeg *transcoder;
74
75         Gtk::Label        path_label;
76         Gtk::Entry        path_entry;
77         Gtk::Button       browse_button;
78         Gtk::Button       transcode_button;
79         Gtk::Button       copy_button;
80         Gtk::Button       audio_button;
81
82         Gtk::VBox* vbox;
83         Gtk::Button *cancel_button;
84         Gtk::Button abort_button;
85
86         Gtk::VBox*  progress_box;
87         Gtk::Label  progress_label;
88         Gtk::ProgressBar pbar;
89
90         Gtk::ComboBoxText scale_combo;
91         Gtk::CheckButton  aspect_checkbox;
92         Gtk::Adjustment   height_adjustment;
93         Gtk::SpinButton   height_spinner;
94         Gtk::ComboBoxText audio_combo;
95         Gtk::CheckButton  bitrate_checkbox;
96         Gtk::Adjustment   bitrate_adjustment;
97         Gtk::SpinButton   bitrate_spinner;
98 #if 1 /* tentative debug mode */
99         Gtk::CheckButton  debug_checkbox;
100 #endif
101
102 };
103
104 #endif /* __gtk_ardour_transcode_video_dialog_h__ */
105
106 #endif /* WITH_VIDEOTIMELINE */