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*/
35 typedef 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;
49} t4_rx_metadata_t;
50
51/*!
52 TIFF specific state information to go with T.4 compression or decompression handling.
53*/
54 typedef 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. */
65 int32_t output_compression;
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. */
71 int32_t output_t4_options;
72
73 /*! \brief The number of pages in the current image file. */
74 int pages_in_file;
75
76 /*! \brief The first page to transfer. -1 to start at the beginning of the file. */
77 int start_page;
78 /*! \brief The last page to transfer. -1 to continue to the end of the file. */
79 int stop_page;
80} t4_tiff_state_t;
81
82#endif
83/*- End of file ------------------------------------------------------------*/
t4_rx_metadata_t
Definition private/t4_rx.h:36
t4_rx_metadata_t::local_ident
const char * local_ident
The local ident string.
Definition private/t4_rx.h:42
t4_rx_metadata_t::model
const char * model
The model of machine which produced the file.
Definition private/t4_rx.h:40
t4_rx_metadata_t::sub_address
const char * sub_address
The FAX sub-address.
Definition private/t4_rx.h:46
t4_rx_metadata_t::far_ident
const char * far_ident
The remote end's ident string.
Definition private/t4_rx.h:44
t4_rx_metadata_t::vendor
const char * vendor
The vendor of the machine which produced the file.
Definition private/t4_rx.h:38
t4_rx_metadata_t::dcs
const char * dcs
The FAX DCS information, as an ASCII hex string.
Definition private/t4_rx.h:48
t4_tiff_state_t
Definition private/t4_rx.h:55
t4_tiff_state_t::start_page
int start_page
The first page to transfer. -1 to start at the beginning of the file.
Definition private/t4_rx.h:77
t4_tiff_state_t::pages_in_file
int pages_in_file
The number of pages in the current image file.
Definition private/t4_rx.h:74
t4_tiff_state_t::fill_order
uint16_t fill_order
The TIFF fill order setting for the current page.
Definition private/t4_rx.h:69
t4_tiff_state_t::output_t4_options
int32_t output_t4_options
The TIFF G3 FAX options.
Definition private/t4_rx.h:71
t4_tiff_state_t::photo_metric
uint16_t photo_metric
The TIFF photometric setting for the current page.
Definition private/t4_rx.h:67
t4_tiff_state_t::file
const char * file
The current file name.
Definition private/t4_rx.h:57
t4_tiff_state_t::tiff_file
TIFF * tiff_file
The libtiff context for the current TIFF file.
Definition private/t4_rx.h:59
t4_tiff_state_t::stop_page
int stop_page
The last page to transfer. -1 to continue to the end of the file.
Definition private/t4_rx.h:79
t4_tiff_state_t::output_compression
int32_t output_compression
The compression type for output to the TIFF file.
Definition private/t4_rx.h:65