2013-03-12 17:00:09 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2013-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2024-09-25 20:38:59 -04:00
|
|
|
#pragma once
|
2013-03-12 17:00:09 -04:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2014-05-02 02:45:26 -04:00
|
|
|
#ifdef interface
|
|
|
|
#undef interface
|
|
|
|
#endif
|
|
|
|
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/cellrendererpixbuf.h>
|
|
|
|
#include <gtkmm/checkbutton.h>
|
|
|
|
#include <gtkmm/filechooserwidget.h>
|
|
|
|
#include <gtkmm/image.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/liststore.h>
|
|
|
|
#include <gtkmm/notebook.h>
|
|
|
|
#include <gtkmm/scale.h>
|
|
|
|
#include <gtkmm/treemodel.h>
|
|
|
|
#include <gtkmm/treeview.h>
|
2013-03-12 17:00:09 -04:00
|
|
|
|
|
|
|
#include "ardour/types.h"
|
|
|
|
#include "ardour/template_utils.h"
|
|
|
|
#include <gtkmm/filechooserwidget.h>
|
|
|
|
#include "ardour_dialog.h"
|
|
|
|
|
|
|
|
enum VtlImportOption {
|
|
|
|
VTL_IMPORT_NONE = 0,
|
2013-03-29 07:20:09 -04:00
|
|
|
VTL_IMPORT_TRANSCODE = 1,
|
2013-03-12 17:00:09 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class AddVideoDialog : public ArdourDialog
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2013-03-12 17:00:09 -04:00
|
|
|
AddVideoDialog (ARDOUR::Session*);
|
|
|
|
~AddVideoDialog ();
|
|
|
|
|
|
|
|
std::string file_name (bool &local_file);
|
|
|
|
VtlImportOption import_option ();
|
|
|
|
bool launch_xjadeo ();
|
|
|
|
bool auto_set_session_fps ();
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2013-03-12 17:00:09 -04:00
|
|
|
void on_show ();
|
|
|
|
bool page_switch();
|
|
|
|
void set_action_ok(bool yn);
|
2013-04-01 12:39:15 -04:00
|
|
|
void clear_preview_image();
|
2013-03-12 17:00:09 -04:00
|
|
|
|
|
|
|
/* preview pane related */
|
|
|
|
void request_preview(std::string vpath);
|
|
|
|
void seek_preview();
|
|
|
|
|
|
|
|
Gtk::Image *preview_image;
|
|
|
|
Gtk::HScale seek_slider;
|
|
|
|
Glib::RefPtr<Gdk::Pixbuf> imgbuf;
|
|
|
|
std::string preview_path;
|
2013-03-31 03:29:27 -04:00
|
|
|
Gtk::Label pi_tcin;
|
|
|
|
Gtk::Label pi_tcout;
|
2013-03-12 17:00:09 -04:00
|
|
|
Gtk::Label pi_aspect;
|
|
|
|
Gtk::Label pi_fps;
|
|
|
|
|
|
|
|
/* file chooser related */
|
|
|
|
void file_selection_changed ();
|
|
|
|
void file_activated ();
|
|
|
|
bool on_video_filter (const Gtk::FileFilter::Info& filter_info);
|
|
|
|
|
|
|
|
Gtk::FileChooserWidget chooser;
|
|
|
|
|
|
|
|
Gtk::CheckButton xjadeo_checkbox;
|
|
|
|
Gtk::CheckButton set_session_fps_checkbox;
|
|
|
|
Gtk::Notebook notebook;
|
|
|
|
Gtk::Button *ok_button;
|
|
|
|
|
2014-04-21 22:18:35 -04:00
|
|
|
Gtk::VBox server_index_box;
|
|
|
|
Gtk::VBox file_chooser_box;
|
|
|
|
Gtk::HBox browser_container;
|
|
|
|
|
2013-03-12 17:00:09 -04:00
|
|
|
/* Harvid Browser related */
|
|
|
|
class HarvidColumns : public Gtk::TreeModel::ColumnRecord
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2013-03-12 17:00:09 -04:00
|
|
|
Gtk::TreeModelColumn<std::string> id;
|
|
|
|
Gtk::TreeModelColumn<std::string> uri;
|
|
|
|
Gtk::TreeModelColumn<std::string> filename;
|
|
|
|
|
|
|
|
HarvidColumns() {
|
|
|
|
add(id);
|
|
|
|
add(filename);
|
|
|
|
add(uri);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
Gtk::CellRendererPixbuf pixBufRenderer;
|
|
|
|
|
|
|
|
void harvid_list_view_selected ();
|
|
|
|
void harvid_list_view_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn*);
|
|
|
|
void harvid_request(std::string u);
|
|
|
|
void harvid_load_docroot();
|
|
|
|
|
|
|
|
bool harvid_initialized;
|
|
|
|
Gtk::Label harvid_path;
|
|
|
|
Gtk::Button harvid_reset;
|
|
|
|
HarvidColumns harvid_list_columns;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> harvid_list;
|
|
|
|
Gtk::TreeView harvid_list_view;
|
2014-04-21 22:18:35 -04:00
|
|
|
|
|
|
|
bool show_advanced;
|
|
|
|
bool loaded_docroot;
|
2013-03-12 17:00:09 -04:00
|
|
|
};
|
|
|
|
|