Ardour  9.0-pre0-822-g12e3bc5c20
transcode_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/adjustment.h>
23 #include <ytkmm/box.h>
24 #include <ytkmm/button.h>
25 #include <ytkmm/checkbutton.h>
26 #include <ytkmm/comboboxtext.h>
27 #include <ytkmm/entry.h>
28 #include <ytkmm/label.h>
29 #include <ytkmm/progressbar.h>
30 #include <ytkmm/spinbutton.h>
31 
32 #include "ardour/template_utils.h"
33 #include "ardour/types.h"
34 #include "ardour_dialog.h"
35 
36 #include "transcode_ffmpeg.h"
37 
42 };
43 
48 {
49 public:
52 
54 
55  std::string get_filename ()
56  {
57  return path_entry.get_text ();
58  }
59 
60  std::string get_audiofile ()
61  {
62  return audiofile;
63  }
64 
65  bool detect_ltc ()
66  {
67  return ltc_detect.get_active ();
68  }
69 
70  void on_response (int response_id)
71  {
72  Gtk::Dialog::on_response (response_id);
73  }
74 
75 private:
76  void on_show ();
78  void abort_clicked ();
84  void update_bitrate ();
87  void launch_extract ();
89  void finished (int);
91 
92  bool aborted;
94  std::string audiofile;
95  std::string infn;
96  double m_aspect;
97 
99 
101 
102  Gtk::Label path_label;
103  Gtk::Entry path_entry;
104  Gtk::Button browse_button;
105  Gtk::Button transcode_button;
106 
107  Gtk::VBox* vbox;
108  Gtk::Button* cancel_button;
109  Gtk::Button abort_button;
110 
111  Gtk::VBox* progress_box;
112  Gtk::Label progress_label;
113  Gtk::ProgressBar pbar;
114 
115  Gtk::ComboBoxText video_combo;
116  Gtk::ComboBoxText scale_combo;
117  Gtk::CheckButton aspect_checkbox;
118  Gtk::Adjustment height_adjustment;
119  Gtk::SpinButton height_spinner;
120  Gtk::ComboBoxText audio_combo;
121  Gtk::CheckButton ltc_detect;
122  Gtk::CheckButton bitrate_checkbox;
123  Gtk::Adjustment bitrate_adjustment;
124  Gtk::SpinButton bitrate_spinner;
125  Gtk::CheckButton debug_checkbox;
126 };
127 
wrapper around ffmpeg and ffprobe command-line utils
dialog-box and controller for importing video-files
TranscodeVideoDialog(ARDOUR::Session *, std::string)
VtlTranscodeOption import_option()
Gtk::ComboBoxText scale_combo
Gtk::Adjustment bitrate_adjustment
Gtk::CheckButton debug_checkbox
void bitrate_checkbox_toggled()
Gtk::ComboBoxText video_combo
Gtk::ComboBoxText audio_combo
PBD::Signal< void()> StartNextStage
void update_progress(ARDOUR::samplecnt_t, ARDOUR::samplecnt_t)
void on_response(int response_id)
Gtk::CheckButton bitrate_checkbox
Gtk::Adjustment height_adjustment
TranscodeFfmpeg * transcoder
Gtk::CheckButton aspect_checkbox
void aspect_checkbox_toggled()
Temporal::samplecnt_t samplecnt_t
VtlTranscodeOption
@ VTL_IMPORT_REFERENCE
@ VTL_IMPORT_NO_VIDEO
@ VTL_IMPORT_TRANSCODED