diff avio.h @ 418:41da3366d341 libavformat

checksuming for nut & nice checksum API for libavformat
author michael
date Mon, 05 Apr 2004 12:02:10 +0000
parents e14fcd57ad2f
children e1f17fcfb92c
line wrap: on
line diff
--- a/avio.h	Mon Apr 05 11:36:13 2004 +0000
+++ b/avio.h	Mon Apr 05 12:02:10 2004 +0000
@@ -78,6 +78,9 @@
     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_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;