Blender V2.61 - r43446
|
#include <sys/types.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <dirent.h>
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BKE_global.h"
#include "BKE_depsgraph.h"
#include "imbuf.h"
#include "AVI_avi.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_allocimbuf.h"
#include "IMB_anim.h"
#include "IMB_indexer.h"
Go to the source code of this file.
Defines | |
#define | PATHSEPERATOR '/' |
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) |
static void | free_anim_avi (struct anim *anim) |
void | IMB_free_anim (struct anim *anim) |
void | IMB_close_anim (struct anim *anim) |
struct anim * | IMB_open_anim (const char *name, int ib_flags, int streamindex) |
static int | startavi (struct anim *anim) |
static ImBuf * | avi_fetchibuf (struct anim *anim, int position) |
static struct ImBuf * | 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) |
int | IMB_anim_get_fps (struct anim *anim, short *frs_sec, float *frs_sec_base) |
void | IMB_anim_set_preseek (struct anim *anim, int preseek) |
int | IMB_anim_get_preseek (struct anim *anim) |
Definition in file anim_movie.c.
#define PATHSEPERATOR '/' |
Definition at line 127 of file anim_movie.c.
Referenced by an_stringdec().
static int an_stringdec | ( | const char * | string, |
char * | head, | ||
char * | tail, | ||
unsigned short * | numlen | ||
) | [static] |
Definition at line 130 of file anim_movie.c.
References FALSE, i, len(), PATHSEPERATOR, strlen(), and TRUE.
Referenced by IMB_anim_absolute().
static void an_stringenc | ( | char * | string, |
const char * | head, | ||
const char * | tail, | ||
unsigned short | numlen, | ||
int | pic | ||
) | [static] |
Definition at line 166 of file anim_movie.c.
References BLI_stringenc().
Referenced by IMB_anim_absolute().
Definition at line 1129 of file anim_movie.c.
References ANIM_AVI, ANIM_FFMPEG, ANIM_MOVIE, ANIM_QTIME, ANIM_REDCODE, ANIM_SEQUENCE, BLI_strncpy(), anim::curtype, anim::duration, anim::first, free_anim_avi(), free_anim_movie(), free_anim_quicktime(), anim::ib_flags, IMB_allocImBuf(), imb_get_anim_type(), IMB_loadiffname(), anim::name, NULL, startavi(), startmovie(), startquicktime(), anim::x, and anim::y.
Referenced by IMB_anim_absolute().
Definition at line 366 of file anim_movie.c.
References av_dump_format, av_get_pts_from_frame(), AV_PKT_FLAG_KEY, avcodec_decode_video2(), anim::avi, AVI_FORMAT_RGB32, AVI_get_stream(), AVI_read_frame(), AVIST_VIDEO, AVMEDIA_TYPE_VIDEO, B_ENDIAN, BLI_strcasecmp(), BLI_strncasecmp(), anim::curposition, anim::duration, ENDIAN_ORDER, FALSE, anim::framesize, anim::frs_sec, anim::frs_sec_base, i, IB_animdeinterlace, anim::ib_flags, IB_PROFILE_SRGB, IB_rect, IB_rectfloat, IMB_allocImBuf(), IMB_anim_open_index(), IMB_filtery(), IMB_freeImBuf(), IMB_ibImageFromMemory(), IMB_indexer_can_scan(), IMB_indexer_get_frame_index(), IMB_indexer_get_pts(), IMB_indexer_get_seek_pos(), IMB_indexer_get_seek_pos_dts(), IMB_refImBuf(), IMB_TC_NONE, anim::interlacing, len(), MAX2, MEM_callocN(), MEM_freeN(), anim::name, names, NULL, anim::orientation, p, anim::params, anim::preseek, ImBuf::profile, ImBuf::rect, ImBuf::rect_float, anim::streamindex, strlen(), table, TRUE, simple_enum_gen::w, ImBuf::x, anim::x, ImBuf::y, and anim::y.
Referenced by IMB_anim_absolute().
static void free_anim_avi | ( | struct anim * | anim | ) | [static] |
Definition at line 171 of file anim_movie.c.
References anim::avi, AVI_close(), anim::duration, i, MEM_freeN(), and NULL.
Referenced by anim_getnew(), IMB_free_anim(), and startavi().
static void free_anim_movie | ( | struct anim * | UNUSEDanim | ) | [static] |
Definition at line 121 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 | ||
) | [read] |
Definition at line 1207 of file anim_movie.c.
References an_stringdec(), an_stringenc(), ANIM_AVI, ANIM_FFMPEG, anim_getnew(), ANIM_MOVIE, ANIM_QTIME, ANIM_REDCODE, ANIM_SEQUENCE, avi_fetchibuf(), BLI_snprintf(), anim::curposition, anim::curtype, anim::duration, anim::first, IB_animdeinterlace, anim::ib_flags, IB_PROFILE_SRGB, IB_rect, IMB_anim_absolute(), IMB_anim_index_get_frame_index(), IMB_anim_open_proxy(), IMB_convert_rgba_to_abgr(), IMB_filtery(), IMB_freeImBuf(), IMB_loadiffname(), IMB_PROXY_NONE, IMB_TC_NONE, movie_fetchibuf(), ImBuf::name, anim::name, NULL, ImBuf::profile, and qtime_fetchibuf().
Referenced by image_load_movie_file(), IMB_anim_absolute(), IMB_anim_previewframe(), IMB_thumb_create(), index_rebuild_fallback(), movieclip_load_movie_file(), openanim(), seq_proxy_fetch(), and seq_render_strip().
int IMB_anim_get_duration | ( | struct anim * | anim, |
IMB_Timecode_Type | tc | ||
) |
Return the length (in frames) of the given anim.
Definition at line 1300 of file anim_movie.c.
References anim::duration, IMB_anim_open_index(), IMB_indexer_get_duration(), and IMB_TC_NONE.
Referenced by image_info(), image_load_movie_file(), index_rebuild_fallback(), movieclip_load_movie_file(), proxy_startjob(), reload_sequence_new_file(), sequencer_add_movie_strip(), and set_frames_cb().
int IMB_anim_get_fps | ( | struct anim * | anim, |
short * | frs_sec, | ||
float * | frs_sec_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 1315 of file anim_movie.c.
References FALSE, anim::frs_sec, anim::frs_sec_base, and TRUE.
Referenced by alloc_proxy_output_avi().
int IMB_anim_get_preseek | ( | struct anim * | anim | ) |
Definition at line 1331 of file anim_movie.c.
References anim::preseek.
Referenced by reload_sequence_new_file(), and sequencer_add_movie_strip().
Definition at line 1192 of file anim_movie.c.
References anim::duration, IMB_anim_absolute(), IMB_freeImBuf(), IMB_PROXY_NONE, IMB_TC_NONE, and NULL.
Referenced by IMB_thumb_create().
void IMB_anim_set_preseek | ( | struct anim * | anim, |
int | preseek | ||
) |
Definition at line 1326 of file anim_movie.c.
References anim::preseek.
Referenced by seq_render_strip().
void IMB_close_anim | ( | struct anim * | anim | ) |
Definition at line 237 of file anim_movie.c.
References IMB_free_anim(), and NULL.
Referenced by IMB_free_indices().
void IMB_free_anim | ( | struct anim * | anim | ) |
Definition at line 213 of file anim_movie.c.
References free_anim_avi(), free_anim_movie(), free_anim_quicktime(), IMB_free_indices(), MEM_freeN(), and NULL.
Referenced by free_anim_seq(), free_buffers(), free_proxy_seq(), image_free_buffers(), IMB_close_anim(), IMB_thumb_create(), openanim(), reload_sequence_new_file(), seq_free_sequence(), and seq_free_strip().
struct anim* IMB_open_anim | ( | const char * | name, |
int | ib_flags, | ||
int | streamindex | ||
) | [read] |
Definition at line 245 of file anim_movie.c.
References BLI_strncpy(), anim::ib_flags, MEM_callocN(), anim::name, NULL, and anim::streamindex.
Referenced by IMB_anim_open_proxy(), IMB_thumb_create(), and openanim().
int ismovie | ( | const char * | UNUSEDfilepath | ) |
Definition at line 113 of file anim_movie.c.
static int startavi | ( | struct anim * | anim | ) | [static] |
Definition at line 259 of file anim_movie.c.
References anim::avi, AVI_ERROR_COMPRESSION, AVI_ERROR_FORMAT, AVI_ERROR_NONE, AVI_open_movie(), AVI_print_error(), BYTE, anim::curposition, anim::duration, anim::framesize, free_anim_avi(), _AviMovie::header, _AviMainHeader::Height, HRESULT, i, anim::interlacing, L, LONG, MAXNUMSTREAMS, MEM_callocN(), anim::name, NULL, anim::orientation, anim::params, anim::preseek, anim::streamindex, _AviMainHeader::TotalFrames, _AviMainHeader::Width, anim::x, and anim::y.
Referenced by anim_getnew().
static int startmovie | ( | struct anim * | UNUSEDanim | ) | [static] |
Definition at line 119 of file anim_movie.c.
Referenced by anim_getnew().