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
);
45 // Load and save parameters for a render dialog
46 // Used by render, record, menueffects, preferences
47 void load_defaults(Defaults
*defaults
,
48 char *prefix
/* = 0 */,
49 int do_format
/* = 0 */,
54 void save_defaults(Defaults
*defaults
,
55 char *prefix
/* = 0 */,
56 int do_format
, /* Don't save format which is autodetected by file loader */
57 int do_compression
, /* Don't save compression which is fixed by driver */
61 char* construct_param(char *param
, char *prefix
, char *return_value
);
63 // defaults which are specific to format used
64 void load_format_defaults(Defaults
*defaults
);
65 void save_format_defaults(Defaults
*defaults
);
67 // Executed during index building only
68 void update_index(Asset
*asset
);
69 int equivalent(Asset
&asset
,
72 Asset
& operator=(Asset
&asset
);
73 int operator==(Asset
&asset
);
74 int operator!=(Asset
&asset
);
75 int test_path(const char *path
);
76 int test_plugin_title(const char *path
);
77 int read(FileXML
*file
, int expand_relative
= 1);
78 int read(ArrayList
<PluginServer
*> *plugindb
, FileXML
*xml
, int expand_relative
= 1);
79 int read_audio(FileXML
*xml
);
80 int read_video(FileXML
*xml
);
81 int read_index(FileXML
*xml
);
82 int reset_index(); // When the index file is wrong, reset the asset values
84 int set_timecode(char *tc
, int format
, int end
);
87 // Output path is the path of the output file if name truncation is desired.
88 // It is a "" if complete names should be used.
89 int write(FileXML
*file
,
92 int write(ArrayList
<PluginServer
*> *plugindb
,
98 // Necessary for renderfarm to get encoding parameters
99 int write_audio(FileXML
*xml
);
100 int write_video(FileXML
*xml
);
101 int write_index(FileXML
*xml
);
102 int update_path(char *new_path
);
105 char path
[BCTEXTLEN
];
108 char pipe
[BCTEXTLEN
];
111 // Prefix used to generate this asset
112 char prefix
[BCTEXTLEN
];
114 // Folder in resource manager
115 char folder
[BCTEXTLEN
];
117 // Determines the file engine to use
118 int format
; // format of file
120 // contains audio data
129 // String or FourCC describing compression
130 char acodec
[BCTEXTLEN
];
133 int64_t audio_length
;
146 // contains video data
151 // Timecode information. User setable, in case of errors in source
152 char reel_name
[BCTEXTLEN
];
159 // String or FourCC describing compression
160 char vcodec
[BCTEXTLEN
];
162 // Length in units of asset
163 int64_t video_length
;
169 // mpeg audio information
172 int ampeg_derivative
;
174 // Vorbis compression
175 int vorbis_min_bitrate
;
177 int vorbis_max_bitrate
;
184 // Set by package render during file creation. -1 means square pixels.
190 // for jpeg compression
193 // for mpeg video compression
194 int vmpeg_iframe_distance
;
195 int vmpeg_bframe_distance
;
196 int vmpeg_progressive
;
201 int vmpeg_derivative
;
202 int vmpeg_quantization
;
204 int vmpeg_fix_bitrate
;
206 // Divx video compression
209 int divx_rc_reaction_ratio
;
210 int divx_rc_reaction_period
;
211 int divx_max_key_interval
;
212 int divx_max_quantizer
;
213 int divx_min_quantizer
;
216 int divx_fix_bitrate
;
219 // Divx video decompression
220 int divx_use_deblocking
;
222 // PNG video compression
225 // EXR video compression
229 // TIFF video compression. An enumeration from filetiff.h
231 int tiff_compression
;
235 int ms_bitrate_tolerance
;
246 // Image file sequences. Background rendering doesn't want to write a
247 // sequence header but instead wants to start the sequence numbering at a certain
248 // number. This ensures deletion of all the frames which aren't being used.
249 // We still want sequence headers sometimes because loading a directory full of images
250 // for editing would create new assets for every image.
255 // Edits store data for the transition
258 int index_status
; // 0 ready 1 not tested 2 being built 3 small source
259 int64_t index_zoom
; // zoom factor of index data
260 int64_t index_start
; // byte start of index data in the index file
261 int64_t index_bytes
; // Total bytes in source file for comparison before rebuilding the index
262 int64_t index_end
, old_index_end
; // values for index build
263 int64_t* index_offsets
; // offsets of channels in index file in floats