whitespace cosmetics

Originally committed as revision 16100 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Diego Biurrun 16 years ago
parent bda4e3940a
commit 7f37f5687d
  1. 12
      libavformat/allformats.c
  2. 23
      libavformat/avio.h
  3. 19
      libavformat/aviobuf.c

@ -22,15 +22,15 @@
#include "rtp_internal.h" #include "rtp_internal.h"
#include "rdt.h" #include "rdt.h"
#define REGISTER_MUXER(X,x) { \ #define REGISTER_MUXER(X,x) { extern AVOutputFormat x##_muxer; \
extern AVOutputFormat x##_muxer; \
if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); } if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
#define REGISTER_DEMUXER(X,x) { \
extern AVInputFormat x##_demuxer; \ #define REGISTER_DEMUXER(X,x) { extern AVInputFormat x##_demuxer; \
if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); } if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x) #define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
#define REGISTER_PROTOCOL(X,x) { \
extern URLProtocol x##_protocol; \ #define REGISTER_PROTOCOL(X,x) { extern URLProtocol x##_protocol; \
if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); } if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
/* If you do not call this function, then you can select exactly which /* If you do not call this function, then you can select exactly which

@ -114,8 +114,8 @@ int av_url_read_pause(URLContext *h, int pause);
* @return >= 0 on success * @return >= 0 on success
* @see AVInputFormat::read_seek * @see AVInputFormat::read_seek
*/ */
int64_t av_url_read_seek(URLContext *h, int64_t av_url_read_seek(URLContext *h, int stream_index,
int stream_index, int64_t timestamp, int flags); int64_t timestamp, int flags);
/** /**
* Passing this as the "whence" parameter to a seek function causes it to * Passing this as the "whence" parameter to a seek function causes it to
@ -133,8 +133,8 @@ typedef struct URLProtocol {
int (*url_close)(URLContext *h); int (*url_close)(URLContext *h);
struct URLProtocol *next; struct URLProtocol *next;
int (*url_read_pause)(URLContext *h, int pause); int (*url_read_pause)(URLContext *h, int pause);
int64_t (*url_read_seek)(URLContext *h, int64_t (*url_read_seek)(URLContext *h, int stream_index,
int stream_index, int64_t timestamp, int flags); int64_t timestamp, int flags);
} URLProtocol; } URLProtocol;
extern URLProtocol *first_protocol; extern URLProtocol *first_protocol;
@ -170,8 +170,8 @@ typedef struct {
unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size); unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
int error; ///< contains the error code or 0 if no error happened int error; ///< contains the error code or 0 if no error happened
int (*read_pause)(void *opaque, int pause); int (*read_pause)(void *opaque, int pause);
int64_t (*read_seek)(void *opaque, int64_t (*read_seek)(void *opaque, int stream_index,
int stream_index, int64_t timestamp, int flags); int64_t timestamp, int flags);
} ByteIOContext; } ByteIOContext;
int init_put_byte(ByteIOContext *s, int init_put_byte(ByteIOContext *s,
@ -238,8 +238,8 @@ int url_feof(ByteIOContext *s);
int url_ferror(ByteIOContext *s); int url_ferror(ByteIOContext *s);
int av_url_read_fpause(ByteIOContext *h, int pause); int av_url_read_fpause(ByteIOContext *h, int pause);
int64_t av_url_read_fseek(ByteIOContext *h, int64_t av_url_read_fseek(ByteIOContext *h, int stream_index,
int stream_index, int64_t timestamp, int flags); int64_t timestamp, int flags);
#define URL_EOF (-1) #define URL_EOF (-1)
/** @note return URL_EOF (-1) if EOF */ /** @note return URL_EOF (-1) if EOF */
@ -355,9 +355,12 @@ int url_open_dyn_packet_buf(ByteIOContext **s, int max_packet_size);
*/ */
int url_close_dyn_buf(ByteIOContext *s, uint8_t **pbuffer); int url_close_dyn_buf(ByteIOContext *s, uint8_t **pbuffer);
unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len); unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf,
unsigned int len);
unsigned long get_checksum(ByteIOContext *s); 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); void init_checksum(ByteIOContext *s,
unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
unsigned long checksum);
/* udp.c */ /* udp.c */
int udp_set_remote_url(URLContext *h, const char *uri); int udp_set_remote_url(URLContext *h, const char *uri);

@ -68,7 +68,8 @@ ByteIOContext *av_alloc_put_byte(
void *opaque, void *opaque,
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
int64_t (*seek)(void *opaque, int64_t offset, int whence)) { int64_t (*seek)(void *opaque, int64_t offset, int whence))
{
ByteIOContext *s = av_mallocz(sizeof(ByteIOContext)); ByteIOContext *s = av_mallocz(sizeof(ByteIOContext));
init_put_byte(s, buffer, buffer_size, write_flag, opaque, init_put_byte(s, buffer, buffer_size, write_flag, opaque,
read_packet, write_packet, seek); read_packet, write_packet, seek);
@ -322,17 +323,23 @@ static void fill_buffer(ByteIOContext *s)
} }
} }
unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len){ unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf,
unsigned int len)
{
return av_crc(av_crc_get_table(AV_CRC_32_IEEE), checksum, buf, len); return av_crc(av_crc_get_table(AV_CRC_32_IEEE), checksum, buf, len);
} }
unsigned long get_checksum(ByteIOContext *s){ unsigned long get_checksum(ByteIOContext *s)
{
s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr); s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr);
s->update_checksum= NULL; s->update_checksum= NULL;
return s->checksum; return s->checksum;
} }
void init_checksum(ByteIOContext *s, unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum){ void init_checksum(ByteIOContext *s,
unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
unsigned long checksum)
{
s->update_checksum= update_checksum; s->update_checksum= update_checksum;
if(s->update_checksum){ if(s->update_checksum){
s->checksum= checksum; s->checksum= checksum;
@ -665,8 +672,8 @@ int av_url_read_fpause(ByteIOContext *s, int pause)
return s->read_pause(s->opaque, pause); return s->read_pause(s->opaque, pause);
} }
int64_t av_url_read_fseek(ByteIOContext *s, int64_t av_url_read_fseek(ByteIOContext *s, int stream_index,
int stream_index, int64_t timestamp, int flags) int64_t timestamp, int flags)
{ {
URLContext *h = s->opaque; URLContext *h = s->opaque;
int64_t ret; int64_t ret;

Loading…
Cancel
Save