Revision 7f37f568

View differences:

libavformat/allformats.c
22 22
#include "rtp_internal.h"
23 23
#include "rdt.h"
24 24

  
25
#define REGISTER_MUXER(X,x) { \
26
          extern AVOutputFormat x##_muxer; \
27
          if(ENABLE_##X##_MUXER)   av_register_output_format(&x##_muxer); }
28
#define REGISTER_DEMUXER(X,x) { \
29
          extern AVInputFormat x##_demuxer; \
30
          if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
25
#define REGISTER_MUXER(X,x) { extern AVOutputFormat x##_muxer; \
26
    if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
27

  
28
#define REGISTER_DEMUXER(X,x) { extern AVInputFormat x##_demuxer; \
29
    if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
30

  
31 31
#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
32
#define REGISTER_PROTOCOL(X,x) { \
33
          extern URLProtocol x##_protocol; \
34
          if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
32

  
33
#define REGISTER_PROTOCOL(X,x) { extern URLProtocol x##_protocol; \
34
    if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
35 35

  
36 36
/* If you do not call this function, then you can select exactly which
37 37
   formats you want to support */
libavformat/avio.h
114 114
 * @return >= 0 on success
115 115
 * @see AVInputFormat::read_seek
116 116
 */
117
int64_t av_url_read_seek(URLContext *h,
118
                     int stream_index, int64_t timestamp, int flags);
117
int64_t av_url_read_seek(URLContext *h, int stream_index,
118
                         int64_t timestamp, int flags);
119 119

  
120 120
/**
121 121
 * Passing this as the "whence" parameter to a seek function causes it to
......
133 133
    int (*url_close)(URLContext *h);
134 134
    struct URLProtocol *next;
135 135
    int (*url_read_pause)(URLContext *h, int pause);
136
    int64_t (*url_read_seek)(URLContext *h,
137
                         int stream_index, int64_t timestamp, int flags);
136
    int64_t (*url_read_seek)(URLContext *h, int stream_index,
137
                             int64_t timestamp, int flags);
138 138
} URLProtocol;
139 139

  
140 140
extern URLProtocol *first_protocol;
......
170 170
    unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
171 171
    int error;         ///< contains the error code or 0 if no error happened
172 172
    int (*read_pause)(void *opaque, int pause);
173
    int64_t (*read_seek)(void *opaque,
174
                     int stream_index, int64_t timestamp, int flags);
173
    int64_t (*read_seek)(void *opaque, int stream_index,
174
                         int64_t timestamp, int flags);
175 175
} ByteIOContext;
176 176

  
177 177
int init_put_byte(ByteIOContext *s,
......
238 238
int url_ferror(ByteIOContext *s);
239 239

  
240 240
int av_url_read_fpause(ByteIOContext *h, int pause);
241
int64_t av_url_read_fseek(ByteIOContext *h,
242
                      int stream_index, int64_t timestamp, int flags);
241
int64_t av_url_read_fseek(ByteIOContext *h, int stream_index,
242
                          int64_t timestamp, int flags);
243 243

  
244 244
#define URL_EOF (-1)
245 245
/** @note return URL_EOF (-1) if EOF */
......
253 253
#endif
254 254

  
255 255
/** @note unlike fgets, the EOL character is not returned and a whole
256
   line is parsed. return NULL if first char read was EOF */
256
    line is parsed. return NULL if first char read was EOF */
257 257
char *url_fgets(ByteIOContext *s, char *buf, int buf_size);
258 258

  
259 259
void put_flush_packet(ByteIOContext *s);
......
274 274
int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size);
275 275

  
276 276
/** @note return 0 if EOF, so you cannot use it if EOF handling is
277
   necessary */
277
    necessary */
278 278
int get_byte(ByteIOContext *s);
279 279
unsigned int get_le24(ByteIOContext *s);
280 280
unsigned int get_le32(ByteIOContext *s);
......
295 295
}
296 296

  
297 297
/** @note when opened as read/write, the buffers are only used for
298
   writing */
298
    writing */
299 299
int url_fdopen(ByteIOContext **s, URLContext *h);
300 300

  
301 301
/** @warning must be called before any I/O */
......
307 307
int url_resetbuf(ByteIOContext *s, int flags);
308 308

  
309 309
/** @note when opened as read/write, the buffers are only used for
310
   writing */
310
    writing */
311 311
int url_fopen(ByteIOContext **s, const char *filename, int flags);
312 312
int url_fclose(ByteIOContext *s);
313 313
URLContext *url_fileno(ByteIOContext *s);
......
355 355
 */
356 356
int url_close_dyn_buf(ByteIOContext *s, uint8_t **pbuffer);
357 357

  
358
unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len);
358
unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf,
359
                                    unsigned int len);
359 360
unsigned long get_checksum(ByteIOContext *s);
360
void init_checksum(ByteIOContext *s, unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum);
361
void init_checksum(ByteIOContext *s,
362
                   unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
363
                   unsigned long checksum);
361 364

  
362 365
/* udp.c */
363 366
int udp_set_remote_url(URLContext *h, const char *uri);
libavformat/aviobuf.c
68 68
                  void *opaque,
69 69
                  int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
70 70
                  int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
71
                  int64_t (*seek)(void *opaque, int64_t offset, int whence)) {
71
                  int64_t (*seek)(void *opaque, int64_t offset, int whence))
72
{
72 73
    ByteIOContext *s = av_mallocz(sizeof(ByteIOContext));
73 74
    init_put_byte(s, buffer, buffer_size, write_flag, opaque,
74 75
                  read_packet, write_packet, seek);
......
322 323
    }
323 324
}
324 325

  
325
unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len){
326
unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf,
327
                                    unsigned int len)
328
{
326 329
    return av_crc(av_crc_get_table(AV_CRC_32_IEEE), checksum, buf, len);
327 330
}
328 331

  
329
unsigned long get_checksum(ByteIOContext *s){
332
unsigned long get_checksum(ByteIOContext *s)
333
{
330 334
    s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr);
331 335
    s->update_checksum= NULL;
332 336
    return s->checksum;
333 337
}
334 338

  
335
void init_checksum(ByteIOContext *s, unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum){
339
void init_checksum(ByteIOContext *s,
340
                   unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
341
                   unsigned long checksum)
342
{
336 343
    s->update_checksum= update_checksum;
337 344
    if(s->update_checksum){
338 345
        s->checksum= checksum;
......
665 672
    return s->read_pause(s->opaque, pause);
666 673
}
667 674

  
668
int64_t av_url_read_fseek(ByteIOContext *s,
669
        int stream_index, int64_t timestamp, int flags)
675
int64_t av_url_read_fseek(ByteIOContext *s, int stream_index,
676
                          int64_t timestamp, int flags)
670 677
{
671 678
    URLContext *h = s->opaque;
672 679
    int64_t ret;

Also available in: Unified diff