spandsp 0.0.6
private/t4_rx.h
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/t4_rx.h - definitions for T.4 FAX receive processing
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2003 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26#if !defined(_SPANDSP_PRIVATE_T4_RX_H_)
27#define _SPANDSP_PRIVATE_T4_RX_H_
28
29#define t4_rx_state_s t4_state_s
30
31/*!
32 T.4 FAX decompression metadata descriptor. This contains information about the image
33 which may be relevant to the backend, but is not relevant to the image decoding process.
34*/
35typedef struct
36{
37 /*! \brief The vendor of the machine which produced the file. */
38 const char *vendor;
39 /*! \brief The model of machine which produced the file. */
40 const char *model;
41 /*! \brief The local ident string. */
42 const char *local_ident;
43 /*! \brief The remote end's ident string. */
44 const char *far_ident;
45 /*! \brief The FAX sub-address. */
46 const char *sub_address;
47 /*! \brief The FAX DCS information, as an ASCII hex string. */
48 const char *dcs;
50
51/*!
52 TIFF specific state information to go with T.4 compression or decompression handling.
53*/
54typedef struct
55{
56 /*! \brief The current file name. */
57 const char *file;
58 /*! \brief The libtiff context for the current TIFF file */
59 TIFF *tiff_file;
60
61 /* Supporting information, like resolutions, which the backend may want. */
62 t4_rx_metadata_t metadata;
63
64 /*! \brief The compression type for output to the TIFF file. */
66 /*! \brief The TIFF photometric setting for the current page. */
67 uint16_t photo_metric;
68 /*! \brief The TIFF fill order setting for the current page. */
69 uint16_t fill_order;
70 /*! \brief The TIFF G3 FAX options. */
72
73 /*! \brief The number of pages in the current image file. */
75
76 /*! \brief The first page to transfer. -1 to start at the beginning of the file. */
78 /*! \brief The last page to transfer. -1 to continue to the end of the file. */
81
82#endif
83/*- End of file ------------------------------------------------------------*/
Definition private/t4_rx.h:36
const char * local_ident
The local ident string.
Definition private/t4_rx.h:42
const char * model
The model of machine which produced the file.
Definition private/t4_rx.h:40
const char * sub_address
The FAX sub-address.
Definition private/t4_rx.h:46
const char * far_ident
The remote end's ident string.
Definition private/t4_rx.h:44
const char * vendor
The vendor of the machine which produced the file.
Definition private/t4_rx.h:38
const char * dcs
The FAX DCS information, as an ASCII hex string.
Definition private/t4_rx.h:48
Definition private/t4_rx.h:55
int start_page
The first page to transfer. -1 to start at the beginning of the file.
Definition private/t4_rx.h:77
int pages_in_file
The number of pages in the current image file.
Definition private/t4_rx.h:74
uint16_t fill_order
The TIFF fill order setting for the current page.
Definition private/t4_rx.h:69
int32_t output_t4_options
The TIFF G3 FAX options.
Definition private/t4_rx.h:71
uint16_t photo_metric
The TIFF photometric setting for the current page.
Definition private/t4_rx.h:67
const char * file
The current file name.
Definition private/t4_rx.h:57
TIFF * tiff_file
The libtiff context for the current TIFF file.
Definition private/t4_rx.h:59
int stop_page
The last page to transfer. -1 to continue to the end of the file.
Definition private/t4_rx.h:79
int32_t output_compression
The compression type for output to the TIFF file.
Definition private/t4_rx.h:65