65 const int start_frame,
69 if (
name !=
nullptr) {
72 if (path !=
nullptr) {
104 else if (strip->is_effect()) {
118 const char *role_colorspace_byte;
121 if (
STREQ(strip_colorspace, role_colorspace_byte)) {
124 const char *default_view_transform =
185 if (strip->
input1 ==
nullptr) {
247 if (strip->
len == 1) {
268 if (ibuf !=
nullptr) {
298 const double av_stream_offset = sound_stream.
start -
load_data->r_video_stream_start;
299 const int frame_offset = av_stream_offset * scene->frames_per_second();
301 strip->
sound->
offset_time = (double(frame_offset) / scene->frames_per_second()) -
312 if (!sound_loaded && !
load_data->allow_invalid_file) {
324 strip->
sound = sound;
332 strip->
len = std::max(
341 if (strip->
sound !=
nullptr) {
408 bool is_multiview_loaded =
false;
417 const char *ext =
nullptr;
422 if (prefix[0] !=
'\0') {
423 for (
i = 0;
i < totfiles;
i++) {
436 is_multiview_loaded =
true;
440 if (is_multiview_loaded ==
false) {
446 if (anim_arr[0] ==
nullptr && !
load_data->allow_invalid_file) {
451 float video_fps = 0.0f;
454 if (anim_arr[0] !=
nullptr) {
459 video_fps = fps_num / fps_denom;
464 scene->
r.frs_sec = fps_num;
465 scene->
r.frs_sec_base = fps_denom;
485 for (
i = 0;
i < totfiles;
i++) {
489 sanim->
anim = anim_arr[
i];
496 if (anim_arr[0] !=
nullptr) {
505 strip, orig_width, orig_height, scene->
r.xsch, scene->
r.ysch,
load_data->fit_method);
513 strip->
len = std::max(1, strip->
len);
524 data->stripdata->orig_width = orig_width;
525 data->stripdata->orig_height = orig_height;
526 data->stripdata->orig_fps = video_fps;
540 int prev_start_frame = 0, prev_end_frame = 0;
561 switch (strip->
type) {
569 strip->
len = std::max(strip->
len, 0);
575 bool is_multiview_loaded =
false;
587 const char *ext =
nullptr;
593 if (prefix[0] !=
'\0') {
594 for (
i = 0;
i < totfiles;
i++) {
614 is_multiview_loaded =
true;
618 if (is_multiview_loaded ==
false) {
637 if ((!sanim) || (!sanim->
anim)) {
650 strip->
len = std::max(strip->
len, 0);
654 if (strip->
clip ==
nullptr) {
662 strip->
len = std::max(strip->
len, 0);
665 if (strip->
mask ==
nullptr) {
671 strip->
len = std::max(strip->
len, 0);
679 scene->frames_per_second());
682 strip->
len = std::max(strip->
len, 0);
692 strip->
len = std::max(strip->
len, 0);
707 Main *bmain,
Scene *scene,
Strip *strip,
bool *r_was_reloaded,
bool *r_can_produce_frames)
710 "This function is only implemented for movie strips.");
712 bool must_reload =
false;
734 *r_was_reloaded =
false;
735 *r_can_produce_frames =
true;
740 *r_was_reloaded =
true;
744 *r_can_produce_frames =
false;
752 *r_can_produce_frames =
false;
758 *r_can_produce_frames =
true;
MovieReader * openanim(const char *filepath, int ibuf_flags, int streamindex, bool keep_original_colorspace, char colorspace[IMA_MAX_SPACE])
void BKE_id_free(Main *bmain, void *idv)
void id_us_ensure_real(ID *id)
int BKE_mask_get_duration(struct Mask *mask)
int BKE_movieclip_get_duration(struct MovieClip *clip)
void BKE_scene_multiview_view_prefix_get(Scene *scene, const char *filepath, char *r_prefix, const char **r_ext)
float BKE_sound_get_length(struct Main *bmain, struct bSound *sound)
bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *sound_info)
struct bSound * BKE_sound_new_file(struct Main *bmain, const char *filepath)
struct SoundInfo SoundInfo
bool BKE_sound_stream_info_get(struct Main *main, const char *filepath, int stream, SoundStreamInfo *sound_info)
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
#define BLI_path_join(...)
void BLI_path_split_dir_file(const char *filepath, char *dir, size_t dir_maxncpy, char *file, size_t file_maxncpy) ATTR_NONNULL(1
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ ID_RECALC_SEQUENCER_STRIPS
#define ID_BLEND_PATH(_bmain, _id)
struct StripData StripData
@ SEQ_AUDIO_PITCH_CORRECTION
@ SEQ_SINGLE_FRAME_CONTENT
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_AUDIO_DRAW_WAVEFORM
struct StripElem StripElem
@ COLOR_ROLE_DEFAULT_BYTE
const char * IMB_colormanagement_role_colorspace_name_get(int role)
const char * IMB_colormanagement_display_get_default_view_transform_name(const ColorManagedDisplay *display)
const ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
ImBuf * IMB_load_image_from_filepath(const char *filepath, const int flags, char r_colorspace[IM_MAX_SPACE]=nullptr)
void IMB_freeImBuf(ImBuf *ibuf)
Read Guarded memory(de)allocation.
blender::ocio::Display ColorManagedDisplay
BMesh const char void * data
float4 load_data(StoredFloat4 data)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
size_t(* MEM_allocN_len)(const void *vmemh)
void MEM_freeN(void *vmemh)
double MOV_get_start_offset_seconds(const MovieReader *anim)
int MOV_get_duration_frames(MovieReader *anim, IMB_Timecode_Type tc)
bool MOV_is_initialized_and_valid(const MovieReader *anim)
int MOV_get_image_width(const MovieReader *anim)
float MOV_get_fps(const MovieReader *anim)
IDProperty * MOV_load_metadata(MovieReader *anim)
bool MOV_get_fps_num_denom(const MovieReader *anim, short &r_fps_num, float &r_fps_denom)
int MOV_get_image_height(const MovieReader *anim)
void relations_strip_free_anim(Strip *strip)
Strip * lookup_meta_by_strip(Editing *ed, const Strip *key)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
void add_movie_reload_if_needed(Main *bmain, Scene *scene, Strip *strip, bool *r_was_reloaded, bool *r_can_produce_frames)
void relations_invalidate_cache(Scene *scene, Strip *strip)
EffectHandle strip_effect_handle_get(Strip *strip)
void transform_translate_strip(Scene *evil_scene, Strip *strip, int delta)
static void strip_add_generic_update(Scene *scene, Strip *strip)
Strip * add_effect_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
void edit_strip_name_set(Scene *scene, Strip *strip, const char *new_name)
void add_image_load_file(Scene *scene, Strip *strip, size_t strip_frame, const char *filename)
void add_image_set_directory(Strip *strip, const char *dirpath)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
Strip * add_sound_strip(Main *, Scene *, ListBase *, LoadData *)
const char * strip_give_name(const Strip *strip)
void relations_invalidate_cache_raw(Scene *scene, Strip *strip)
void add_sound_av_sync(Main *, Scene *, Strip *, LoadData *)
static void strip_add_set_view_transform(Scene *scene, Strip *strip, LoadData *load_data)
float time_start_frame_get(const Strip *strip)
Strip * add_meta_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
void add_reload_new_file(Main *bmain, Scene *scene, Strip *strip, const bool lock_range)
void time_update_meta_strip_range(const Scene *scene, Strip *strip_meta)
Strip * add_scene_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
void add_image_init_alpha_mode(Main *bmain, Scene *scene, Strip *strip)
void time_handles_frame_set(const Scene *scene, Strip *strip, int left_handle_timeline_frame, int right_handle_timeline_frame)
Strip * add_image_strip(Main *bmain, Scene *scene, ListBase *seqbase, LoadData *load_data)
Strip * add_movieclip_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
void free_strip_proxy(Strip *strip)
void strip_unique_name_set(Scene *scene, ListBase *seqbasep, Strip *strip)
static void strip_add_set_name(Scene *scene, Strip *strip, LoadData *load_data)
@ SEQ_LOAD_SET_VIEW_TRANSFORM
@ SEQ_LOAD_MOVIE_SYNC_FPS
Strip * add_mask_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
void time_right_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
void seq_anim_add_suffix(Scene *scene, MovieReader *anim, const int view_id)
Strip * strip_alloc(ListBase *lb, int timeline_frame, int channel, int type)
void strip_lookup_invalidate(const Editing *ed)
Strip * add_movie_strip(Main *bmain, Scene *scene, ListBase *seqbase, LoadData *load_data)
int seq_num_files(Scene *scene, char views_format, const bool is_multiview)
void add_load_data_init(LoadData *load_data, const char *name, const char *path, const int start_frame, const int channel)
void set_scale_to_fit(const Strip *strip, const int image_width, const int image_height, const int preview_width, const int preview_height, const eSeqImageFitMethod fit_method)
StripElem * render_give_stripelem(const Scene *scene, const Strip *strip, int timeline_frame)
void strip_time_effect_range_set(const Scene *scene, Strip *strip)
int effect_get_num_inputs(int strip_type)
void seq_multiview_name(Scene *scene, const int view_id, const char *prefix, const char *ext, char *r_path, size_t r_size)
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings
struct SoundInfo::@351331251115247062377132230300211145252373324171 specs
struct MovieReader * anim
ColorManagedColorspaceSettings colorspace_settings
struct Stereo3dFormat * stereo3d_format
float media_playback_rate
void(* init)(Strip *strip)