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 int64_t get_index_size(int channel
);
44 // Get an english description of the compression. Used by AssetEdit
45 char* get_compression_text(int audio
, int video
);
47 // Load and save parameters for a render dialog
48 // Used by render, record, menueffects, preferences
49 void load_defaults(Defaults
*defaults
,
50 char *prefix
/* = 0 */,
51 int do_format
/* = 0 */,
56 void save_defaults(Defaults
*defaults
,
57 char *prefix
/* = 0 */,
58 int do_format
, /* Don't save format which is autodetected by file loader */
59 int do_compression
, /* Don't save compression which is fixed by driver */
63 char* construct_param(char *param
, char *prefix
, char *return_value
);
65 // defaults which are specific to format used
66 void load_format_defaults(Defaults
*defaults
);
67 void save_format_defaults(Defaults
*defaults
);
69 // Executed during index building only
70 void update_index(Asset
*asset
);
71 int equivalent(Asset
&asset
,
74 Asset
& operator=(Asset
&asset
);
75 int operator==(Asset
&asset
);
76 int operator!=(Asset
&asset
);
77 int test_path(const char *path
);
78 int test_plugin_title(const char *path
);
79 int read(FileXML
*file
, 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 // Write the index data and asset info. Used by IndexThread.
94 int write_index(char *path
, int data_bytes
);
97 // Necessary for renderfarm to get encoding parameters
98 int write_audio(FileXML
*xml
);
99 int write_video(FileXML
*xml
);
100 int write_index(FileXML
*xml
);
101 int update_path(char *new_path
);
104 char path
[BCTEXTLEN
];
107 char pipe
[BCTEXTLEN
];
110 // Prefix used to generate this asset
111 char prefix
[BCTEXTLEN
];
113 // Folder in resource manager
114 char folder
[BCTEXTLEN
];
116 // Format of file. An enumeration from file.inc.
119 // contains audio data
128 // String or FourCC describing compression
129 char acodec
[BCTEXTLEN
];
132 int64_t audio_length
;
145 // contains video data
150 // Timecode information. User setable, in case of errors in source
151 char reel_name
[BCTEXTLEN
];
158 // String or FourCC describing compression
159 char vcodec
[BCTEXTLEN
];
161 // Length in units of asset
162 int64_t video_length
;
168 // mpeg audio information
171 int ampeg_derivative
;
173 // Vorbis compression
174 int vorbis_min_bitrate
;
176 int vorbis_max_bitrate
;
179 // Theora compression
180 int theora_fix_bitrate
;
183 int theora_sharpness
;
184 int theora_keyframe_frequency
;
185 int theora_keyframe_force_frequency
;
196 // Set by package render during file creation. -1 means square pixels.
199 // for the interlace mode
200 int interlace_autofixoption
;
202 int interlace_fixmethod
;
204 // for jpeg compression
207 // for mpeg video compression
208 int vmpeg_iframe_distance
;
209 int vmpeg_progressive
;
214 int vmpeg_derivative
;
215 int vmpeg_quantization
;
217 int vmpeg_fix_bitrate
;
222 int vmpeg_field_order
;
223 int vmpeg_pframe_distance
;
232 // Divx video compression
235 int divx_rc_reaction_ratio
;
236 int divx_rc_reaction_period
;
237 int divx_max_key_interval
;
238 int divx_max_quantizer
;
239 int divx_min_quantizer
;
242 int divx_fix_bitrate
;
244 // h264 video compression
247 int h264_fix_bitrate
;
249 // Divx video decompression
250 int divx_use_deblocking
;
252 // PNG video compression
255 // EXR video compression
259 // TIFF video compression. An enumeration from filetiff.h
261 int tiff_compression
;
265 int ms_bitrate_tolerance
;
276 // Image file sequences. Background rendering doesn't want to write a
277 // sequence header but instead wants to start the sequence numbering at a certain
278 // number. This ensures deletion of all the frames which aren't being used.
279 // We still want sequence headers sometimes because loading a directory full of images
280 // for editing would create new assets for every image.
285 // Edits store data for the transition
288 int index_status
; // Macro from assets.inc
289 int64_t index_zoom
; // zoom factor of index data
290 int64_t index_start
; // byte start of index data in the index file
291 // Total bytes in source file when the index was buillt
293 int64_t index_end
, old_index_end
; // values for index build
294 // offsets of channels in index buffer in floats
295 int64_t *index_offsets
;
296 // Sizes of channels in index buffer in floats. This allows
297 // variable channel size.
298 int64_t *index_sizes
;
299 // [ index channel ][ index channel ]
300 // [high][low][high][low][high][low][high][low]