Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / filemediadb.h
1 /*
2  * CINELERRA
3  * Copyright (C) 2016-2020 William Morrow
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  */
20
21 #ifndef _FILEMEDIADB_H_
22 #define _FILEMEDIADB_H_
23 /*
24  * CINELERRA
25  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
26  *
27  * This program is free software; you can redistribute it and/or modify
28  * it under the terms of the GNU General Public License as published by
29  * the Free Software Foundation; either version 2 of the License, or
30  * (at your option) any later version.
31  *
32  * This program is distributed in the hope that it will be useful,
33  * but WITHOUT ANY WARRANTY; without even the implied warranty of
34  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
35  * GNU General Public License for more details.
36  *
37  * You should have received a copy of the GNU General Public License
38  * along with this program; if not, write to the Free Software
39  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
40  *
41  */
42
43 #include "asset.inc"
44 #include "filebase.h"
45 #include "file.inc"
46 #include "filemediadb.inc"
47 #include "vframe.inc"
48
49
50
51 class FileMediaDb : public FileBase
52 {
53 public:
54         int clip_id;
55         int swidth, sheight;
56         int seq_no, frame_id, frames;
57         char title[BCTEXTLEN];
58         double framerate, offset;
59
60         static int check_sig(Asset *asset);
61         int open_file(int rd, int wr);
62         int close_file();
63
64         int get_best_colormodel(Asset *asset, int driver);
65         int colormodel_supported(int colormodel);
66         int set_video_position(int64_t pos);
67         int64_t get_memory_usage();
68
69         int write_frames(VFrame ***frames, int len);
70         int read_frame(VFrame *frame);
71
72         FileMediaDb(Asset *asset, File *file);
73         ~FileMediaDb();
74 };
75
76 #endif