Consolidate PinDialog Session/recording checks
[ardour.git] / gtk2_ardour / transcode_video_dialog.h
index 9d334cf0d23e83867bbbff5645c457f3e8b85703..40b077b971a300a4b63f7bc870113268889f2a9b 100644 (file)
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 */
-#ifdef WITH_VIDEOTIMELINE
-
 #ifndef __gtk_ardour_transcode_video_dialog_h__
 #define __gtk_ardour_transcode_video_dialog_h__
 
 #include <string>
 
-#include <gtkmm.h>
+#include <gtkmm/adjustment.h>
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+#include <gtkmm/checkbutton.h>
+#include <gtkmm/comboboxtext.h>
+#include <gtkmm/label.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/progressbar.h>
+#include <gtkmm/spinbutton.h>
 
 #include "ardour/types.h"
 #include "ardour/template_utils.h"
 
 #include "transcode_ffmpeg.h"
 
+enum VtlTranscodeOption {
+ VTL_IMPORT_REFERENCE = 0,
+ VTL_IMPORT_TRANSCODED = 1,
+ VTL_IMPORT_NO_VIDEO = 2
+};
+
 /** @class TranscodeVideoDialog
  *  @brief dialog-box and controller for importing video-files
  */
 class TranscodeVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
 {
-  public:
+public:
        TranscodeVideoDialog (ARDOUR::Session*, std::string);
        ~TranscodeVideoDialog ();
 
        std::string get_filename () { return path_entry.get_text(); }
        std::string get_audiofile () { return audiofile; }
+       VtlTranscodeOption import_option ();
+       bool detect_ltc () { return ltc_detect.get_active (); }
 
-  private:
+       void on_response (int response_id) {
+               Gtk::Dialog::on_response (response_id);
+       }
+
+private:
        void on_show ();
        void open_browse_dialog ();
        void abort_clicked ();
        void scale_combo_changed ();
        void audio_combo_changed ();
+       void video_combo_changed ();
        void aspect_checkbox_toggled ();
        void bitrate_checkbox_toggled ();
        void update_bitrate ();
        void launch_audioonly ();
        void launch_transcode ();
-  void launch_extract ();
-       void prepare_copy ();
-       void launch_copy ();
+       void launch_extract ();
        void dialog_progress_mode ();
        bool aborted;
        bool pending_audio_extract;
-       bool pending_copy_file;
        std::string audiofile;
        std::string infn;
        double m_aspect;
 
        PBD::Signal0<void> StartNextStage;
        void finished ();
-       void update_progress (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
+       void update_progress (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
 
        TranscodeFfmpeg *transcoder;
 
@@ -76,8 +92,6 @@ class TranscodeVideoDialog : public ArdourDialog , public PBD::ScopedConnectionL
        Gtk::Entry        path_entry;
        Gtk::Button       browse_button;
        Gtk::Button       transcode_button;
-       Gtk::Button       copy_button;
-       Gtk::Button       audio_button;
 
        Gtk::VBox* vbox;
        Gtk::Button *cancel_button;
@@ -87,11 +101,13 @@ class TranscodeVideoDialog : public ArdourDialog , public PBD::ScopedConnectionL
        Gtk::Label  progress_label;
        Gtk::ProgressBar pbar;
 
+       Gtk::ComboBoxText video_combo;
        Gtk::ComboBoxText scale_combo;
        Gtk::CheckButton  aspect_checkbox;
        Gtk::Adjustment   height_adjustment;
        Gtk::SpinButton   height_spinner;
        Gtk::ComboBoxText audio_combo;
+       Gtk::CheckButton  ltc_detect;
        Gtk::CheckButton  bitrate_checkbox;
        Gtk::Adjustment   bitrate_adjustment;
        Gtk::SpinButton   bitrate_spinner;
@@ -102,5 +118,3 @@ class TranscodeVideoDialog : public ArdourDialog , public PBD::ScopedConnectionL
 };
 
 #endif /* __gtk_ardour_transcode_video_dialog_h__ */
-
-#endif /* WITH_VIDEOTIMELINE */