|
Blender V4.3
|
#include <cstdlib>#include "MEM_guardedalloc.h"#include "BLI_array.hh"#include "BLI_endian_defines.h"#include "BLI_endian_switch.h"#include "BLI_fileops.h"#include "BLI_ghash.h"#include "BLI_math_base.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_string_utils.hh"#include "BLI_threads.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BKE_writeffmpeg.hh"#include "IMB_anim.hh"#include "IMB_imbuf.hh"#include "IMB_indexer.hh"#include "imbuf.hh"Go to the source code of this file.
Classes | |
| struct | IndexBuildContext |
Macros | |
| #define | INDEX_FILE_VERSION 2 |
Variables | |
| static const char | binary_header_str [] = "BlenMIdx" |
| static const char | temp_ext [] = "_part" |
| static const IMB_Proxy_Size | proxy_sizes [] |
| static const float | proxy_fac [] = {0.25, 0.50, 0.75, 1.00} |
| #define INDEX_FILE_VERSION 2 |
Definition at line 51 of file indexer.cc.
Referenced by IMB_index_builder_create(), and IMB_indexer_open().
|
static |
Definition at line 368 of file indexer.cc.
References BLI_path_join, BLI_path_split_dir_file(), BLI_strncpy(), dirname(), FILE_MAXDIR, FILE_MAXFILE, ImBufAnim::filepath, and ImBufAnim::index_dir.
Referenced by get_proxy_filepath(), and get_tc_filepath().
|
static |
Definition at line 386 of file indexer.cc.
References BLI_assert, BLI_path_join, BLI_path_ncmp, FILE_MAXDIR, FILE_MAXFILE, ImBufAnim::filepath, get_index_dir(), IMB_proxy_size_to_array_index(), proxy_fac, SNPRINTF, ImBufAnim::streamindex, and ImBufAnim::suffix.
Referenced by IMB_anim_index_rebuild_context(), IMB_anim_open_proxy(), and IMB_anim_proxy_get_existing().
|
static |
Definition at line 418 of file indexer.cc.
References BLI_assert, BLI_path_join, FILE_MAXDIR, FILE_MAXFILE, get_index_dir(), IMB_timecode_to_array_index(), SNPRINTF, ImBufAnim::streamindex, and ImBufAnim::suffix.
Referenced by IMB_anim_open_index().
Definition at line 381 of file indexer.cc.
References BLI_path_split_file_part(), and ImBufAnim::filepath.
Referenced by seq_proxy_index_dir_set().
| int IMB_anim_index_get_frame_index | ( | ImBufAnim * | anim, |
| IMB_Timecode_Type | tc, | ||
| int | position ) |
Definition at line 1402 of file indexer.cc.
References IMB_anim_open_index(), and IMB_indexer_get_frame_index().
Referenced by IMB_anim_absolute(), and seq_proxy_fetch().
| void IMB_anim_index_rebuild | ( | IndexBuildContext * | context, |
| bool * | stop, | ||
| bool * | do_update, | ||
| float * | progress ) |
Will rebuild all used indices and proxies at once.
Definition at line 1283 of file indexer.cc.
References UNUSED_VARS.
Referenced by do_movie_proxy(), and SEQ_proxy_rebuild().
| IndexBuildContext * IMB_anim_index_rebuild_context | ( | ImBufAnim * | anim, |
| IMB_Timecode_Type | tcs_in_use, | ||
| int | proxy_sizes_in_use, | ||
| int | quality, | ||
| const bool | overwrite, | ||
| GSet * | file_list, | ||
| bool | build_only_on_bad_performance ) |
Prepare context for proxies/time-codes builder
Definition at line 1212 of file indexer.cc.
References BLI_gset_ensure_p_ex(), BLI_strdup(), FILE_MAX, get_proxy_filepath(), IMB_anim_proxy_get_existing(), IMB_PROXY_MAX_SLOT, printf, proxy_sizes, ImBufAnim::state, UNUSED_VARS, and ImBufAnim::Valid.
Referenced by clip_rebuild_proxy_exec(), and SEQ_proxy_rebuild_context().
| void IMB_anim_index_rebuild_finish | ( | IndexBuildContext * | context, |
| bool | stop ) |
Finish rebuilding proxies/time-codes and free temporary contexts used.
Definition at line 1301 of file indexer.cc.
References proxy_sizes, and UNUSED_VARS.
Referenced by proxy_endjob(), and SEQ_proxy_rebuild_finish().
| ImBufAnimIndex * IMB_anim_open_index | ( | ImBufAnim * | anim, |
| IMB_Timecode_Type | tc ) |
Definition at line 1373 of file indexer.cc.
References FILE_MAX, get_tc_filepath(), IMB_indexer_open(), IMB_TC_RECORD_RUN, IMB_TC_RECORD_RUN_NO_GAPS, ImBufAnim::indices_tried, ImBufAnim::no_gaps, and ImBufAnim::record_run.
Referenced by IMB_anim_get_duration(), and IMB_anim_index_get_frame_index().
| ImBufAnim * IMB_anim_open_proxy | ( | ImBufAnim * | anim, |
| IMB_Proxy_Size | preview_size ) |
Definition at line 1346 of file indexer.cc.
References ImBufAnim::colorspace, FILE_MAX, get_proxy_filepath(), IMB_open_anim(), IMB_proxy_size_to_array_index(), ImBufAnim::proxies_tried, and ImBufAnim::proxy_anim.
Referenced by IMB_anim_absolute().
Definition at line 1413 of file indexer.cc.
References BLI_exists(), FILE_MAX, get_proxy_filepath(), IMB_PROXY_MAX_SLOT, IMB_PROXY_NONE, int, and proxy_sizes.
Referenced by IMB_anim_index_rebuild_context(), and seq_proxy_need_rebuild().
| void IMB_anim_set_index_dir | ( | ImBufAnim * | anim, |
| const char * | dir ) |
Defaults to BL_proxy within the directory of the animation.
Definition at line 1336 of file indexer.cc.
References IMB_free_indices(), ImBufAnim::index_dir, STREQ, and STRNCPY.
Referenced by movieclip_open_anim_file(), and seq_proxy_index_dir_set().
| void IMB_free_indices | ( | ImBufAnim * | anim | ) |
Definition at line 1312 of file indexer.cc.
References IMB_close_anim(), IMB_indexer_close(), IMB_PROXY_MAX_SLOT, ImBufAnim::indices_tried, ImBufAnim::no_gaps, ImBufAnim::proxies_tried, ImBufAnim::proxy_anim, and ImBufAnim::record_run.
Referenced by IMB_anim_set_index_dir(), IMB_close_anim_proxies(), and IMB_free_anim().
| void IMB_index_builder_add_entry | ( | anim_index_builder * | fp, |
| int | frameno, | ||
| uint64_t | seek_pos, | ||
| uint64_t | seek_pos_pts, | ||
| uint64_t | seek_pos_dts, | ||
| uint64_t | pts ) |
Definition at line 91 of file indexer.cc.
References anim_index_builder::fp.
Referenced by IMB_index_builder_proc_frame().
| anim_index_builder * IMB_index_builder_create | ( | const char * | filepath | ) |
Definition at line 57 of file indexer.cc.
References B_ENDIAN, binary_header_str, BLI_file_ensure_parent_dir_exists(), BLI_fopen(), BLI_string_join, ENDIAN_ORDER, anim_index_builder::filepath, anim_index_builder::filepath_temp, anim_index_builder::fp, INDEX_FILE_VERSION, MEM_freeN(), STRNCPY, and temp_ext.
| void IMB_index_builder_finish | ( | anim_index_builder * | fp, |
| int | rollback ) |
Definition at line 129 of file indexer.cc.
References BLI_rename(), anim_index_builder::delete_priv_data, anim_index_builder::filepath, anim_index_builder::filepath_temp, anim_index_builder::fp, and MEM_freeN().
| void IMB_index_builder_proc_frame | ( | anim_index_builder * | fp, |
| uchar * | buffer, | ||
| int | data_size, | ||
| int | frameno, | ||
| uint64_t | seek_pos, | ||
| uint64_t | seek_pos_pts, | ||
| uint64_t | seek_pos_dts, | ||
| uint64_t | pts ) |
Definition at line 105 of file indexer.cc.
References e, IMB_index_builder_add_entry(), and anim_index_builder::proc_frame.
| int IMB_indexer_can_scan | ( | ImBufAnimIndex * | idx, |
| int | old_frame_index, | ||
| int | new_frame_index ) |
Definition at line 315 of file indexer.cc.
References IMB_indexer_get_seek_pos().
| void IMB_indexer_close | ( | ImBufAnimIndex * | idx | ) |
Definition at line 324 of file indexer.cc.
References ImBufAnimIndex::entries, and MEM_freeN().
Referenced by IMB_free_indices().
| int IMB_indexer_get_duration | ( | ImBufAnimIndex * | idx | ) |
Definition at line 307 of file indexer.cc.
References ImBufAnimIndex::entries, anim_index_entry::frameno, and ImBufAnimIndex::num_entries.
Referenced by IMB_anim_get_duration().
| int IMB_indexer_get_frame_index | ( | ImBufAnimIndex * | idx, |
| int | frameno ) |
Definition at line 264 of file indexer.cc.
References ImBufAnimIndex::entries, anim_index_entry::frameno, len, and ImBufAnimIndex::num_entries.
Referenced by IMB_anim_index_get_frame_index().
| uint64_t IMB_indexer_get_pts | ( | ImBufAnimIndex * | idx, |
| int | frame_index ) |
Definition at line 296 of file indexer.cc.
References ImBufAnimIndex::entries, ImBufAnimIndex::num_entries, and anim_index_entry::pts.
| uint64_t IMB_indexer_get_seek_pos | ( | ImBufAnimIndex * | idx, |
| int | frame_index ) |
Definition at line 229 of file indexer.cc.
References ImBufAnimIndex::entries, ImBufAnimIndex::num_entries, and anim_index_entry::seek_pos.
Referenced by IMB_indexer_can_scan().
| uint64_t IMB_indexer_get_seek_pos_dts | ( | ImBufAnimIndex * | idx, |
| int | frame_index ) |
Definition at line 253 of file indexer.cc.
References ImBufAnimIndex::entries, ImBufAnimIndex::num_entries, and anim_index_entry::seek_pos_dts.
| uint64_t IMB_indexer_get_seek_pos_pts | ( | ImBufAnimIndex * | idx, |
| int | frame_index ) |
Definition at line 242 of file indexer.cc.
References ImBufAnimIndex::entries, ImBufAnimIndex::num_entries, and anim_index_entry::seek_pos_pts.
| ImBufAnimIndex * IMB_indexer_open | ( | const char * | filepath | ) |
Definition at line 148 of file indexer.cc.
References B_ENDIAN, binary_header_str, BLI_endian_switch_int32(), BLI_endian_switch_uint64(), BLI_fopen(), ENDIAN_ORDER, ImBufAnimIndex::entries, ImBufAnimIndex::filepath, anim_index_entry::frameno, INDEX_FILE_VERSION, MEM_callocN, MEM_freeN(), ImBufAnimIndex::num_entries, anim_index_entry::pts, anim_index_entry::seek_pos, anim_index_entry::seek_pos_dts, anim_index_entry::seek_pos_pts, STRNCPY, and UNLIKELY.
Referenced by IMB_anim_open_index().
| int IMB_proxy_size_to_array_index | ( | IMB_Proxy_Size | pr_size | ) |
Definition at line 330 of file indexer.cc.
References BLI_assert_msg, IMB_PROXY_100, IMB_PROXY_25, IMB_PROXY_50, IMB_PROXY_75, and IMB_PROXY_NONE.
Referenced by get_proxy_filepath(), and IMB_anim_open_proxy().
| int IMB_timecode_to_array_index | ( | IMB_Timecode_Type | tc | ) |
Definition at line 349 of file indexer.cc.
References BLI_assert_msg, IMB_TC_NONE, IMB_TC_RECORD_RUN, and IMB_TC_RECORD_RUN_NO_GAPS.
Referenced by get_tc_filepath().
|
static |
Definition at line 44 of file indexer.cc.
Referenced by IMB_index_builder_create(), and IMB_indexer_open().
|
static |
Definition at line 49 of file indexer.cc.
Referenced by get_proxy_filepath().
|
static |
Definition at line 47 of file indexer.cc.
Referenced by IMB_anim_index_rebuild_context(), IMB_anim_index_rebuild_finish(), IMB_anim_proxy_get_existing(), and seq_get_proxy_size_flags().
|
static |
Definition at line 45 of file indexer.cc.
Referenced by IMB_index_builder_create().