6 #include "bcwindowbase.inc"
7 #include "defaults.inc"
10 #include "pluginserver.inc"
16 // Asset can be one of the following:
17 // 1) a pure media file
20 // The EDL can reference itself if it contains a media file
21 class Asset
: public ListItem
<Asset
>
26 Asset(const char *path
);
27 Asset(const int plugin_type
, const char *plugin_path
);
33 void copy_from(Asset
*asset
, int do_index
);
34 void copy_location(Asset
*asset
);
35 void copy_format(Asset
*asset
, int do_index
= 1);
36 void copy_index(Asset
*asset
);
37 int64_t get_index_offset(int channel
);
40 // Load and save parameters for a render dialog
41 // Used by render, record, menueffects, preferences
42 void load_defaults(Defaults
*defaults
,
43 char *prefix
/* = 0 */,
44 int do_format
/* = 0 */,
49 void save_defaults(Defaults
*defaults
,
50 char *prefix
/* = 0 */,
51 int do_format
, /* Don't save format which is autodetected by file loader */
52 int do_compression
, /* Don't save compression which is fixed by driver */
56 char* construct_param(char *param
, char *prefix
, char *return_value
);
61 // Executed during index building only
62 void update_index(Asset
*asset
);
63 int equivalent(Asset
&asset
,
66 Asset
& operator=(Asset
&asset
);
67 int operator==(Asset
&asset
);
68 int operator!=(Asset
&asset
);
69 int test_path(const char *path
);
70 int test_plugin_title(const char *path
);
71 int read(FileXML
*file
, int expand_relative
= 1);
72 int read(ArrayList
<PluginServer
*> *plugindb
, FileXML
*xml
, int expand_relative
= 1);
73 int read_audio(FileXML
*xml
);
74 int read_video(FileXML
*xml
);
75 int read_index(FileXML
*xml
);
76 int reset_index(); // When the index file is wrong, reset the asset values
77 // Output path is the path of the output file if name truncation is desired.
78 // It is a "" if complete names should be used.
79 int write(FileXML
*file
,
82 int write(ArrayList
<PluginServer
*> *plugindb
,
88 // Necessary for renderfarm to get encoding parameters
89 int write_audio(FileXML
*xml
);
90 int write_video(FileXML
*xml
);
91 int write_index(FileXML
*xml
);
92 int update_path(char *new_path
);
97 // Folder in resource manager
98 char folder
[BCTEXTLEN
];
100 // Determines the file engine to use
101 int format
; // format of file
103 // contains audio data
112 // String or FourCC describing compression
113 char acodec
[BCTEXTLEN
];
116 int64_t audio_length
;
129 // contains video data
134 // String or FourCC describing compression
135 char vcodec
[BCTEXTLEN
];
137 // Length in units of asset
138 int64_t video_length
;
144 // mpeg audio information
147 int ampeg_derivative
;
149 // Vorbis compression
150 int vorbis_min_bitrate
;
152 int vorbis_max_bitrate
;
164 // for jpeg compression
167 // for mpeg video compression
168 int vmpeg_iframe_distance
;
169 int vmpeg_bframe_distance
;
170 int vmpeg_progressive
;
175 int vmpeg_derivative
;
176 int vmpeg_quantization
;
178 int vmpeg_fix_bitrate
;
180 // Divx video compression
183 int divx_rc_reaction_ratio
;
184 int divx_rc_reaction_period
;
185 int divx_max_key_interval
;
186 int divx_max_quantizer
;
187 int divx_min_quantizer
;
190 int divx_fix_bitrate
;
193 // Divx video decompression
194 int divx_use_deblocking
;
196 // PNG video compression
201 int ms_bitrate_tolerance
;
207 // Image file sequences. Background rendering doesn't want to write a
208 // sequence header but instead wants to start the sequence numbering at a certain
209 // number. This ensures deletion of all the frames which aren't being used.
210 // We still want sequence headers sometimes because loading a directory full of images
211 // for editing would create new assets for every image.
216 // Edits store data for the transition
219 int index_status
; // 0 ready 1 not tested 2 being built 3 small source
220 int64_t index_zoom
; // zoom factor of index data
221 int64_t index_start
; // byte start of index data in the index file
222 int64_t index_bytes
; // Total bytes in source file for comparison before rebuilding the index
223 int64_t index_end
, old_index_end
; // values for index build
224 int64_t* index_offsets
; // offsets of channels in index file in floats