Esempio n. 1
0
int IMB_isanim(const char *filename)
{
	int type;
	
	if(U.uiflag & USER_FILTERFILEEXTS) {
		if (G.have_quicktime){
			if(		BLI_testextensie(filename, ".avi")
				||	BLI_testextensie(filename, ".flc")
				||	BLI_testextensie(filename, ".dv")
				||	BLI_testextensie(filename, ".r3d")
				||	BLI_testextensie(filename, ".mov")
				||	BLI_testextensie(filename, ".movie")
				||	BLI_testextensie(filename, ".mv")) {
				type = imb_get_anim_type(filename);
			} else {
				return(FALSE);			
			}
		} else { // no quicktime
			if(		BLI_testextensie(filename, ".avi")
				||	BLI_testextensie(filename, ".dv")
				||	BLI_testextensie(filename, ".r3d")
				||	BLI_testextensie(filename, ".mv")) {
				type = imb_get_anim_type(filename);
			}
			else  {
				return(FALSE);
			}
		}
	} else { // no FILTERFILEEXTS
		type = imb_get_anim_type(filename);
	}
	
	return (type && type!=ANIM_SEQUENCE);
}
Esempio n. 2
0
int IMB_isanim(const char *filename)
{
	int type;
	
	if (U.uiflag & USER_FILTERFILEEXTS) {
		if (G.have_quicktime) {
			if (BLI_testextensie_array(filename, imb_ext_movie_qt)) {	
				type = imb_get_anim_type(filename);
			}
			else {
				return(FALSE);
			}
		}
		else { /* no quicktime */
			if (BLI_testextensie_array(filename, imb_ext_movie)) {
				type = imb_get_anim_type(filename);
			}
			else {
				return(FALSE);
			}
		}
	}
	else { /* no FILTERFILEEXTS */
		type = imb_get_anim_type(filename);
	}
	
	return (type && type != ANIM_SEQUENCE);
}
Esempio n. 3
0
bool IMB_isanim(const char *filename)
{
	int type;

	type = imb_get_anim_type(filename);
	
	return (type && type != ANIM_SEQUENCE);
}
Esempio n. 4
0
static ImBuf *anim_getnew(struct anim *anim)
{
    struct ImBuf *ibuf = NULL;

    if (anim == NULL) return(NULL);

    free_anim_movie(anim);

#ifdef WITH_AVI
    free_anim_avi(anim);
#endif

#ifdef WITH_QUICKTIME
    free_anim_quicktime(anim);
#endif
#ifdef WITH_FFMPEG
    free_anim_ffmpeg(anim);
#endif

    if (anim->curtype != 0) return (NULL);
    anim->curtype = imb_get_anim_type(anim->name);

    switch (anim->curtype) {
    case ANIM_SEQUENCE:
        ibuf = IMB_loadiffname(anim->name, anim->ib_flags, anim->colorspace);
        if (ibuf) {
            BLI_strncpy(anim->first, anim->name, sizeof(anim->first));
            anim->duration = 1;
        }
        break;
    case ANIM_MOVIE:
        if (startmovie(anim)) return (NULL);
        ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0); /* fake */
        break;
#ifdef WITH_AVI
    case ANIM_AVI:
        if (startavi(anim)) {
            printf("couldnt start avi\n");
            return (NULL);
        }
        ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
        break;
#endif
#ifdef WITH_QUICKTIME
    case ANIM_QTIME:
        if (startquicktime(anim)) return (0);
        ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
        break;
#endif
#ifdef WITH_FFMPEG
    case ANIM_FFMPEG:
        if (startffmpeg(anim)) return (0);
        ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
        break;
#endif
    }
    return(ibuf);
}