Support for newer versions of spandsp with separate RX and TX pages stats.
git-svn-id: http://voip.null.ro/svn/yate@2864 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
41923043b4
commit
c9b481c5ba
29
configure.in
29
configure.in
|
@ -683,6 +683,34 @@ AC_TRY_COMPILE([
|
|||
#include <spandsp.h>
|
||||
],[
|
||||
fax_state_t fax_state;
|
||||
t30_stats_t fax_stats;
|
||||
t38_terminal_state_t t38_t_state;
|
||||
t38_gateway_state_t t38_g_state;
|
||||
fax_stats.pages_tx = fax_stats.pages_rx = 0;
|
||||
fax_init(&fax_state,TRUE);
|
||||
t30_set_ecm_capability(fax_get_t30_state(&fax_state),1);
|
||||
t30_set_supported_compressions(fax_get_t30_state(&fax_state),T30_SUPPORT_T6_COMPRESSION);
|
||||
t30_set_tx_file(fax_get_t30_state(&fax_state),"abc",-1,-1);
|
||||
t30_set_tx_ident(fax_get_t30_state(&fax_state),"xyz");
|
||||
fax_set_transmit_on_idle(&fax_state,1);
|
||||
t38_terminal_init(&t38_t_state,TRUE,NULL,NULL);
|
||||
t38_gateway_init(&t38_g_state,NULL,NULL);
|
||||
],
|
||||
HAVE_SPANDSP="yes"
|
||||
)
|
||||
if [[ "x$HAVE_SPANDSP" = "xyes" ]]; then
|
||||
SPANDSP_INC="-I$ac_cv_use_spandsp -DSPANDSP_TXRXSTATS"
|
||||
else
|
||||
AC_TRY_COMPILE([
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <spandsp.h>
|
||||
],[
|
||||
fax_state_t fax_state;
|
||||
t38_terminal_state_t t38_t_state;
|
||||
t38_gateway_state_t t38_g_state;
|
||||
fax_init(&fax_state,TRUE);
|
||||
|
@ -727,6 +755,7 @@ if [[ "x$HAVE_SPANDSP" = "xyes" ]]; then
|
|||
SPANDSP_INC="-I$ac_cv_use_spandsp -DSPANDSP_PRE006"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
AC_LANG_RESTORE
|
||||
fi
|
||||
|
|
|
@ -618,11 +618,15 @@ void FaxChan::updateInfo(t30_state_t* t30)
|
|||
t30_get_transfer_statistics(t30, &t);
|
||||
if (!t.error_correcting_mode)
|
||||
m_ecm = false;
|
||||
#ifdef SPANDSP_TXRXSTATS
|
||||
m_pages = t.pages_tx + t.pages_rx;
|
||||
#else
|
||||
m_pages = t.pages_transferred;
|
||||
#endif
|
||||
|
||||
Debug(this,DebugAll,"bit rate %d", t.bit_rate);
|
||||
Debug(this,DebugAll,"error correction %d", t.error_correcting_mode);
|
||||
Debug(this,DebugAll,"pages transferred %d", t.pages_transferred);
|
||||
Debug(this,DebugAll,"pages transferred %d", m_pages);
|
||||
Debug(this,DebugAll,"image size %d x %d", t.width, t.length);
|
||||
Debug(this,DebugAll,"image resolution %d x %d", t.x_resolution, t.y_resolution);
|
||||
Debug(this,DebugAll,"bad rows %d", t.bad_rows);
|
||||
|
|
Loading…
Reference in New Issue