comparison avio.h @ 2840:f51675f78402 libavformat

Make recently added and still unused read_seek functions return offset_t.
author michael
date Wed, 19 Dec 2007 21:11:08 +0000
parents b51319dd86e5
children 0182bdddc45e
comparison
equal deleted inserted replaced
2839:b51319dd86e5 2840:f51675f78402
103 * AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will 103 * AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will
104 * fail with ENOTSUP if used and not supported. 104 * fail with ENOTSUP if used and not supported.
105 * @return >= 0 on success 105 * @return >= 0 on success
106 * @see AVInputFormat::read_seek 106 * @see AVInputFormat::read_seek
107 */ 107 */
108 int av_url_read_seek(URLContext *h, 108 offset_t av_url_read_seek(URLContext *h,
109 int stream_index, int64_t timestamp, int flags); 109 int stream_index, int64_t timestamp, int flags);
110 110
111 /** 111 /**
112 * Passing this as the "whence" parameter to a seek function causes it to 112 * Passing this as the "whence" parameter to a seek function causes it to
113 * return the filesize without seeking anywhere. Supporting this is optional. 113 * return the filesize without seeking anywhere. Supporting this is optional.
122 int (*url_write)(URLContext *h, unsigned char *buf, int size); 122 int (*url_write)(URLContext *h, unsigned char *buf, int size);
123 offset_t (*url_seek)(URLContext *h, offset_t pos, int whence); 123 offset_t (*url_seek)(URLContext *h, offset_t pos, int whence);
124 int (*url_close)(URLContext *h); 124 int (*url_close)(URLContext *h);
125 struct URLProtocol *next; 125 struct URLProtocol *next;
126 int (*url_read_pause)(URLContext *h, int pause); 126 int (*url_read_pause)(URLContext *h, int pause);
127 int (*url_read_seek)(URLContext *h, 127 offset_t (*url_read_seek)(URLContext *h,
128 int stream_index, int64_t timestamp, int flags); 128 int stream_index, int64_t timestamp, int flags);
129 } URLProtocol; 129 } URLProtocol;
130 130
131 extern URLProtocol *first_protocol; 131 extern URLProtocol *first_protocol;
132 extern URLInterruptCB *url_interrupt_cb; 132 extern URLInterruptCB *url_interrupt_cb;
152 unsigned long checksum; 152 unsigned long checksum;
153 unsigned char *checksum_ptr; 153 unsigned char *checksum_ptr;
154 unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size); 154 unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
155 int error; ///< contains the error code or 0 if no error happened 155 int error; ///< contains the error code or 0 if no error happened
156 int (*read_pause)(void *opaque, int pause); 156 int (*read_pause)(void *opaque, int pause);
157 int (*read_seek)(void *opaque, 157 offset_t (*read_seek)(void *opaque,
158 int stream_index, int64_t timestamp, int flags); 158 int stream_index, int64_t timestamp, int flags);
159 } ByteIOContext; 159 } ByteIOContext;
160 160
161 int init_put_byte(ByteIOContext *s, 161 int init_put_byte(ByteIOContext *s,
162 unsigned char *buffer, 162 unsigned char *buffer,
187 offset_t url_fsize(ByteIOContext *s); 187 offset_t url_fsize(ByteIOContext *s);
188 int url_feof(ByteIOContext *s); 188 int url_feof(ByteIOContext *s);
189 int url_ferror(ByteIOContext *s); 189 int url_ferror(ByteIOContext *s);
190 190
191 int av_url_read_fpause(ByteIOContext *h, int pause); 191 int av_url_read_fpause(ByteIOContext *h, int pause);
192 int av_url_read_fseek(ByteIOContext *h, 192 offset_t av_url_read_fseek(ByteIOContext *h,
193 int stream_index, int64_t timestamp, int flags); 193 int stream_index, int64_t timestamp, int flags);
194 194
195 #define URL_EOF (-1) 195 #define URL_EOF (-1)
196 /** @note return URL_EOF (-1) if EOF */ 196 /** @note return URL_EOF (-1) if EOF */
197 int url_fgetc(ByteIOContext *s); 197 int url_fgetc(ByteIOContext *s);