From ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 5 Apr 2004 12:02:10 +0000 Subject: checksuming for nut & nice checksum API for libavformat Originally committed as revision 2969 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avio.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavformat/avio.h') diff --git a/libavformat/avio.h b/libavformat/avio.h index f668c0c..53ed22a 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -78,6 +78,9 @@ typedef struct { int write_flag; /* true if open for writing */ int is_streamed; int max_packet_size; + unsigned long checksum; + unsigned char *checksum_ptr; + unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size); } ByteIOContext; int init_put_byte(ByteIOContext *s, @@ -150,6 +153,10 @@ int url_open_dyn_buf(ByteIOContext *s); int url_open_dyn_packet_buf(ByteIOContext *s, int max_packet_size); int url_close_dyn_buf(ByteIOContext *s, uint8_t **pbuffer); +unsigned long get_checksum(ByteIOContext *s); +void init_checksum(ByteIOContext *s, unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum); +unsigned long update_adler32(unsigned long adler, const uint8_t *buf, unsigned int len); + /* file.c */ extern URLProtocol file_protocol; extern URLProtocol pipe_protocol; -- cgit v1.1