Another round of tweaks for spandsp. There should be no functional changes,

although quite a few things have changed in the test suite
This commit is contained in:
Steve Underwood
2011-07-02 21:16:52 +08:00
parent d30e82e226
commit 4a7bbf4ec6
77 changed files with 966 additions and 357 deletions
+21 -3
View File
@@ -40,7 +40,7 @@
#include "spandsp-sim.h"
#include "fax_utils.h"
void log_tx_parameters(t30_state_t *s, const char *tag)
void fax_log_tx_parameters(t30_state_t *s, const char *tag)
{
const char *u;
@@ -59,7 +59,7 @@ void log_tx_parameters(t30_state_t *s, const char *tag)
}
/*- End of function --------------------------------------------------------*/
void log_rx_parameters(t30_state_t *s, const char *tag)
void fax_log_rx_parameters(t30_state_t *s, const char *tag)
{
const char *u;
@@ -84,7 +84,7 @@ void log_rx_parameters(t30_state_t *s, const char *tag)
}
/*- End of function --------------------------------------------------------*/
void log_transfer_statistics(t30_state_t *s, const char *tag)
void fax_log_transfer_statistics(t30_state_t *s, const char *tag)
{
t30_stats_t t;
@@ -105,4 +105,22 @@ void log_transfer_statistics(t30_state_t *s, const char *tag)
#endif
}
/*- End of function --------------------------------------------------------*/
int get_tiff_total_pages(const char *file)
{
TIFF *tiff_file;
int max;
if ((tiff_file = TIFFOpen(file, "r")) == NULL)
return -1;
/* Each page *should* contain the total number of pages, but can this be
trusted? Some files say 0. Actually searching for the last page is
more reliable. */
max = 0;
while (TIFFSetDirectory(tiff_file, (tdir_t) max))
max++;
TIFFClose(tiff_file);
return max;
}
/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/