<ahref="box__manager_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/*</span></div>
<divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment"> * modification, are permitted provided that the following conditions</span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment"> * are met:</span></div>
<divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment"> * 1. Redistributions of source code must retain the above copyright</span></div>
<divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer.</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer in the</span></div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment"> * documentation and/or other materials provided with the distribution.</span></div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'</span></div>
<divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div>
<divclass="ttc"id="astructbox__param_html_a8d5dba02e64d6c60e2805ee5c62c2d41"><divclass="ttname"><ahref="structbox__param.html#a8d5dba02e64d6c60e2805ee5c62c2d41">box_param::next</a></div><divclass="ttdeci">struct box_param * next</div><divclass="ttdoc">pointer to the next box</div><divclass="ttdef"><b>Definition:</b> box_manager.h:43</div></div>
<divclass="ttc"id="astructbox__param_html_a6ea7450cb7dad8229f9f80deeecb3653"><divclass="ttname"><ahref="structbox__param.html#a6ea7450cb7dad8229f9f80deeecb3653">box_param::offset</a></div><divclass="ttdeci">OPJ_OFF_T offset</div><divclass="ttdoc">byte position of the whole Box (LBox) in the file</div><divclass="ttdef"><b>Definition:</b> box_manager.h:39</div></div>
<divclass="ttc"id="abox__manager_8c_html_a0dcfa6897f3fd71d6336671a2a5b7e07"><divclass="ttname"><ahref="box__manager_8c.html#a0dcfa6897f3fd71d6336671a2a5b7e07">fetch_DBoxbytes</a></div><divclass="ttdeci">Byte_t * fetch_DBoxbytes(box_param_t *box, OPJ_OFF_T offset, OPJ_SIZE_T size)</div><divclass="ttdoc">fetch DBox (Box Contents) bytes of data in file stream</div><divclass="ttdef"><b>Definition:</b> box_manager.c:321</div></div>
<divclass="ttc"id="abox__manager_8h_html_a77ada7ec552ad6aecf1de5ecb1ec27bb"><divclass="ttname"><ahref="box__manager_8h.html#a77ada7ec552ad6aecf1de5ecb1ec27bb">delete_box_in_list</a></div><divclass="ttdeci">void delete_box_in_list(box_param_t **box, boxlist_param_t *boxlist)</div><divclass="ttdoc">delete a box in list</div><divclass="ttdef"><b>Definition:</b> box_manager.c:395</div></div>
<divclass="ttc"id="abox__manager_8h_html_a748c2d73b85353a96c1f59feebed6eb2"><divclass="ttname"><ahref="box__manager_8h.html#a748c2d73b85353a96c1f59feebed6eb2">gene_childboxbyOffset</a></div><divclass="ttdeci">box_param_t * gene_childboxbyOffset(box_param_t *superbox, OPJ_OFF_T offset)</div><divclass="ttdoc">generate child box from JP2 file at the given offset</div><divclass="ttdef"><b>Definition:</b> box_manager.c:288</div></div>
<divclass="ttc"id="abyte__manager_8c_html_a72b441947e1fab5e8dd83fdc985bf29c"><divclass="ttname"><ahref="byte__manager_8c.html#a72b441947e1fab5e8dd83fdc985bf29c">fetch_4bytebigendian</a></div><divclass="ttdeci">Byte4_t fetch_4bytebigendian(int fd, OPJ_OFF_T offset)</div><divclass="ttdoc">fetch a 4-byte big endian Byte codes in file stream</div><divclass="ttdef"><b>Definition:</b> byte_manager.c:109</div></div>
<divclass="ttc"id="abox__manager_8c_html_aeafd676f2bfc4052f297c1cbfb08e7e5"><divclass="ttname"><ahref="box__manager_8c.html#aeafd676f2bfc4052f297c1cbfb08e7e5">gene_boxlist</a></div><divclass="ttdeci">boxlist_param_t * gene_boxlist(void)</div><divclass="ttdoc">generate a box list</div><divclass="ttdef"><b>Definition:</b> box_manager.c:48</div></div>
<divclass="ttc"id="abox__manager_8h_html_a191b8fecf58253b417a49b1f5ea142ae"><divclass="ttname"><ahref="box__manager_8h.html#a191b8fecf58253b417a49b1f5ea142ae">gene_boxbyOffinStream</a></div><divclass="ttdeci">box_param_t * gene_boxbyOffinStream(Byte_t *stream, OPJ_OFF_T offset)</div><divclass="ttdoc">generate box from code stream (JPP or JPT stream) at the given offset</div><divclass="ttdef"><b>Definition:</b> box_manager.c:138</div></div>
<divclass="ttc"id="abox__manager_8c_html_a191b8fecf58253b417a49b1f5ea142ae"><divclass="ttname"><ahref="box__manager_8c.html#a191b8fecf58253b417a49b1f5ea142ae">gene_boxbyOffinStream</a></div><divclass="ttdeci">box_param_t * gene_boxbyOffinStream(Byte_t *stream, OPJ_OFF_T offset)</div><divclass="ttdoc">generate box from code stream (JPP or JPT stream) at the given offset</div><divclass="ttdef"><b>Definition:</b> box_manager.c:138</div></div>
<divclass="ttc"id="abyte__manager_8c_html_a62851758f9c2af1b12995190a1e4e909"><divclass="ttname"><ahref="byte__manager_8c.html#a62851758f9c2af1b12995190a1e4e909">fetch_bytes</a></div><divclass="ttdeci">Byte_t * fetch_bytes(int fd, OPJ_OFF_T offset, OPJ_SIZE_T size)</div><divclass="ttdoc">fetch bytes of data in file stream</div><divclass="ttdef"><b>Definition:</b> byte_manager.c:52</div></div>
<divclass="ttc"id="abyte__manager_8c_html_adc0810a234de2f1a8d59218959e07671"><divclass="ttname"><ahref="byte__manager_8c.html#adc0810a234de2f1a8d59218959e07671">fetch_2bytebigendian</a></div><divclass="ttdeci">Byte2_t fetch_2bytebigendian(int fd, OPJ_OFF_T offset)</div><divclass="ttdoc">fetch a 2-byte big endian Byte codes in file stream</div><divclass="ttdef"><b>Definition:</b> byte_manager.c:93</div></div>
<divclass="ttc"id="abox__manager_8h_html_ab31eb6d1ab6816c613a1938f0cc4b6e1"><divclass="ttname"><ahref="box__manager_8h.html#ab31eb6d1ab6816c613a1938f0cc4b6e1">gene_boxbyOffset</a></div><divclass="ttdeci">box_param_t * gene_boxbyOffset(int fd, OPJ_OFF_T offset)</div><divclass="ttdoc">generate box from JP2 file at the given offset</div><divclass="ttdef"><b>Definition:</b> box_manager.c:86</div></div>
<divclass="ttc"id="abox__manager_8h_html_a9b2ee705f70b639fbcc19a6d6f73da6a"><divclass="ttname"><ahref="box__manager_8h.html#a9b2ee705f70b639fbcc19a6d6f73da6a">boxlist_param_t</a></div><divclass="ttdeci">struct boxlist_param boxlist_param_t</div><divclass="ttdoc">Box list parameters.</div></div>
<divclass="ttc"id="astructbox__param_html_a24767e2a946d939983ba55efa8fdfb7a"><divclass="ttname"><ahref="structbox__param.html#a24767e2a946d939983ba55efa8fdfb7a">box_param::type</a></div><divclass="ttdeci">char type[4]</div><divclass="ttdoc">type of information in the DBox</div><divclass="ttdef"><b>Definition:</b> box_manager.h:42</div></div>
<divclass="ttc"id="astructbox__param_html_a3f675a72aeb95c732b88ab45e8446a4e"><divclass="ttname"><ahref="structbox__param.html#a3f675a72aeb95c732b88ab45e8446a4e">box_param::length</a></div><divclass="ttdeci">Byte8_t length</div><divclass="ttdoc">length of the whole Box</div><divclass="ttdef"><b>Definition:</b> box_manager.h:41</div></div>
<divclass="ttc"id="abox__manager_8c_html_a77ada7ec552ad6aecf1de5ecb1ec27bb"><divclass="ttname"><ahref="box__manager_8c.html#a77ada7ec552ad6aecf1de5ecb1ec27bb">delete_box_in_list</a></div><divclass="ttdeci">void delete_box_in_list(box_param_t **box, boxlist_param_t *boxlist)</div><divclass="ttdoc">delete a box in list</div><divclass="ttdef"><b>Definition:</b> box_manager.c:395</div></div>
<divclass="ttc"id="abyte__manager_8c_html_a80c5006e047b8a2a5bbb48bcbc9bbd7c"><divclass="ttname"><ahref="byte__manager_8c.html#a80c5006e047b8a2a5bbb48bcbc9bbd7c">fetch_1byte</a></div><divclass="ttdeci">Byte_t fetch_1byte(int fd, OPJ_OFF_T offset)</div><divclass="ttdoc">fetch a 1-byte Byte codes in file stream</div><divclass="ttdef"><b>Definition:</b> byte_manager.c:75</div></div>
<divclass="ttc"id="abox__manager_8h_html_af1cdc6e87a93954e92d8e481208895d4"><divclass="ttname"><ahref="box__manager_8h.html#af1cdc6e87a93954e92d8e481208895d4">insert_box_into_list</a></div><divclass="ttdeci">void insert_box_into_list(box_param_t *box, boxlist_param_t *boxlist)</div><divclass="ttdoc">insert a box into list</div><divclass="ttdef"><b>Definition:</b> box_manager.c:440</div></div>
<divclass="ttc"id="abox__manager_8h_html_aeafd676f2bfc4052f297c1cbfb08e7e5"><divclass="ttname"><ahref="box__manager_8h.html#aeafd676f2bfc4052f297c1cbfb08e7e5">gene_boxlist</a></div><divclass="ttdeci">boxlist_param_t * gene_boxlist(void)</div><divclass="ttdoc">generate a box list</div><divclass="ttdef"><b>Definition:</b> box_manager.c:48</div></div>
<divclass="ttc"id="abox__manager_8c_html_a7775b0d45b5e84a6d59ca1477ee0088c"><divclass="ttname"><ahref="box__manager_8c.html#a7775b0d45b5e84a6d59ca1477ee0088c">fetch_headbytes</a></div><divclass="ttdeci">Byte_t * fetch_headbytes(box_param_t *box)</div><divclass="ttdoc">fetch header bytes in file stream</div><divclass="ttdef"><b>Definition:</b> box_manager.c:316</div></div>
<divclass="ttc"id="abox__manager_8c_html_af1cdc6e87a93954e92d8e481208895d4"><divclass="ttname"><ahref="box__manager_8c.html#af1cdc6e87a93954e92d8e481208895d4">insert_box_into_list</a></div><divclass="ttdeci">void insert_box_into_list(box_param_t *box, boxlist_param_t *boxlist)</div><divclass="ttdoc">insert a box into list</div><divclass="ttdef"><b>Definition:</b> box_manager.c:440</div></div>
<divclass="ttc"id="abyte__manager_8c_html_a06c0559c3af79c5facbd4f50f1637782"><divclass="ttname"><ahref="byte__manager_8c.html#a06c0559c3af79c5facbd4f50f1637782">big8</a></div><divclass="ttdeci">Byte8_t big8(Byte_t *buf)</div><divclass="ttdoc">convert 8-byte big endian Byte codes to number</div><divclass="ttdef"><b>Definition:</b> byte_manager.c:153</div></div>
<divclass="ttc"id="abox__manager_8h_html_a497cd76e4977db665ed242609eef351b"><divclass="ttname"><ahref="box__manager_8h.html#a497cd76e4977db665ed242609eef351b">delete_box_in_list_by_type</a></div><divclass="ttdeci">void delete_box_in_list_by_type(const char type[], boxlist_param_t *boxlist)</div><divclass="ttdoc">delete a box in list by Type</div><divclass="ttdef"><b>Definition:</b> box_manager.c:415</div></div>
<divclass="ttc"id="abox__manager_8c_html_a497cd76e4977db665ed242609eef351b"><divclass="ttname"><ahref="box__manager_8c.html#a497cd76e4977db665ed242609eef351b">delete_box_in_list_by_type</a></div><divclass="ttdeci">void delete_box_in_list_by_type(const char type[], boxlist_param_t *boxlist)</div><divclass="ttdoc">delete a box in list by Type</div><divclass="ttdef"><b>Definition:</b> box_manager.c:415</div></div>
<divclass="ttc"id="astructboxlist__param_html_a073553f3e26d2029c45b5f1bf692cc84"><divclass="ttname"><ahref="structboxlist__param.html#a073553f3e26d2029c45b5f1bf692cc84">boxlist_param::last</a></div><divclass="ttdeci">box_param_t * last</div><divclass="ttdoc">last box pointer of the list</div><divclass="ttdef"><b>Definition:</b> box_manager.h:50</div></div>
<divclass="ttc"id="astructboxlist__param_html"><divclass="ttname"><ahref="structboxlist__param.html">boxlist_param</a></div><divclass="ttdoc">Box list parameters.</div><divclass="ttdef"><b>Definition:</b> box_manager.h:48</div></div>
<divclass="ttc"id="abox__manager_8c_html_a46342c34b100e9174966f70bf36936ef"><divclass="ttname"><ahref="box__manager_8c.html#a46342c34b100e9174966f70bf36936ef">fetch_DBox8bytebigendian</a></div><divclass="ttdeci">Byte8_t fetch_DBox8bytebigendian(box_param_t *box, OPJ_OFF_T offset)</div><divclass="ttdoc">fetch DBox (Box Contents) 8-byte big endian Byte codes in file stream</div><divclass="ttdef"><b>Definition:</b> box_manager.c:341</div></div>
<divclass="ttc"id="abox__manager_8c_html_ad9d347a84614e1e2bfd4464f22fbd2c5"><divclass="ttname"><ahref="box__manager_8c.html#ad9d347a84614e1e2bfd4464f22fbd2c5">search_box</a></div><divclass="ttdeci">box_param_t * search_box(const char type[], boxlist_param_t *boxlist)</div><divclass="ttdoc">search a box by box type</div><divclass="ttdef"><b>Definition:</b> box_manager.c:346</div></div>
<divclass="ttc"id="astructboxlist__param_html_af63af9b68990700ca5e5a464ddb18dc4"><divclass="ttname"><ahref="structboxlist__param.html#af63af9b68990700ca5e5a464ddb18dc4">boxlist_param::first</a></div><divclass="ttdeci">box_param_t * first</div><divclass="ttdoc">first box pointer of the list</div><divclass="ttdef"><b>Definition:</b> box_manager.h:49</div></div>
<divclass="ttc"id="abyte__manager_8c_html_ae4d6ed0e45814368ab976a1530b8c780"><divclass="ttname"><ahref="byte__manager_8c.html#ae4d6ed0e45814368ab976a1530b8c780">fetch_8bytebigendian</a></div><divclass="ttdeci">Byte8_t fetch_8bytebigendian(int fd, OPJ_OFF_T offset)</div><divclass="ttdoc">fetch a 8-byte big endian Byte codes in file stream</div><divclass="ttdef"><b>Definition:</b> byte_manager.c:125</div></div>
<divclass="ttc"id="abox__manager_8h_html_a29a36ad1d80050083acd21c1131eea59"><divclass="ttname"><ahref="box__manager_8h.html#a29a36ad1d80050083acd21c1131eea59">print_allbox</a></div><divclass="ttdeci">void print_allbox(boxlist_param_t *boxlist)</div><divclass="ttdoc">print all box parameters</div><divclass="ttdef"><b>Definition:</b> box_manager.c:375</div></div>
<divclass="ttc"id="abox__manager_8c_html_a748c2d73b85353a96c1f59feebed6eb2"><divclass="ttname"><ahref="box__manager_8c.html#a748c2d73b85353a96c1f59feebed6eb2">gene_childboxbyOffset</a></div><divclass="ttdeci">box_param_t * gene_childboxbyOffset(box_param_t *superbox, OPJ_OFF_T offset)</div><divclass="ttdoc">generate child box from JP2 file at the given offset</div><divclass="ttdef"><b>Definition:</b> box_manager.c:288</div></div>
<divclass="ttc"id="abox__manager_8c_html_ab31eb6d1ab6816c613a1938f0cc4b6e1"><divclass="ttname"><ahref="box__manager_8c.html#ab31eb6d1ab6816c613a1938f0cc4b6e1">gene_boxbyOffset</a></div><divclass="ttdeci">box_param_t * gene_boxbyOffset(int fd, OPJ_OFF_T offset)</div><divclass="ttdoc">generate box from JP2 file at the given offset</div><divclass="ttdef"><b>Definition:</b> box_manager.c:86</div></div>