6 #include "bcwindowbase.inc"
7 #include "defaults.inc"
10 #include "pluginserver.inc"
16 #define TC_DROPFRAME 0
17 #define TC_NONDROPFRAME 1
21 // Asset can be one of the following:
22 // 1) a pure media file
25 // The EDL can reference itself if it contains a media file
26 class Asset
: public ListItem
<Asset
>
31 Asset(const char *path
);
32 Asset(const int plugin_type
, const char *plugin_path
);
38 void copy_from(Asset
*asset
, int do_index
);
39 void copy_location(Asset
*asset
);
40 void copy_format(Asset
*asset
, int do_index
= 1);
41 void copy_index(Asset
*asset
);
42 int64_t get_index_offset(int channel
);
43 // Get an english description of the compression. Used by AssetEdit
44 char* get_compression_text(int audio
, int video
);
46 // Load and save parameters for a render dialog
47 // Used by render, record, menueffects, preferences
48 void load_defaults(Defaults
*defaults
,
49 char *prefix
/* = 0 */,
50 int do_format
/* = 0 */,
55 void save_defaults(Defaults
*defaults
,
56 char *prefix
/* = 0 */,
57 int do_format
, /* Don't save format which is autodetected by file loader */
58 int do_compression
, /* Don't save compression which is fixed by driver */
62 char* construct_param(char *param
, char *prefix
, char *return_value
);
64 // defaults which are specific to format used
65 void load_format_defaults(Defaults
*defaults
);
66 void save_format_defaults(Defaults
*defaults
);
68 // Executed during index building only
69 void update_index(Asset
*asset
);
70 int equivalent(Asset
&asset
,
73 Asset
& operator=(Asset
&asset
);
74 int operator==(Asset
&asset
);
75 int operator!=(Asset
&asset
);
76 int test_path(const char *path
);
77 int test_plugin_title(const char *path
);
78 int read(FileXML
*file
, int expand_relative
= 1);
79 int read(ArrayList
<PluginServer
*> *plugindb
, FileXML
*xml
, int expand_relative
= 1);
80 int read_audio(FileXML
*xml
);
81 int read_video(FileXML
*xml
);
82 int read_index(FileXML
*xml
);
83 int reset_index(); // When the index file is wrong, reset the asset values
85 int set_timecode(char *tc
, int format
, int end
);
88 // Output path is the path of the output file if name truncation is desired.
89 // It is a "" if complete names should be used.
90 int write(FileXML
*file
,
93 int write(ArrayList
<PluginServer
*> *plugindb
,
99 // Necessary for renderfarm to get encoding parameters
100 int write_audio(FileXML
*xml
);
101 int write_video(FileXML
*xml
);
102 int write_index(FileXML
*xml
);
103 int update_path(char *new_path
);
106 char path
[BCTEXTLEN
];
109 char pipe
[BCTEXTLEN
];
112 // Prefix used to generate this asset
113 char prefix
[BCTEXTLEN
];
115 // Folder in resource manager
116 char folder
[BCTEXTLEN
];
118 // Format of file. An enumeration from file.inc.
121 // contains audio data
130 // String or FourCC describing compression
131 char acodec
[BCTEXTLEN
];
134 int64_t audio_length
;
147 // contains video data
152 // Timecode information. User setable, in case of errors in source
153 char reel_name
[BCTEXTLEN
];
160 // String or FourCC describing compression
161 char vcodec
[BCTEXTLEN
];
163 // Length in units of asset
164 int64_t video_length
;
170 // mpeg audio information
173 int ampeg_derivative
;
175 // Vorbis compression
176 int vorbis_min_bitrate
;
178 int vorbis_max_bitrate
;
181 // Theora compression
182 int theora_fix_bitrate
;
185 int theora_sharpness
;
186 int theora_keyframe_frequency
;
187 int theora_keyframe_force_frequency
;
193 // Set by package render during file creation. -1 means square pixels.
196 // for the interlace mode
197 int interlace_autofixoption
;
199 int interlace_fixmethod
;
201 // for jpeg compression
204 // for mpeg video compression
205 int vmpeg_iframe_distance
;
206 int vmpeg_bframe_distance
;
207 int vmpeg_progressive
;
212 int vmpeg_derivative
;
213 int vmpeg_quantization
;
215 int vmpeg_fix_bitrate
;
217 // Divx video compression
220 int divx_rc_reaction_ratio
;
221 int divx_rc_reaction_period
;
222 int divx_max_key_interval
;
223 int divx_max_quantizer
;
224 int divx_min_quantizer
;
227 int divx_fix_bitrate
;
230 // Divx video decompression
231 int divx_use_deblocking
;
233 // PNG video compression
236 // EXR video compression
240 // TIFF video compression. An enumeration from filetiff.h
242 int tiff_compression
;
246 int ms_bitrate_tolerance
;
257 // Image file sequences. Background rendering doesn't want to write a
258 // sequence header but instead wants to start the sequence numbering at a certain
259 // number. This ensures deletion of all the frames which aren't being used.
260 // We still want sequence headers sometimes because loading a directory full of images
261 // for editing would create new assets for every image.
266 // Edits store data for the transition
269 int index_status
; // 0 ready 1 not tested 2 being built 3 small source
270 int64_t index_zoom
; // zoom factor of index data
271 int64_t index_start
; // byte start of index data in the index file
272 int64_t index_bytes
; // Total bytes in source file for comparison before rebuilding the index
273 int64_t index_end
, old_index_end
; // values for index build
274 int64_t* index_offsets
; // offsets of channels in index file in floats