Fix MIDI disk-writer flush
[ardour.git] / gtk2_ardour / utils_videotl.h
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 /** @file utils_videotl.h
19  *  @brief common functions used for video-file im/export
20  */
21
22 #ifndef __gtk_ardour_video_utils_h__
23 #define __gtk_ardour_video_utils_h__
24
25 #include <string>
26
27 #include "ardour/rc_configuration.h"
28 #include "ardour/types.h"
29 #include "ardour/template_utils.h"
30 #include "ardour_dialog.h"
31
32 namespace VideoUtils {
33
34 extern unsigned int harvid_version;
35
36 bool confirm_video_outfn (Gtk::Window& parent, std::string, std::string docroot="");
37 std::string video_dest_dir (const std::string, const std::string);
38 std::string video_dest_file (const std::string, const std::string);
39 std::string strip_file_extension (const std::string infile);
40 std::string get_file_extension (const std::string infile);
41
42 void ParseCSV(const std::string &csv, std::vector<std::vector<std::string> > &lines);
43 std::string video_map_path (std::string server_docroot, std::string filepath);
44 void video_draw_cross (Glib::RefPtr<Gdk::Pixbuf> img);
45 std::string video_get_server_url (ARDOUR::RCConfiguration* config);
46 std::string video_get_docroot (ARDOUR::RCConfiguration* config);
47
48 bool video_query_info (
49                 std::string video_server_url,
50                 std::string filepath,
51                 double &video_file_fps,
52                 long long int &video_duration,
53                 double &video_start_offset,
54                 double &video_aspect_ratio
55                 );
56 };
57
58 #endif /* __gtk_ardour_video_utils_h__ */