Blender  V3.3
Macros | Functions
anim_movie.c File Reference
#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 ImBufmovie_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 IDPropertyIMB_anim_load_metadata (struct anim *anim)
 
struct animIMB_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 ImBufIMB_anim_previewframe (struct anim *anim)
 
struct ImBufIMB_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)
 

Macro Definition Documentation

◆ PATHSEPARATOR

#define PATHSEPARATOR   '/'

Definition at line 97 of file anim_movie.c.

Function Documentation

◆ an_stringdec()

static int an_stringdec ( const char *  string,
char *  head,
char *  tail,
unsigned short *  numlen 
)
static

Definition at line 100 of file anim_movie.c.

References len, and PATHSEPARATOR.

Referenced by IMB_anim_absolute().

◆ an_stringenc()

static void an_stringenc ( char *  string,
const char *  head,
const char *  tail,
unsigned short  numlen,
int  pic 
)
static

Definition at line 142 of file anim_movie.c.

References BLI_path_sequence_encode().

Referenced by IMB_anim_absolute().

◆ anim_getnew()

static bool anim_getnew ( struct anim anim)
static

◆ free_anim_movie()

static void free_anim_movie ( struct anim UNUSEDanim)
static

Definition at line 89 of file anim_movie.c.

Referenced by anim_getnew(), and IMB_free_anim().

◆ IMB_anim_absolute()

struct ImBuf* IMB_anim_absolute ( struct anim anim,
int  position,
IMB_Timecode_Type  tc,
IMB_Proxy_Size  preview_size 
)

◆ IMB_anim_can_produce_frames()

bool IMB_anim_can_produce_frames ( const struct anim anim)

Definition at line 295 of file anim_movie.c.

References anim::avi, NULL, and UNUSED_VARS.

Referenced by SEQ_add_movie_reload_if_needed().

◆ IMB_anim_get_duration()

int IMB_anim_get_duration ( struct anim anim,
IMB_Timecode_Type  tc 
)

◆ IMB_anim_get_fps()

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().

◆ IMB_anim_get_image_height()

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().

◆ IMB_anim_get_image_width()

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().

◆ IMB_anim_load_metadata()

struct IDProperty* IMB_anim_load_metadata ( struct anim anim)

◆ IMB_anim_previewframe()

struct ImBuf* IMB_anim_previewframe ( struct anim anim)
Attention
Defined in anim_movie.c fetches a define preview-frame, usually half way into the movie.

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().

◆ IMB_close_anim()

void IMB_close_anim ( struct anim anim)

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().

◆ IMB_close_anim_proxies()

void IMB_close_anim_proxies ( struct anim anim)

Definition at line 224 of file anim_movie.c.

References IMB_free_indices(), and NULL.

Referenced by proxy_endjob(), and SEQ_proxy_rebuild_finish().

◆ IMB_free_anim()

void IMB_free_anim ( struct anim anim)

◆ IMB_open_anim()

struct anim* IMB_open_anim ( const char *  name,
int  ib_flags,
int  streamindex,
char  colorspace[IM_MAX_SPACE] 
)

◆ IMB_suffix_anim()

void IMB_suffix_anim ( struct anim anim,
const char *  suffix 
)

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().

◆ IMD_anim_get_offset()

double IMD_anim_get_offset ( struct anim anim)

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().

◆ ismovie()

int ismovie ( const char *  UNUSEDfilepath)

Definition at line 75 of file anim_movie.c.

◆ movie_fetchibuf()

static ImBuf* movie_fetchibuf ( struct anim UNUSEDanim,
int   UNUSEDposition 
)
static

Definition at line 85 of file anim_movie.c.

References NULL.

Referenced by IMB_anim_absolute().

◆ startmovie()

static int startmovie ( struct anim UNUSEDanim)
static

Definition at line 81 of file anim_movie.c.

Referenced by anim_getnew().