Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/anim_movie.c
| Show First 20 Lines • Show All 1,422 Lines • ▼ Show 20 Lines | int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc) | ||||
| idx = IMB_anim_open_index(anim, tc); | idx = IMB_anim_open_index(anim, tc); | ||||
| if (!idx) { | if (!idx) { | ||||
| return anim->duration_in_frames; | return anim->duration_in_frames; | ||||
| } | } | ||||
| return IMB_indexer_get_duration(idx); | return IMB_indexer_get_duration(idx); | ||||
| } | } | ||||
| int IMB_anim_get_width(struct anim *anim) | |||||
| { | |||||
| return anim->x; | |||||
| } | |||||
| int IMB_anim_get_height(struct anim *anim) | |||||
| { | |||||
| return anim->y; | |||||
| } | |||||
| bool IMB_anim_get_fps(struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base) | bool IMB_anim_get_fps(struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base) | ||||
| { | { | ||||
| double frs_sec_base_double; | double frs_sec_base_double; | ||||
| if (anim->frs_sec) { | if (anim->frs_sec) { | ||||
| if (anim->frs_sec > SHRT_MAX) { | if (anim->frs_sec > SHRT_MAX) { | ||||
| /* We cannot store original rational in our short/float format, | /* We cannot store original rational in our short/float format, | ||||
| * we need to approximate it as best as we can... */ | * we need to approximate it as best as we can... */ | ||||
| *frs_sec = SHRT_MAX; | *frs_sec = SHRT_MAX; | ||||
| Show All 34 Lines | |||||