|
Blender
V2.93
|
#include <stdlib.h>#include "MEM_guardedalloc.h"#include "BLI_endian_switch.h"#include "BLI_fileops.h"#include "BLI_ghash.h"#include "BLI_math.h"#include "BLI_path_util.h"#include "BLI_string.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "IMB_anim.h"#include "IMB_indexer.h"#include "imbuf.h"#include "BKE_global.h"Go to the source code of this file.
Classes | |
| struct | IndexBuildContext |
Macros | |
| #define | INDEX_FILE_VERSION 2 |
Typedefs | |
| typedef struct IndexBuildContext | IndexBuildContext |
Variables | |
| static const char | binary_header_str [] = "BlenMIdx" |
| static const char | temp_ext [] = "_part" |
| static const int | proxy_sizes [] = {IMB_PROXY_25, IMB_PROXY_50, IMB_PROXY_75, IMB_PROXY_100} |
| static const float | proxy_fac [] = {0.25, 0.50, 0.75, 1.00} |
| typedef struct IndexBuildContext IndexBuildContext |
|
static |
Definition at line 389 of file indexer.c.
References BLI_path_append(), BLI_split_dirfile(), BLI_strncpy(), FILE_MAXFILE, anim::index_dir, and anim::name.
Referenced by get_proxy_filename(), and get_tc_filename().
|
static |
Definition at line 409 of file indexer.c.
References BLI_assert, BLI_join_dirfile(), BLI_path_ncmp, BLI_snprintf(), FILE_MAXDIR, FILE_MAXFILE, get_index_dir(), IMB_proxy_size_to_array_index(), anim::name, anim_index::name, proxy_fac, anim::streamindex, and anim::suffix.
Referenced by IMB_anim_index_rebuild_context(), IMB_anim_open_proxy(), and IMB_anim_proxy_get_existing().
|
static |
Definition at line 446 of file indexer.c.
References BLI_assert, BLI_join_dirfile(), BLI_snprintf(), FILE_MAXDIR, FILE_MAXFILE, get_index_dir(), IMB_timecode_to_array_index(), anim::streamindex, and anim::suffix.
Referenced by IMB_anim_open_index().
| void IMB_anim_get_fname | ( | struct anim * | anim, |
| char * | file, | ||
| int | size | ||
| ) |
Definition at line 402 of file indexer.c.
References BLI_split_dirfile(), BLI_strncpy(), file, FILE_MAXFILE, anim::name, and size().
Referenced by seq_proxy_index_dir_set().
| int IMB_anim_index_get_frame_index | ( | struct anim * | anim, |
| IMB_Timecode_Type | tc, | ||
| int | position | ||
| ) |
Definition at line 1480 of file indexer.c.
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 | ( | struct IndexBuildContext * | context, |
| short * | stop, | ||
| short * | do_update, | ||
| float * | progress | ||
| ) |
Definition at line 1352 of file indexer.c.
References ANIM_FFMPEG, context, and UNUSED_VARS.
Referenced by do_movie_proxy(), and SEQ_proxy_rebuild().
| IndexBuildContext* IMB_anim_index_rebuild_context | ( | struct anim * | anim, |
| IMB_Timecode_Type | tcs_in_use, | ||
| IMB_Proxy_Size | proxy_sizes_in_use, | ||
| int | quality, | ||
| const bool | overwrite, | ||
| GSet * | file_list | ||
| ) |
Definition at line 1274 of file indexer.c.
References ANIM_FFMPEG, BLI_gset_ensure_p_ex(), BLI_strdup(), context, anim::curtype, FILE_MAX, get_proxy_filename(), IMB_anim_proxy_get_existing(), IMB_PROXY_MAX_SLOT, NULL, proxy_sizes, and UNUSED_VARS.
Referenced by clip_rebuild_proxy_exec(), and SEQ_proxy_rebuild_context().
| void IMB_anim_index_rebuild_finish | ( | IndexBuildContext * | context, |
| short | stop | ||
| ) |
Definition at line 1376 of file indexer.c.
References ANIM_FFMPEG, context, proxy_sizes, and UNUSED_VARS.
Referenced by proxy_endjob(), and SEQ_proxy_rebuild_finish().
| struct anim_index* IMB_anim_open_index | ( | struct anim * | anim, |
| IMB_Timecode_Type | tc | ||
| ) |
Definition at line 1454 of file indexer.c.
References anim::curr_idx, FILE_MAX, get_tc_filename(), IMB_indexer_open(), IMB_timecode_to_array_index(), anim::indices_tried, and NULL.
Referenced by IMB_anim_get_duration(), and IMB_anim_index_get_frame_index().
| struct anim* IMB_anim_open_proxy | ( | struct anim * | anim, |
| IMB_Proxy_Size | preview_size | ||
| ) |
Definition at line 1427 of file indexer.c.
References anim::colorspace, FILE_MAX, get_proxy_filename(), IMB_open_anim(), IMB_proxy_size_to_array_index(), NULL, anim::proxies_tried, and anim::proxy_anim.
Referenced by IMB_anim_absolute().
| IMB_Proxy_Size IMB_anim_proxy_get_existing | ( | struct anim * | anim | ) |
Definition at line 1491 of file indexer.c.
References BLI_exists(), FILE_MAX, get_proxy_filename(), IMB_PROXY_MAX_SLOT, and proxy_sizes.
Referenced by IMB_anim_index_rebuild_context(), and seq_proxy_need_rebuild().
| void IMB_anim_set_index_dir | ( | struct anim * | anim, |
| const char * | dir | ||
| ) |
Definition at line 1417 of file indexer.c.
References BLI_strncpy(), IMB_free_indices(), anim::index_dir, and STREQ.
Referenced by movieclip_open_anim_file(), and seq_proxy_index_dir_set().
| void IMB_free_indices | ( | struct anim * | anim | ) |
Definition at line 1395 of file indexer.c.
References anim::curr_idx, IMB_close_anim(), IMB_indexer_close(), IMB_PROXY_MAX_SLOT, IMB_TC_MAX_SLOT, anim::indices_tried, NULL, anim::proxies_tried, and anim::proxy_anim.
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 109 of file indexer.c.
References anim_index_builder::fp.
Referenced by IMB_index_builder_proc_frame().
| anim_index_builder* IMB_index_builder_create | ( | const char * | name | ) |
Definition at line 75 of file indexer.c.
References B_ENDIAN, binary_header_str, BLI_fopen(), BLI_make_existing_file(), BLI_strncpy(), ENDIAN_ORDER, anim_index_builder::fp, INDEX_FILE_VERSION, MEM_callocN, MEM_freeN, anim_index_builder::name, NULL, temp_ext, and anim_index_builder::temp_name.
| void IMB_index_builder_finish | ( | anim_index_builder * | fp, |
| int | rollback | ||
| ) |
Definition at line 147 of file indexer.c.
References BLI_rename(), anim_index_builder::delete_priv_data, anim_index_builder::fp, MEM_freeN, anim_index_builder::name, and anim_index_builder::temp_name.
| 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 123 of file indexer.c.
References buffer, e, IMB_index_builder_add_entry(), and anim_index_builder::proc_frame.
| int IMB_indexer_can_scan | ( | struct anim_index * | idx, |
| int | old_frame_index, | ||
| int | new_frame_index | ||
| ) |
Definition at line 332 of file indexer.c.
References IMB_indexer_get_seek_pos().
| void IMB_indexer_close | ( | struct anim_index * | idx | ) |
Definition at line 341 of file indexer.c.
References anim_index::entries, and MEM_freeN.
Referenced by IMB_free_indices().
| int IMB_indexer_get_duration | ( | struct anim_index * | idx | ) |
Definition at line 324 of file indexer.c.
References anim_index::entries, anim_index_entry::frameno, and anim_index::num_entries.
Referenced by IMB_anim_get_duration().
| int IMB_indexer_get_frame_index | ( | struct anim_index * | idx, |
| int | frameno | ||
| ) |
Definition at line 281 of file indexer.c.
References anim_index::entries, anim_index_entry::frameno, len, and anim_index::num_entries.
Referenced by IMB_anim_index_get_frame_index().
| uint64_t IMB_indexer_get_pts | ( | struct anim_index * | idx, |
| int | frame_index | ||
| ) |
Definition at line 313 of file indexer.c.
References anim_index::entries, anim_index::num_entries, and anim_index_entry::pts.
| uint64_t IMB_indexer_get_seek_pos | ( | struct anim_index * | idx, |
| int | frame_index | ||
| ) |
Definition at line 248 of file indexer.c.
References anim_index::entries, anim_index::num_entries, and anim_index_entry::seek_pos.
Referenced by IMB_indexer_can_scan().
| uint64_t IMB_indexer_get_seek_pos_dts | ( | struct anim_index * | idx, |
| int | frame_index | ||
| ) |
Definition at line 270 of file indexer.c.
References anim_index::entries, anim_index::num_entries, and anim_index_entry::seek_pos_dts.
| uint64_t IMB_indexer_get_seek_pos_pts | ( | struct anim_index * | idx, |
| int | frame_index | ||
| ) |
Definition at line 259 of file indexer.c.
References anim_index::entries, anim_index::num_entries, and anim_index_entry::seek_pos_pts.
| struct anim_index* IMB_indexer_open | ( | const char * | name | ) |
Definition at line 166 of file indexer.c.
References B_ENDIAN, binary_header_str, BLI_endian_switch_int32(), BLI_endian_switch_uint64(), BLI_fopen(), BLI_strncpy(), ENDIAN_ORDER, anim_index::entries, anim_index_entry::frameno, INDEX_FILE_VERSION, MEM_callocN, MEM_freeN, anim_index::name, NULL, anim_index::num_entries, anim_index_entry::pts, anim_index_entry::seek_pos, anim_index_entry::seek_pos_dts, anim_index_entry::seek_pos_pts, and UNLIKELY.
Referenced by IMB_anim_open_index().
| int IMB_proxy_size_to_array_index | ( | IMB_Proxy_Size | pr_size | ) |
Definition at line 347 of file indexer.c.
References BLI_assert, IMB_PROXY_100, IMB_PROXY_25, IMB_PROXY_50, IMB_PROXY_75, and IMB_PROXY_NONE.
Referenced by get_proxy_filename(), and IMB_anim_open_proxy().
| int IMB_timecode_to_array_index | ( | IMB_Timecode_Type | tc | ) |
Definition at line 366 of file indexer.c.
References BLI_assert, IMB_TC_FREE_RUN, IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN, IMB_TC_NONE, IMB_TC_RECORD_RUN, and IMB_TC_RECORD_RUN_NO_GAPS.
Referenced by get_tc_filename(), and IMB_anim_open_index().
|
static |
Definition at line 54 of file indexer.c.
Referenced by IMB_index_builder_create(), and IMB_indexer_open().
|
static |
Definition at line 58 of file indexer.c.
Referenced by get_proxy_filename().
|
static |
Definition at line 57 of file indexer.c.
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 55 of file indexer.c.
Referenced by IMB_index_builder_create().