Optimize automation-event process splitting
[ardour.git] / gtk2_ardour / utils_videotl.h
1 /*
2     Copyright (C) 2010-2013 Paul Davis
3     Author: Robin Gareus <robin@gareus.org>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 */
20 /** @file utils_videotl.h
21  *  @brief common functions used for video-file im/export
22  */
23
24 #ifndef __gtk_ardour_video_utils_h__
25 #define __gtk_ardour_video_utils_h__
26
27 #include <string>
28
29 #include "ardour/rc_configuration.h"
30 #include "ardour/types.h"
31 #include "ardour/template_utils.h"
32 #include "ardour_dialog.h"
33
34 namespace VideoUtils {
35
36 extern unsigned int harvid_version;
37
38 bool confirm_video_outfn (Gtk::Window& parent, std::string, std::string docroot="");
39 std::string video_dest_dir (const std::string, const std::string);
40 std::string video_dest_file (const std::string, const std::string);
41 std::string strip_file_extension (const std::string infile);
42 std::string get_file_extension (const std::string infile);
43
44 void ParseCSV(const std::string &csv, std::vector<std::vector<std::string> > &lines);
45 std::string video_map_path (std::string server_docroot, std::string filepath);
46 void video_draw_cross (Glib::RefPtr<Gdk::Pixbuf> img);
47 std::string video_get_server_url (ARDOUR::RCConfiguration* config);
48 std::string video_get_docroot (ARDOUR::RCConfiguration* config);
49
50 bool video_query_info (
51                 std::string video_server_url,
52                 std::string filepath,
53                 double &video_file_fps,
54                 long long int &video_duration,
55                 double &video_start_offset,
56                 double &video_aspect_ratio
57                 );
58 };
59
60 #endif /* __gtk_ardour_video_utils_h__ */