From e6fae1d4ede08eadd6243f40a3c81b8e2f3cd22d Mon Sep 17 00:00:00 2001 From: Nathan Stenzel Date: Thu, 13 Sep 2001 05:01:53 +0000 Subject: [PATCH] Updated to reflect changes in jpeg.c git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2238 67ed7778-7388-44ab-90cf-0a291f65f57c --- libgphoto2/jpeg.h | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/libgphoto2/jpeg.h b/libgphoto2/jpeg.h index 9eae974c8..609260842 100644 --- a/libgphoto2/jpeg.h +++ b/libgphoto2/jpeg.h @@ -1,32 +1,34 @@ /* This code was written by Nathan Stenzel for gphoto */ /* GPL */ +enum jpegmarker {start=0xD8, APPO=0xE0, quantization=0xDB, huffman=0xC4, SsSeAhAl=0xDA, SOFC0=0xC0}; + +const markers[] = { + start, APPO, quantization, huffman, SsSeAhAl, SOFC0 +}; + +const char *markernames[] = { + "Start", "APPO", "Quantization table", "Huffman table", "SsSeAhAl", "SOFC0" }; struct chunk{ int size; unsigned char *data; }; -chunk_new(struct chunk *mychunk, int length); +void chunk_new(struct chunk *mychunk, int length); -chunk_print(struct chunk *mychunk); +void chunk_print(struct chunk *mychunk); -chunk_destroy(struct chunk *mychunk); +void chunk_destroy(struct chunk *mychunk); struct jpeg { int count; struct chunk marker[20]; /* I think this should be big enough */ }; -jpeg_init(struct jpeg *myjpeg); +void jpeg_init(struct jpeg *myjpeg); -jpeg_destroy(struct jpeg *myjpeg); - -enum jpegmarker {start, APPO, quantization, huffman, SsSeAhAl}; - -const char markers[] = { - start, APPO, quantization, huffman, SsSeAhAl -}; +void jpeg_destroy(struct jpeg *myjpeg); char jpeg_findff(int *location, struct chunk *picture); @@ -34,6 +36,8 @@ char jpeg_findactivemarker(char *id, int *location, struct chunk *picture); void jpeg_add_marker(struct jpeg *myjpeg, struct chunk *picture, int start, int end); -char jpeg_parse(struct jpeg *myjpeg, struct chunk *picture); +void jpeg_parse(struct jpeg *myjpeg, struct chunk *picture); -char jpeg_print(struct jpeg *myjpeg); +void jpeg_print(struct jpeg *myjpeg); + +char *jpeg_markername(int c); \ No newline at end of file