private/t38_non_ecm_buffer.h
/*
* SpanDSP - a series of DSP components for telephony
*
* private/t38_non_ecm_buffer.h - A rate adapting buffer for T.38 non-ECM image
* and TCF data
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2005, 2006, 2007, 2008 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(_SPANDSP_PRIVATE_T38_NON_ECM_BUFFER_H_)
#define _SPANDSP_PRIVATE_T38_NON_ECM_BUFFER_H_
/*! \brief A flow controlled non-ECM image data buffer, for buffering T.38 to analogue
modem data.
*/
struct t38_non_ecm_buffer_state_s
{
/*! \brief Minimum number of bits per row, used when fill bits are being deleted on the
link, and restored at the emitting gateway. */
int min_bits_per_row;
/*! \brief non-ECM modem transmit data buffer. */
uint8_t data[T38_NON_ECM_TX_BUF_LEN];
/*! \brief The current write point in the buffer. */
int in_ptr;
/*! \brief The current read point in the buffer. */
int out_ptr;
/*! \brief The location of the most recent EOL marker in the buffer. */
int latest_eol_ptr;
/*! \brief The number of bits to date in the current row, used when min_row_bits is
to be applied. */
int row_bits;
/*! \brief The bit stream entering the buffer, used to detect EOLs */
unsigned int bit_stream;
/*! \brief The non-ECM flow control fill octet (0xFF before the first data, and 0x00
once data has started). */
uint8_t flow_control_fill_octet;
/*! \brief A code for the phase of input buffering, from initial all ones to completion. */
int input_phase;
/*! \brief TRUE is the end of non-ECM data indication has been received. */
int data_finished;
/*! \brief The current octet being transmitted from the buffer. */
unsigned int octet;
/*! \brief The current bit number in the current non-ECM octet. */
int bit_no;
/*! \brief TRUE if in image data mode, as opposed to TCF mode. */
int image_data_mode;
/*! \brief The number of octets input to the buffer. */
int in_octets;
/*! \brief The number of rows input to the buffer. */
int in_rows;
/*! \brief The number of non-ECM fill octets generated for minimum row bits
purposes. */
int min_row_bits_fill_octets;
/*! \brief The number of octets output from the buffer. */
int out_octets;
/*! \brief The number of rows output from the buffer. */
int out_rows;
/*! \brief The number of non-ECM fill octets generated for flow control
purposes. */
int flow_control_fill_octets;
};
#endif
/*- End of file ------------------------------------------------------------*/
t38_non_ecm_buffer_state_s
A flow controlled non-ECM image data buffer, for buffering T.38 to analogue modem data.
Definition private/t38_non_ecm_buffer.h:34
t38_non_ecm_buffer_state_s::out_rows
int out_rows
The number of rows output from the buffer.
Definition private/t38_non_ecm_buffer.h:77
t38_non_ecm_buffer_state_s::latest_eol_ptr
int latest_eol_ptr
The location of the most recent EOL marker in the buffer.
Definition private/t38_non_ecm_buffer.h:46
t38_non_ecm_buffer_state_s::octet
unsigned int octet
The current octet being transmitted from the buffer.
Definition private/t38_non_ecm_buffer.h:61
t38_non_ecm_buffer_state_s::flow_control_fill_octets
int flow_control_fill_octets
The number of non-ECM fill octets generated for flow control purposes.
Definition private/t38_non_ecm_buffer.h:80
t38_non_ecm_buffer_state_s::out_octets
int out_octets
The number of octets output from the buffer.
Definition private/t38_non_ecm_buffer.h:75
t38_non_ecm_buffer_state_s::in_rows
int in_rows
The number of rows input to the buffer.
Definition private/t38_non_ecm_buffer.h:70
t38_non_ecm_buffer_state_s::data_finished
int data_finished
TRUE is the end of non-ECM data indication has been received.
Definition private/t38_non_ecm_buffer.h:59
t38_non_ecm_buffer_state_s::out_ptr
int out_ptr
The current read point in the buffer.
Definition private/t38_non_ecm_buffer.h:44
t38_non_ecm_buffer_state_s::input_phase
int input_phase
A code for the phase of input buffering, from initial all ones to completion.
Definition private/t38_non_ecm_buffer.h:57
t38_non_ecm_buffer_state_s::image_data_mode
int image_data_mode
TRUE if in image data mode, as opposed to TCF mode.
Definition private/t38_non_ecm_buffer.h:65
t38_non_ecm_buffer_state_s::bit_stream
unsigned int bit_stream
The bit stream entering the buffer, used to detect EOLs.
Definition private/t38_non_ecm_buffer.h:52
t38_non_ecm_buffer_state_s::flow_control_fill_octet
uint8_t flow_control_fill_octet
The non-ECM flow control fill octet (0xFF before the first data, and 0x00 once data has started).
Definition private/t38_non_ecm_buffer.h:55
t38_non_ecm_buffer_state_s::min_row_bits_fill_octets
int min_row_bits_fill_octets
The number of non-ECM fill octets generated for minimum row bits purposes.
Definition private/t38_non_ecm_buffer.h:73
t38_non_ecm_buffer_state_s::data
uint8_t data[T38_NON_ECM_TX_BUF_LEN]
non-ECM modem transmit data buffer.
Definition private/t38_non_ecm_buffer.h:40
t38_non_ecm_buffer_state_s::in_octets
int in_octets
The number of octets input to the buffer.
Definition private/t38_non_ecm_buffer.h:68
t38_non_ecm_buffer_state_s::bit_no
int bit_no
The current bit number in the current non-ECM octet.
Definition private/t38_non_ecm_buffer.h:63
t38_non_ecm_buffer_state_s::min_bits_per_row
int min_bits_per_row
Minimum number of bits per row, used when fill bits are being deleted on the link,...
Definition private/t38_non_ecm_buffer.h:37
t38_non_ecm_buffer_state_s::in_ptr
int in_ptr
The current write point in the buffer.
Definition private/t38_non_ecm_buffer.h:42
t38_non_ecm_buffer_state_s::row_bits
int row_bits
The number of bits to date in the current row, used when min_row_bits is to be applied.
Definition private/t38_non_ecm_buffer.h:49
T38_NON_ECM_TX_BUF_LEN
#define T38_NON_ECM_TX_BUF_LEN
Definition t38_non_ecm_buffer.h:72