2 * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
\r
3 * Copyright (c) 2002-2007, Professor Benoit Macq
\r
4 * Copyright (c) 2002-2003, Yannick Verschueren
\r
5 * Copyright (c) 2005, Herve Drolon, FreeImage Team
\r
6 * Copyright (c) 2008, Jerome Fimes, Communications & Systemes <jerome.fimes@c-s.fr>
\r
7 * All rights reserved.
\r
9 * Redistribution and use in source and binary forms, with or without
\r
10 * modification, are permitted provided that the following conditions
\r
12 * 1. Redistributions of source code must retain the above copyright
\r
13 * notice, this list of conditions and the following disclaimer.
\r
14 * 2. Redistributions in binary form must reproduce the above copyright
\r
15 * notice, this list of conditions and the following disclaimer in the
\r
16 * documentation and/or other materials provided with the distribution.
\r
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
\r
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
\r
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
\r
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
\r
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
\r
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
\r
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
\r
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
\r
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
\r
28 * POSSIBILITY OF SUCH DAMAGE.
\r
35 @brief JPT-stream reader (JPEG 2000, JPIP)
\r
37 JPT-stream functions are implemented in J2K.C.
\r
39 #include "openjpeg.h"
\r
40 struct opj_stream_private;
\r
41 struct opj_event_mgr;
\r
43 Message Header JPT stream structure
\r
45 typedef struct opj_jpt_msg_header
\r
47 /** In-class Identifier */
\r
49 /** Last byte information */
\r
50 OPJ_UINT32 last_byte;
\r
51 /** Class Identifier */
\r
52 OPJ_UINT32 Class_Id;
\r
53 /** CSn : index identifier */
\r
55 /** Message offset */
\r
56 OPJ_UINT32 Msg_offset;
\r
57 /** Message length */
\r
58 OPJ_UINT32 Msg_length;
\r
59 /** Auxiliary for JPP case */
\r
60 OPJ_UINT32 Layer_nb;
\r
61 } opj_jpt_msg_header_t;
\r
63 /* ----------------------------------------------------------------------- */
\r
66 Initialize the value of the message header structure
\r
67 @param header Message header structure
\r
69 void jpt_init_msg_header(opj_jpt_msg_header_t * header);
\r
72 * Read the message header for a JPP/JPT - stream
\r
73 * @param p_cio stream handle
\r
74 * @param header JPT Message header structure
\r
75 * @param p_manager user event manager to display nice messages.
\r
77 bool jpt_read_msg_header(
\r
78 struct opj_stream_private * p_cio,
\r
79 opj_jpt_msg_header_t * p_header,
\r
80 OPJ_UINT32 * p_nb_bytes_read,
\r
81 struct opj_event_mgr * p_manager);
\r