Blender
V3.3
|
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <dirent.h>
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h"
#include "IMB_anim.h"
#include "IMB_indexer.h"
#include "IMB_metadata.h"
Go to the source code of this file.
Macros | |
#define | PATHSEPARATOR '/' |
Functions | |
int | ismovie (const char *UNUSED(filepath)) |
static int | startmovie (struct anim *UNUSED(anim)) |
static ImBuf * | movie_fetchibuf (struct anim *UNUSED(anim), int UNUSED(position)) |
static void | free_anim_movie (struct anim *UNUSED(anim)) |
static int | an_stringdec (const char *string, char *head, char *tail, unsigned short *numlen) |
static void | an_stringenc (char *string, const char *head, const char *tail, unsigned short numlen, int pic) |
void | IMB_free_anim (struct anim *anim) |
void | IMB_close_anim (struct anim *anim) |
void | IMB_close_anim_proxies (struct anim *anim) |
struct IDProperty * | IMB_anim_load_metadata (struct anim *anim) |
struct anim * | IMB_open_anim (const char *name, int ib_flags, int streamindex, char colorspace[IM_MAX_SPACE]) |
bool | IMB_anim_can_produce_frames (const struct anim *anim) |
void | IMB_suffix_anim (struct anim *anim, const char *suffix) |
static bool | anim_getnew (struct anim *anim) |
struct ImBuf * | IMB_anim_previewframe (struct anim *anim) |
struct ImBuf * | IMB_anim_absolute (struct anim *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size) |
int | IMB_anim_get_duration (struct anim *anim, IMB_Timecode_Type tc) |
double | IMD_anim_get_offset (struct anim *anim) |
bool | IMB_anim_get_fps (struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base) |
int | IMB_anim_get_image_width (struct anim *anim) |
int | IMB_anim_get_image_height (struct anim *anim) |
#define PATHSEPARATOR '/' |
Definition at line 97 of file anim_movie.c.
|
static |
Definition at line 100 of file anim_movie.c.
References len, and PATHSEPARATOR.
Referenced by IMB_anim_absolute().
|
static |
Definition at line 142 of file anim_movie.c.
References BLI_path_sequence_encode().
Referenced by IMB_anim_absolute().
Try to initialize the anim struct. Returns true on success.
Definition at line 1500 of file anim_movie.c.
References ANIM_AVI, ANIM_FFMPEG, ANIM_MOVIE, ANIM_NONE, ANIM_SEQUENCE, BLI_assert, BLI_strncpy(), anim::colorspace, anim::curtype, anim::duration_in_frames, anim::first, free_anim_movie(), anim::ib_flags, IMB_freeImBuf(), imb_get_anim_type(), IMB_loadiffname(), anim::name, NULL, and startmovie().
Referenced by IMB_anim_absolute().
Definition at line 89 of file anim_movie.c.
Referenced by anim_getnew(), and IMB_free_anim().
struct ImBuf* IMB_anim_absolute | ( | struct anim * | anim, |
int | position, | ||
IMB_Timecode_Type | tc, | ||
IMB_Proxy_Size | preview_size | ||
) |
Definition at line 1571 of file anim_movie.c.
References an_stringdec(), an_stringenc(), ANIM_AVI, ANIM_FFMPEG, anim_getnew(), ANIM_MOVIE, ANIM_NONE, ANIM_SEQUENCE, BLI_snprintf(), anim::colorspace, anim::cur_position, anim::curtype, anim::duration_in_frames, anim::first, IB_animdeinterlace, anim::ib_flags, IB_rect, IMB_anim_absolute(), IMB_anim_index_get_frame_index(), IMB_anim_open_proxy(), IMB_convert_rgba_to_abgr(), IMB_filtery(), IMB_loadiffname(), IMB_PROXY_NONE, IMB_TC_NONE, movie_fetchibuf(), anim::name, ImBuf::name, and NULL.
Referenced by build_pict_list_ex(), ibuf_from_picture(), IMB_anim_absolute(), IMB_anim_previewframe(), load_movie_single(), movieclip_load_movie_file(), openanim(), seq_proxy_fetch(), seq_render_movie_strip_custom_file_proxy(), seq_render_movie_strip_view(), thumb_create_ex(), and wm_main_playanim_intern().
Definition at line 295 of file anim_movie.c.
References anim::avi, NULL, and UNUSED_VARS.
Referenced by SEQ_add_movie_reload_if_needed().
int IMB_anim_get_duration | ( | struct anim * | anim, |
IMB_Timecode_Type | tc | ||
) |
Return the length (in frames) of the given anim.
Definition at line 1658 of file anim_movie.c.
References anim::duration_in_frames, IMB_anim_open_index(), IMB_indexer_get_duration(), and IMB_TC_NONE.
Referenced by build_pict_list_ex(), image_match_len_exec(), load_movie_single(), movieclip_calc_length(), prefetch_data_fn(), SEQ_add_movie_strip(), SEQ_add_reload_new_file(), and uiTemplateImageInfo().
bool IMB_anim_get_fps | ( | struct anim * | anim, |
short * | frs_sec, | ||
float * | frs_sec_base, | ||
bool | no_av_base | ||
) |
Return the fps contained in movie files (function rval is false, and frs_sec and frs_sec_base untouched if none available!)
Definition at line 1678 of file anim_movie.c.
References BLI_assert, double(), float(), anim::frs_sec, anim::frs_sec_base, and UNUSED_VARS.
Referenced by BKE_movieclip_get_fps(), prefetch_data_fn(), SEQ_add_movie_strip(), seq_render_movie_strip(), SEQ_time_sequence_get_fps(), uiTemplateMovieclipInformation(), and wm_main_playanim_intern().
int IMB_anim_get_image_height | ( | struct anim * | anim | ) |
Definition at line 1716 of file anim_movie.c.
References anim::y.
Referenced by SEQ_add_movie_strip().
int IMB_anim_get_image_width | ( | struct anim * | anim | ) |
Definition at line 1711 of file anim_movie.c.
References anim::x.
Referenced by SEQ_add_movie_strip().
struct IDProperty* IMB_anim_load_metadata | ( | struct anim * | anim | ) |
Definition at line 233 of file anim_movie.c.
References ANIM_AVI, ANIM_FFMPEG, ANIM_MOVIE, ANIM_NONE, ANIM_SEQUENCE, BLI_assert, anim::curtype, IMB_metadata_ensure(), IMB_metadata_set_field(), anim::metadata, and NULL.
Referenced by SEQ_add_movie_strip(), and SEQ_add_reload_new_file().
Definition at line 1557 of file anim_movie.c.
References anim::duration_in_frames, IMB_anim_absolute(), IMB_freeImBuf(), IMB_PROXY_NONE, IMB_TC_NONE, and NULL.
Referenced by thumb_create_ex().
Definition at line 215 of file anim_movie.c.
References IMB_free_anim(), and NULL.
Referenced by IMB_free_indices(), and wm_main_playanim_intern().
Definition at line 224 of file anim_movie.c.
References IMB_free_indices(), and NULL.
Referenced by proxy_endjob(), and SEQ_proxy_rebuild_finish().
Definition at line 193 of file anim_movie.c.
References free_anim_movie(), IMB_free_indices(), IMB_metadata_free(), MEM_freeN, anim::metadata, and NULL.
Referenced by free_buffers(), free_proxy_seq(), image_free_anims(), IMB_close_anim(), openanim(), prefetch_data_fn(), seq_free_strip(), SEQ_relations_sequence_free_anim(), and thumb_create_ex().
struct anim* IMB_open_anim | ( | const char * | name, |
int | ib_flags, | ||
int | streamindex, | ||
char | colorspace[IM_MAX_SPACE] | ||
) |
Definition at line 268 of file anim_movie.c.
References BLI_assert, BLI_path_is_rel(), BLI_strncpy(), COLOR_ROLE_DEFAULT_BYTE, anim::colorspace, colorspace_set_default_role(), anim::ib_flags, IM_MAX_SPACE, MEM_callocN, anim::name, NULL, and anim::streamindex.
Referenced by build_pict_list_ex(), IMB_anim_open_proxy(), openanim(), openanim_noload(), thumb_create_ex(), and wm_main_playanim_intern().
Definition at line 314 of file anim_movie.c.
References BLI_strncpy(), and anim::suffix.
Referenced by seq_anim_add_suffix(), and seq_open_anim_file().
Return the encoded start offset (in seconds) of the given anim.
Definition at line 1673 of file anim_movie.c.
References anim::start_offset.
Referenced by SEQ_add_movie_strip().
int ismovie | ( | const char * | UNUSEDfilepath | ) |
Definition at line 75 of file anim_movie.c.
|
static |
Definition at line 81 of file anim_movie.c.
Referenced by anim_getnew().