|
Blender V4.3
|
Classes | |
| struct | MediaPresence |
| class | ThumbGenerationJob |
| struct | ThumbnailCache |
Variables | |
| static ThreadMutex | presence_lock = BLI_MUTEX_INITIALIZER |
| static constexpr int | MAX_THUMBNAILS = 5000 |
| static std::mutex | thumb_cache_mutex |
| static constexpr int | SEQ_THUMB_SIZE = 256 |
|
static |
Definition at line 43 of file media_presence.cc.
References BLI_exists(), BLI_path_abs(), BLI_path_join, check_media_missing(), Strip::dirpath, ELEM, FILE_MAX, StripElem::filename, get_seq_base_path(), int, LISTBASE_FOREACH, MEM_allocN_len, SEQ_TYPE_IMAGE, SEQ_TYPE_META, SEQ_TYPE_MOVIE, Sequence::seqbase, Sequence::strip, Strip::stripdata, and Sequence::type.
Referenced by check_media_missing(), and media_presence_is_missing().
|
static |
Definition at line 30 of file media_presence.cc.
References BLI_exists(), BLI_path_abs(), FILE_MAX, bSound::filepath, get_seq_base_path(), and STRNCPY.
Referenced by media_presence_is_missing().
|
static |
Definition at line 141 of file thumbnail_cache.cc.
Referenced by thumbnail_cache_get().
|
static |
Definition at line 88 of file media_presence.cc.
Referenced by media_presence_is_missing(), and media_presence_set_missing().
|
static |
Definition at line 173 of file thumbnail_cache.cc.
References BLI_path_abs(), BLI_path_join, Strip::dirpath, FILE_MAX, StripElem::filename, ID_BLEND_PATH_FROM_GLOBAL, SEQ_render_give_stripelem(), SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, Sequence::strip, Strip::stripdata, and Sequence::type.
Referenced by thumbnail_cache_get().
|
static |
Definition at line 24 of file media_presence.cc.
References BKE_main_blendfile_path_from_global(), Scene::id, ID_BLEND_PATH_FROM_GLOBAL, and Sequence::scene.
Referenced by check_media_missing(), and check_sound_media_missing().
Definition at line 194 of file thumbnail_cache.cc.
References float, round_fl_to_int(), and SEQ_THUMB_SIZE.
Referenced by scale_to_thumbnail_size().
|
static |
Definition at line 207 of file thumbnail_cache.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, imb_freerectImBuf(), IMB_thumb_load_image(), LoadLargeFiles, seq_imbuf_assign_spaces(), seq_imbuf_to_sequencer_space(), and SEQ_THUMB_SIZE.
| void blender::seq::media_presence_free | ( | Scene * | scene | ) |
Free media presence cache, if it was created.
Definition at line 178 of file media_presence.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), and presence_lock.
Referenced by SEQ_editing_free(), and sequencer_refresh_all_exec().
Invalidate media presence cache for the given sound.
Definition at line 169 of file media_presence.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), and presence_lock.
Invalidate media presence cache for the given strip.
Definition at line 160 of file media_presence.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), and presence_lock.
Referenced by sequence_invalidate_cache().
Check whether a sequence strip has missing media. Results of the query for this strip will be cached into MediaPresence cache. The cache will be created on demand.
| scene | Scene to query. |
| seq | Sequencer strip. |
Definition at line 97 of file media_presence.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BLI_mutex_lock(), BLI_mutex_unlock(), check_media_missing(), check_sound_media_missing(), get_media_presence_cache(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::seq::MediaPresence::map_seq, blender::seq::MediaPresence::map_sound, presence_lock, SEQ_TYPE_SOUND_RAM, Sequence::sound, and Sequence::type.
Set or change the missing media cache value for a given strip.
Definition at line 139 of file media_presence.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), BLI_mutex_lock(), BLI_mutex_unlock(), get_media_presence_cache(), blender::seq::MediaPresence::map_seq, blender::seq::MediaPresence::map_sound, presence_lock, SEQ_TYPE_SOUND_RAM, Sequence::sound, and Sequence::type.
Referenced by seq_render_image_strip(), and seq_render_movie_strip().
|
static |
Definition at line 418 of file thumbnail_cache.cc.
References blender::math::abs(), BLI_assert_msg, blender::seq::ThumbnailCache::logical_time_, Sequence::machine, blender::seq::ThumbnailCache::map_, blender::math::max(), StripElem::orig_height, StripElem::orig_width, query_thumbnail(), blender::seq::ThumbnailCache::requests_, Sequence::streamindex, Sequence::strip, Strip::stripdata, and Sequence::type.
Referenced by query_thumbnail(), and thumbnail_cache_get().
|
static |
Definition at line 150 of file thumbnail_cache.cc.
Referenced by thumbnail_cache_clear(), thumbnail_cache_destroy(), thumbnail_cache_discard_requests_outside(), thumbnail_cache_invalidate_strip(), and thumbnail_cache_maintain_capacity().
|
static |
Definition at line 224 of file thumbnail_cache.cc.
References image_size_to_thumb_size(), IMB_scale(), Nearest, ImBuf::x, and ImBuf::y.
Definition at line 158 of file thumbnail_cache.cc.
References ELEM, StripElem::orig_height, StripElem::orig_width, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, Sequence::strip, Strip::stripdata, and Sequence::type.
Referenced by get_seq_strip_thumbnails(), thumbnail_cache_get(), and thumbnail_cache_invalidate_strip().
| void blender::seq::thumbnail_cache_clear | ( | Scene * | scene | ) |
Definition at line 597 of file thumbnail_cache.cc.
References lock, query_thumbnail_cache(), thumb_cache_mutex, and thumbnail_cache_clear().
Referenced by sequencer_refresh_all_exec(), and thumbnail_cache_clear().
| void blender::seq::thumbnail_cache_destroy | ( | Scene * | scene | ) |
Definition at line 606 of file thumbnail_cache.cc.
References BLI_assert, lock, query_thumbnail_cache(), thumb_cache_mutex, and thumbnail_cache_destroy().
Referenced by SEQ_editing_free(), and thumbnail_cache_destroy().
Discard in-flight thumbnail loading requests that are outside of the given view (X coordinate: timeline frames, Y coordinate: channels).
Definition at line 585 of file thumbnail_cache.cc.
References lock, query_thumbnail_cache(), blender::seq::ThumbnailCache::requests_, thumb_cache_mutex, thumbnail_cache_discard_requests_outside(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_seq_strips(), and thumbnail_cache_discard_requests_outside().
| ImBuf * blender::seq::thumbnail_cache_get | ( | const bContext * | C, |
| Scene * | scene, | ||
| const Sequence * | seq, | ||
| float | timeline_frame ) |
Get a thumbnail image for given strip seq at timeline_frame.
The function can return null if a strip type does not have a thumbnail, a source media file is not found, or the thumbnail has not been loaded yet.
A "closest" thumbnail if there is no exact match can also be returned, e.g. for a movie strip the closest frame that has a thumbnail already.
When there is no exact match, a request to load a thumbnail will be internally added and processed in the background.
Definition at line 482 of file thumbnail_cache.cc.
References Sequence::anim_startofs, ensure_thumbnail_cache(), get_path_from_seq(), IMB_refImBuf(), lock, query_thumbnail(), blender::math::round(), SEQ_give_frame_index(), SEQ_TYPE_MOVIE, strip_can_have_thumbnail(), thumb_cache_mutex, thumbnail_cache_get(), and Sequence::type.
Referenced by get_seq_strip_thumbnails(), and thumbnail_cache_get().
Definition at line 512 of file thumbnail_cache.cc.
References BKE_main_blendfile_path_from_global(), BLI_path_abs(), BLI_path_join, Strip::dirpath, ELEM, FILE_MAX, StripElem::filename, Scene::id, ID_BLEND_PATH_FROM_GLOBAL, int, lock, MEM_allocN_len, query_thumbnail_cache(), blender::seq::ThumbnailCache::remove_entry(), Sequence::scene, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, Sequence::strip, strip_can_have_thumbnail(), Strip::stripdata, thumb_cache_mutex, thumbnail_cache_invalidate_strip(), and Sequence::type.
Referenced by sequencer_reload_exec(), and thumbnail_cache_invalidate_strip().
| void blender::seq::thumbnail_cache_maintain_capacity | ( | Scene * | scene | ) |
If total amount of resident thumbnails is too large, try to remove oldest-used ones to keep the cache size in check.
Definition at line 542 of file thumbnail_cache.cc.
References IMB_freeImBuf(), lock, blender::seq::ThumbnailCache::logical_time_, blender::seq::ThumbnailCache::map_, MAX_THUMBNAILS, query_thumbnail_cache(), blender::seq::ThumbnailCache::remove_entry(), thumb_cache_mutex, and thumbnail_cache_maintain_capacity().
Referenced by draw_seq_strips(), and thumbnail_cache_maintain_capacity().
|
staticconstexpr |
Definition at line 34 of file thumbnail_cache.cc.
Referenced by thumbnail_cache_maintain_capacity().
|
static |
Definition at line 22 of file media_presence.cc.
Referenced by media_presence_free(), media_presence_invalidate_sound(), media_presence_invalidate_strip(), media_presence_is_missing(), and media_presence_set_missing().
|
staticconstexpr |
Definition at line 23 of file SEQ_thumbnail_cache.hh.
Referenced by image_size_to_thumb_size(), make_thumb_for_image(), and seq_get_thumb_image_dimensions().
|
static |
Definition at line 38 of file thumbnail_cache.cc.
Referenced by thumbnail_cache_clear(), thumbnail_cache_destroy(), thumbnail_cache_discard_requests_outside(), thumbnail_cache_get(), thumbnail_cache_invalidate_strip(), and thumbnail_cache_maintain_capacity().