diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-05 12:02:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-05 12:02:10 +0000 |
commit | ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a (patch) | |
tree | fad9f203172659788226c6e762d661ef97014be7 /libavformat/avio.h | |
parent | 5e9b83f5d7e5b8c9182e2ee6a1baf3e86aec0a17 (diff) | |
download | ffmpeg-streaming-ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a.zip ffmpeg-streaming-ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a.tar.gz |
checksuming for nut & nice checksum API for libavformat
Originally committed as revision 2969 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r-- | libavformat/avio.h | 7 |
1 files changed, 7 insertions, 0 deletions
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; |