1 /* SPDX-FileCopyrightText: 2024 Blender Authors
3 * SPDX-License-Identifier: GPL-2.0-or-later */
17 namespace blender::seq
{
19 static constexpr int SEQ_THUMB_SIZE
= 256;
22 * Get a thumbnail image for given strip `seq` at `timeline_frame`.
24 * The function can return null if a strip type does not have a thumbnail, a source media file is
25 * not found, or the thumbnail has not been loaded yet.
27 * A "closest" thumbnail if there is no exact match can also be returned, e.g. for a movie strip
28 * the closest frame that has a thumbnail already.
30 * When there is no exact match, a request to load a thumbnail will be internally added and
31 * processed in the background. */
32 ImBuf
*thumbnail_cache_get(const bContext
*C
,
35 float timeline_frame
);
38 * If total amount of resident thumbnails is too large, try to remove oldest-used ones to
39 * keep the cache size in check.
41 void thumbnail_cache_maintain_capacity(Scene
*scene
);
43 void thumbnail_cache_invalidate_strip(Scene
*scene
, const Strip
*strip
);
46 * Discard in-flight thumbnail loading requests that are outside of the given view (X coordinate:
47 * timeline frames, Y coordinate: channels).
49 void thumbnail_cache_discard_requests_outside(Scene
*scene
, const rctf
&rect
);
51 void thumbnail_cache_clear(Scene
*scene
);
52 void thumbnail_cache_destroy(Scene
*scene
);
54 bool strip_can_have_thumbnail(const Scene
*scene
, const Strip
*strip
);
56 } // namespace blender::seq