Revision c3316802

View differences:

libavformat/avio.h
30 30
struct URLContext {
31 31
    struct URLProtocol *prot;
32 32
    int flags;
33
    int is_streamed;  /* true if streamed (no seek possible), default = false */
34
    int max_packet_size;  /* if non zero, the stream is packetized with this max packet size */
33
    int is_streamed;  /**< true if streamed (no seek possible), default = false */
34
    int max_packet_size;  /**< if non zero, the stream is packetized with this max packet size */
35 35
    void *priv_data;
36 36
#if LIBAVFORMAT_VERSION_INT >= (52<<16)
37
    char *filename; /* specified filename */
37
    char *filename; /**< specified filename */
38 38
#else
39
    char filename[1]; /* specified filename */
39
    char filename[1]; /**< specified filename */
40 40
#endif
41 41
};
42 42

  
......
62 62
int url_exist(const char *filename);
63 63
offset_t url_filesize(URLContext *h);
64 64

  
65
/*
65
/**
66 66
 * Return the maximum packet size associated to packetized file
67 67
 * handle. If the file is not packetized (stream like http or file on
68 68
 * disk), then 0 is returned.
......
73 73
int url_get_max_packet_size(URLContext *h);
74 74
void url_get_filename(URLContext *h, char *buf, int buf_size);
75 75

  
76
/* the callback is called in blocking functions to test regulary if
77
   asynchronous interruption is needed. AVERROR(EINTR) is returned
78
   in this case by the interrupted function. 'NULL' means no interrupt
79
   callback is given. */
76
/**
77
 * the callback is called in blocking functions to test regulary if
78
 * asynchronous interruption is needed. AVERROR(EINTR) is returned
79
 * in this case by the interrupted function. 'NULL' means no interrupt
80
 * callback is given. i
81
 */
80 82
void url_set_interrupt_cb(URLInterruptCB *interrupt_cb);
81 83

  
82 84
/* not implemented */
......
112 114
    int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
113 115
    int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
114 116
    offset_t (*seek)(void *opaque, offset_t offset, int whence);
115
    offset_t pos; /* position in the file of the current buffer */
116
    int must_flush; /* true if the next seek should flush */
117
    int eof_reached; /* true if eof reached */
118
    int write_flag;  /* true if open for writing */
117
    offset_t pos; /**< position in the file of the current buffer */
118
    int must_flush; /**< true if the next seek should flush */
119
    int eof_reached; /**< true if eof reached */
120
    int write_flag;  /**< true if open for writing */
119 121
    int is_streamed;
120 122
    int max_packet_size;
121 123
    unsigned long checksum;
......
155 157
int url_ferror(ByteIOContext *s);
156 158

  
157 159
#define URL_EOF (-1)
158
/* NOTE: return URL_EOF (-1) if EOF */
160
/** @note return URL_EOF (-1) if EOF */
159 161
int url_fgetc(ByteIOContext *s);
160 162

  
161
/* XXX: currently size is limited */
163
/** @warning currently size is limited */
162 164
#ifdef __GNUC__
163 165
int url_fprintf(ByteIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
164 166
#else
165 167
int url_fprintf(ByteIOContext *s, const char *fmt, ...);
166 168
#endif
167 169

  
168
/* note: unlike fgets, the EOL character is not returned and a whole
170
/** @note unlike fgets, the EOL character is not returned and a whole
169 171
   line is parsed. return NULL if first char read was EOF */
170 172
char *url_fgets(ByteIOContext *s, char *buf, int buf_size);
171 173

  
......
174 176
int get_buffer(ByteIOContext *s, unsigned char *buf, int size);
175 177
int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size);
176 178

  
177
/* NOTE: return 0 if EOF, so you cannot use it if EOF handling is
179
/** @note return 0 if EOF, so you cannot use it if EOF handling is
178 180
   necessary */
179 181
int get_byte(ByteIOContext *s);
180 182
unsigned int get_le24(ByteIOContext *s);
......
195 197

  
196 198
int url_fdopen(ByteIOContext *s, URLContext *h);
197 199

  
198
/* XXX: must be called before any I/O */
200
/** @warning must be called before any I/O */
199 201
int url_setbufsize(ByteIOContext *s, int buf_size);
200 202

  
201
/* NOTE: when opened as read/write, the buffers are only used for
203
/** @note when opened as read/write, the buffers are only used for
202 204
   reading */
203 205
int url_fopen(ByteIOContext *s, const char *filename, int flags);
204 206
int url_fclose(ByteIOContext *s);
205 207
URLContext *url_fileno(ByteIOContext *s);
206 208

  
207
/*
209
/**
208 210
 * Return the maximum packet size associated to packetized buffered file
209 211
 * handle. If the file is not packetized (stream like http or file on
210 212
 * disk), then 0 is returned.
......
216 218

  
217 219
int url_open_buf(ByteIOContext *s, uint8_t *buf, int buf_size, int flags);
218 220

  
219
/* return the written or read size */
221
/** return the written or read size */
220 222
int url_close_buf(ByteIOContext *s);
221 223

  
222
/*
224
/**
223 225
 * Open a write only memory stream.
224 226
 *
225 227
 * @param s new IO context
......
227 229
 */
228 230
int url_open_dyn_buf(ByteIOContext *s);
229 231

  
230
/*
232
/**
231 233
 * Open a write only packetized memory stream with a maximum packet
232 234
 * size of 'max_packet_size'.  The stream is stored in a memory buffer
233 235
 * with a big endian 4 byte header giving the packet size in bytes.
......
238 240
 */
239 241
int url_open_dyn_packet_buf(ByteIOContext *s, int max_packet_size);
240 242

  
241
/*
243
/**
242 244
 * Return the written size and a pointer to the buffer. The buffer
243 245
 *  must be freed with av_free().
244 246
 * @param s IO context

Also available in: Unified diff