aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <sergi_ll@users.sourceforge.net>2009-07-16 21:27:11 +0000
committerN.N. <sergi_ll@users.sourceforge.net>2009-07-16 21:27:11 +0000
commit0c8506b03480f79c60fbe93d4f14d042f171122d (patch)
treeb317aa9c5531ecdea504b5f295dbf9faf586034c
parent4207118e4b1f43b4789431bffe3549ddb042add5 (diff)
format list running
svn path=/trunk/externals/pdvjtools/; revision=11871
-rw-r--r--videogrid/videogrid.cc50
1 files changed, 28 insertions, 22 deletions
diff --git a/videogrid/videogrid.cc b/videogrid/videogrid.cc
index c927676..1637611 100644
--- a/videogrid/videogrid.cc
+++ b/videogrid/videogrid.cc
@@ -1,4 +1,3 @@
-
extern "C"
{
/*
@@ -681,14 +680,16 @@ extern "C"
/* FFMPEG o Quicktime per les conversions */
int fferror=0;
int nN = x->x_ultima_img;
+ /*
if (format_adequat_v(entrada, x->x_format_list) == 0) {
- /* ara no entra: format_adequat_v = 0 sempre */
- /* convertir_img(entrada,FORMAT_MINIATURA, x->x_w_cell, x->x_h_cell, nN); */
- fferror = 0;
+
+ // convertir_img(entrada,FORMAT_MINIATURA, x->x_w_cell, x->x_h_cell, nN);
+ fferror = -1;
} else {
- fferror=convertir_img_ff(entrada,FORMAT_MINIATURA, x->x_w_cell, x->x_h_cell, nN);
- }
+ */
+ fferror=convertir_img_ff(entrada,FORMAT_MINIATURA, x->x_w_cell, x->x_h_cell, nN);
+ /* } */
/* post ("%d",fferror); */
if (fferror>=0) {
/* encua el nou node */
@@ -767,7 +768,6 @@ extern "C"
strcat(ig_path,".");
strcat(ig_path,FORMAT_MINIATURA);
/* post("reestablint la imatge %s", actual->pathFitxer); */
- // videogrid_afegir_imatge(x,actual->pathFitxer);
convertir_img_ff(actual->pathFitxer,FORMAT_MINIATURA, x->x_w_cell, x->x_h_cell, nN);
sys_vgui("image create photo img%x%d -file %s\n",x,nN,ig_path);
sys_vgui(".x%x.c create image %d %d -image img%x%d -tags %xS%d\n",
@@ -1213,7 +1213,9 @@ extern "C"
post("Videogrid: Problem opening file %s.\n",e);
}
else {
- videogrid_afegir_imatge(x,e);
+ if (format_adequat_v(e, x->x_format_list) != 0) {
+ videogrid_afegir_imatge(x,e);
+ }
}
}
@@ -1254,13 +1256,15 @@ extern "C"
strcpy(pathActual,x->x_dir_actual);
strcat(pathActual,"/");
strcat(pathActual,nomImatge);
- pthread_mutex_lock(&x->x_lock);
- videogrid_afegir_imatge(x, pathActual);
- pthread_mutex_unlock(&x->x_lock);
- /* incrementa en 1 per indicar el nombre de nodes encuats per aquest directori */
- numEncuats++;
- /* es desa la posició en el directori de l'últim node encuat */
- x->x_dir_pos = numPosDir;
+ if (format_adequat_v(pathActual, x->x_format_list) != 0) {
+ pthread_mutex_lock(&x->x_lock);
+ videogrid_afegir_imatge(x, pathActual);
+ pthread_mutex_unlock(&x->x_lock);
+ /* incrementa en 1 per indicar el nombre de nodes encuats per aquest directori */
+ numEncuats++;
+ }
+ /* es desa la posició en el directori de l'últim node encuat */
+ x->x_dir_pos = numPosDir;
}
}
}
@@ -1281,13 +1285,15 @@ extern "C"
strcpy(pathActual,x->x_dir_actual);
strcat(pathActual,"/");
strcat(pathActual,nomImatge);
- pthread_mutex_lock(&x->x_lock);
- videogrid_afegir_imatge(x, pathActual);
- pthread_mutex_unlock(&x->x_lock);
- /* incrementa en 1 per indicar el nombre de nodes encuats per aquest directori */
- numEncuats++;
- /* es desa la posició en el directori de l'últim node encuat */
- x->x_dir_pos = numPosDir;
+ if (format_adequat_v(pathActual, x->x_format_list) != 0) {
+ pthread_mutex_lock(&x->x_lock);
+ videogrid_afegir_imatge(x, pathActual);
+ pthread_mutex_unlock(&x->x_lock);
+ /* incrementa en 1 per indicar el nombre de nodes encuats per aquest directori */
+ numEncuats++;
+ }
+ /* es desa la posició en el directori de l'últim node encuat */
+ x->x_dir_pos = numPosDir;
}
}
}