1 #ifndef __ardour_omftool__
2 #define __ardour_omftool__
19 int load (const std::string&);
22 void set_version (int);
23 void set_session_name (const std::string&);
24 void set_sample_rate (int);
32 SourceInfo (int chn, int sr, uint64_t l, XMLNode* n)
33 : channels (chn), sample_rate (sr), length (l), node (n) {}
43 std::string session_name;
44 std::vector<std::string> audiofile_path_vector;
45 int sample_rate; /* audio samples per second */
46 double frame_rate; /* time per video frame */
56 XMLNode* new_region_node ();
57 XMLNode* new_source_node ();
58 XMLNode* new_route_node ();
59 XMLNode* new_playlist_node ();
60 XMLNode* new_diskstream_node ();
62 typedef std::map<std::string,SourceInfo*> KnownSources;
63 KnownSources known_sources;
65 SourceInfo* get_known_source (const char*);
66 char* read_name (size_t offset, size_t length);
67 bool get_offset_and_length (const char* offstr, const char* lenstr, uint32_t& offset, uint32_t& len);
69 void add_id (XMLNode*);
70 void set_route_node_channels (XMLNode* route, int in, int out, bool send_to_master);
71 bool get_audio_info (const std::string& path);
72 void set_region_sources (XMLNode*, SourceInfo*);
73 void legalize_name (std::string&);
75 uint16_t e16(uint16_t x)
84 uint32_t e32(uint32_t x)
88 ((x<<8) & 0x00FF0000) |
89 ((x>>8) & 0x0000FF00) |
95 uint64_t e64(uint64_t x)
99 ((x<<40) & 0x00FF000000000000) |
100 ((x<<24) & 0x0000FF0000000000) |
101 ((x<<8) & 0x000000FF00000000) |
102 ((x>>8) & 0x00000000FF000000) |
103 ((x>>24) & 0x0000000000FF0000) |
104 ((x>>40) & 0x000000000000FF00) |
112 #endif /* __ardour_omftool__ */