2 * Copyright (C) 2013-2017 Robin Gareus <robin@gareus.org>
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.
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.
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.
18 #ifndef __gtk_ardour_add_video_dialog_h__
19 #define __gtk_ardour_add_video_dialog_h__
27 #include <gtkmm/box.h>
28 #include <gtkmm/button.h>
29 #include <gtkmm/cellrendererpixbuf.h>
30 #include <gtkmm/checkbutton.h>
31 #include <gtkmm/filechooserwidget.h>
32 #include <gtkmm/image.h>
33 #include <gtkmm/label.h>
34 #include <gtkmm/liststore.h>
35 #include <gtkmm/notebook.h>
36 #include <gtkmm/scale.h>
37 #include <gtkmm/treemodel.h>
38 #include <gtkmm/treeview.h>
40 #include "ardour/types.h"
41 #include "ardour/template_utils.h"
42 #include <gtkmm/filechooserwidget.h>
43 #include "ardour_dialog.h"
45 enum VtlImportOption {
47 VTL_IMPORT_TRANSCODE = 1,
50 class AddVideoDialog : public ArdourDialog
53 AddVideoDialog (ARDOUR::Session*);
56 std::string file_name (bool &local_file);
57 VtlImportOption import_option ();
58 bool launch_xjadeo ();
59 bool auto_set_session_fps ();
64 void set_action_ok(bool yn);
65 void clear_preview_image();
67 /* preview pane related */
68 void request_preview(std::string vpath);
71 Gtk::Image *preview_image;
72 Gtk::HScale seek_slider;
73 Glib::RefPtr<Gdk::Pixbuf> imgbuf;
74 std::string preview_path;
80 /* file chooser related */
81 void file_selection_changed ();
82 void file_activated ();
83 bool on_video_filter (const Gtk::FileFilter::Info& filter_info);
85 Gtk::FileChooserWidget chooser;
87 Gtk::CheckButton xjadeo_checkbox;
88 Gtk::CheckButton set_session_fps_checkbox;
89 Gtk::Notebook notebook;
90 Gtk::Button *ok_button;
92 Gtk::VBox server_index_box;
93 Gtk::VBox file_chooser_box;
94 Gtk::HBox browser_container;
96 /* Harvid Browser related */
97 class HarvidColumns : public Gtk::TreeModel::ColumnRecord
100 Gtk::TreeModelColumn<std::string> id;
101 Gtk::TreeModelColumn<std::string> uri;
102 Gtk::TreeModelColumn<std::string> filename;
111 Gtk::CellRendererPixbuf pixBufRenderer;
113 void harvid_list_view_selected ();
114 void harvid_list_view_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn*);
115 void harvid_request(std::string u);
116 void harvid_load_docroot();
118 bool harvid_initialized;
119 Gtk::Label harvid_path;
120 Gtk::Button harvid_reset;
121 HarvidColumns harvid_list_columns;
122 Glib::RefPtr<Gtk::ListStore> harvid_list;
123 Gtk::TreeView harvid_list_view;
129 #endif /* __gtk_ardour_add_video_dialog_h__ */