change copy packed clip to unpacked in move_edits
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / indexable.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2009 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22
23 // Inherited by objects which can be indexed by IndexFile
24
25 #ifndef INDEXABLE_H
26 #define INDEXABLE_H
27
28 #include "bcwindowbase.inc"
29 #include "garbage.h"
30 #include "indexstate.h"
31 #include <stdint.h>
32
33 class Indexable : public Garbage
34 {
35 public:
36         Indexable(int is_asset);
37         virtual ~Indexable();
38
39         virtual int get_audio_channels();
40         virtual int get_sample_rate();
41         virtual int64_t get_audio_samples();
42         virtual int have_audio();
43
44         virtual int get_w();
45         virtual int get_h();
46         virtual double get_frame_rate();
47         virtual int have_video();
48         virtual int get_video_layers();
49         virtual int64_t get_video_frames();
50
51         void copy_indexable(Indexable *src);
52         void update_path(const char *new_path);
53         void update_index(Indexable *src);
54         const char *get_title();
55
56         IndexState *index_state;
57
58 // In an Asset, the path to the file.
59
60 // In the top EDL, this is the path it was loaded from.  Restores
61 // project titles from backups.  This is only used for loading backups & nested EDLs.
62 // All other loads keep the path in mainsession->filename.
63 // This can't use the output_path argument to save_xml because that points
64 // to the backup file, not the project file.
65         char path[BCTEXTLEN];
66 // Folder in resource manager
67         int folder_no;
68
69         int is_asset;
70 // unique ID of this object for comparison
71         int id;
72 };
73
74
75
76 #endif
77
78