added a setter, wtf ?
This commit is contained in:
@@ -79,7 +79,7 @@ return 0;
|
||||
/* -------------------------------------------------------------- */
|
||||
/* called by 'fonderie.c'
|
||||
*/
|
||||
int export_fifo(char *fname, int step)
|
||||
int export_fifo(char *fname, int notused)
|
||||
{
|
||||
int foo, type;
|
||||
|
||||
@@ -136,13 +136,18 @@ if (verbosity > 2) fprintf(stderr, "%s : next slot %d\n",
|
||||
return 0;
|
||||
}
|
||||
/* -------------------------------------------------------------- */
|
||||
int create_fifo(int nbslot, int w, int h, int t)
|
||||
/*
|
||||
* this function must have a lot of new parameters,
|
||||
* -- filetype of exported pictures...
|
||||
*/
|
||||
|
||||
int create_fifo(int nbslot, int w, int h, int imgtype)
|
||||
{
|
||||
int foo, idx;
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, ">>> %s ( %d %dx%d %d )\n", __func__,
|
||||
nbslot, w, h, t);
|
||||
nbslot, w, h, imgtype);
|
||||
#endif
|
||||
|
||||
memset(&g_fifo, 0, sizeof(A_Fifo));
|
||||
@@ -152,17 +157,32 @@ g_fifo.nbslots = nbslot;
|
||||
g_fifo.slots = calloc(nbslot, sizeof(FloatImg));
|
||||
if (NULL==g_fifo.slots) abort();
|
||||
for (idx=0; idx<nbslot; idx++) {
|
||||
foo = fimg_create(&g_fifo.slots[idx], w, h, t);
|
||||
foo = fimg_create(&g_fifo.slots[idx], w, h, imgtype);
|
||||
if (foo) {
|
||||
fprintf(stderr, "%s idx %d err%d\n", __func__, idx, foo);
|
||||
return foo;
|
||||
}
|
||||
fimg_clear(&g_fifo.slots[idx]);
|
||||
}
|
||||
foo = fimg_create(&g_fifo.total, w, h, t);
|
||||
foo = fimg_create(&g_fifo.total, w, h, imgtype);
|
||||
g_fifo.next = 0;
|
||||
g_fifo.magic = MAGIC_FIFO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* -------------------------------------------------------------- */
|
||||
/*
|
||||
* omfg ! I've write a setter !
|
||||
*/
|
||||
int set_fifo_output_format(int filetype)
|
||||
{
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, ">>> %s ( %d )\n", __func__, filetype);
|
||||
#endif
|
||||
|
||||
g_fifo.export_type = filetype;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user