mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
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:
@@ -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 ------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user