]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Added a dummy t38_gateway_fillin() function, which will need fleshing out
authorSteve Underwood <steveu@coppice.org>
Mon, 7 Jun 2010 15:33:03 +0000 (23:33 +0800)
committerSteve Underwood <steveu@coppice.org>
Mon, 7 Jun 2010 15:33:52 +0000 (23:33 +0800)
later. At least the module can call something for now.

libs/spandsp/src/spandsp/t38_gateway.h
libs/spandsp/src/t38_gateway.c

index c60db9432ae49d643edcf81d506d17b0ab00f092..b2a1c1f6e9d8581f3eab9b42f1969c5bd6c7ae39 100644 (file)
@@ -109,7 +109,17 @@ SPAN_DECLARE(int) t38_gateway_free(t38_gateway_state_t *s);
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed. */
-SPAN_DECLARE(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE_NONSTD(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len);
+
+/*! Apply fake processing when a block of audio samples is missing (e.g due
+    to packet loss).
+    \brief Apply fake received audio processing.
+    \param s The T.38 context.
+    \param len The number of samples to fake.
+    \return The number of samples unprocessed. This should only be non-zero if
+            the software has reached the end of the FAX call.
+*/
+SPAN_DECLARE_NONSTD(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len);
 
 /*! Generate a block of FAX audio samples.
     \brief Generate a block of FAX audio samples.
@@ -118,7 +128,7 @@ SPAN_DECLARE(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len)
     \param max_len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-SPAN_DECLARE(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len);
+SPAN_DECLARE_NONSTD(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len);
 
 /*! Control whether error correcting mode (ECM) is allowed.
     \brief Control whether error correcting mode (ECM) is allowed.
index 579e5aa20cdbba3c4986d1fa06c884ce2fbfa5a3..6e542f3e3995af952760f8c7471efc4add26c86e 100644 (file)
@@ -2054,7 +2054,7 @@ static int restart_rx_modem(t38_gateway_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE_NONSTD(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len)
 {
     int i;
 
@@ -2104,7 +2104,14 @@ SPAN_DECLARE(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len)
+SPAN_DECLARE_NONSTD(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len)
+{
+    /* TODO: handle things properly */
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE_NONSTD(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len)
 {
     int len;
 #if defined(LOG_FAX_AUDIO)