core/vil/file_formats/vil_jpeg_source_mgr.h
Go to the documentation of this file.
00001 // This is core/vil/file_formats/vil_jpeg_source_mgr.h
00002 #ifndef vil_jpeg_source_mgr_h_
00003 #define vil_jpeg_source_mgr_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author fsm
00010 // \verbatim
00011 //  Modifications
00012 //     11 Oct 2002 Ian Scott - converted to vil
00013 //\endverbatim
00014 
00015 #include <vil/file_formats/vil_jpeglib.h>
00016 class vil_stream;
00017 
00018 //: this is the data source structure which allows JPEG to read from a vil_stream.
00019 struct vil_jpeg_stream_source_mgr
00020 {
00021   struct jpeg_source_mgr base;
00022 
00023   vil_stream *stream;           /* source stream */
00024   JOCTET * buffer;              /* start of buffer */
00025   jpeg_boolean start_of_file;   /* have we gotten any data yet? */
00026 };
00027 
00028 void
00029 vil_jpeg_init_source (j_decompress_ptr cinfo);
00030 
00031 jpeg_boolean
00032 vil_jpeg_fill_input_buffer (j_decompress_ptr cinfo);
00033 
00034 void
00035 vil_jpeg_skip_input_data (j_decompress_ptr cinfo, long num_bytes);
00036 
00037 void
00038 vil_jpeg_term_source (j_decompress_ptr cinfo);
00039 
00040 void
00041 vil_jpeg_stream_src_set (j_decompress_ptr cinfo, vil_stream *vs);
00042 
00043 void
00044 vil_jpeg_stream_src_rewind(j_decompress_ptr cinfo, vil_stream *vs);
00045 
00046 #endif // vil_jpeg_source_mgr_h_