diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-20 11:04:12 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-20 08:37:15 -0500 |
commit | ae628ec1fd7f54c102bf9e667a3edd404b9b9128 (patch) | |
tree | e23e5873e32189d50147e7a73956e326f3f1e407 /libavformat/nutenc.c | |
parent | 70aa916e4630bcec14439a2d703074b6d4c890a8 (diff) | |
download | ffmpeg-ae628ec1fd7f54c102bf9e667a3edd404b9b9128.tar.gz |
avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r-- | libavformat/nutenc.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 288e4bd4d8..ce7d6522a9 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -241,7 +241,7 @@ static void build_frame_code(AVFormatContext *s){ nut->frame_code['N'].flags= FLAG_INVALID; } -static void put_tt(NUTContext *nut, StreamContext *nus, ByteIOContext *bc, uint64_t val){ +static void put_tt(NUTContext *nut, StreamContext *nus, AVIOContext *bc, uint64_t val){ val *= nut->time_base_count; val += nus->time_base - nut->time_base; ff_put_v(bc, val); @@ -250,25 +250,25 @@ static void put_tt(NUTContext *nut, StreamContext *nus, ByteIOContext *bc, uint6 /** * Store a string as vb. */ -static void put_str(ByteIOContext *bc, const char *string){ +static void put_str(AVIOContext *bc, const char *string){ int len= strlen(string); ff_put_v(bc, len); put_buffer(bc, string, len); } -static void put_s(ByteIOContext *bc, int64_t val){ +static void put_s(AVIOContext *bc, int64_t val){ ff_put_v(bc, 2*FFABS(val) - (val>0)); } #ifdef TRACE -static inline void ff_put_v_trace(ByteIOContext *bc, uint64_t v, char *file, char *func, int line){ +static inline void ff_put_v_trace(AVIOContext *bc, uint64_t v, char *file, char *func, int line){ av_log(NULL, AV_LOG_DEBUG, "ff_put_v %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); ff_put_v(bc, v); } -static inline void put_s_trace(ByteIOContext *bc, int64_t v, char *file, char *func, int line){ +static inline void put_s_trace(AVIOContext *bc, int64_t v, char *file, char *func, int line){ av_log(NULL, AV_LOG_DEBUG, "put_s %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); put_s(bc, v); @@ -278,7 +278,7 @@ static inline void put_s_trace(ByteIOContext *bc, int64_t v, char *file, char *f #endif //FIXME remove calculate_checksum -static void put_packet(NUTContext *nut, ByteIOContext *bc, ByteIOContext *dyn_bc, int calculate_checksum, uint64_t startcode){ +static void put_packet(NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc, int calculate_checksum, uint64_t startcode){ uint8_t *dyn_buf=NULL; int dyn_size= url_close_dyn_buf(dyn_bc, &dyn_buf); int forw_ptr= dyn_size + 4*calculate_checksum; @@ -299,7 +299,7 @@ static void put_packet(NUTContext *nut, ByteIOContext *bc, ByteIOContext *dyn_bc av_free(dyn_buf); } -static void write_mainheader(NUTContext *nut, ByteIOContext *bc){ +static void write_mainheader(NUTContext *nut, AVIOContext *bc){ int i, j, tmp_pts, tmp_flags, tmp_stream, tmp_mul, tmp_size, tmp_fields, tmp_head_idx; int64_t tmp_match; @@ -370,7 +370,7 @@ static void write_mainheader(NUTContext *nut, ByteIOContext *bc){ } } -static int write_streamheader(AVFormatContext *avctx, ByteIOContext *bc, AVStream *st, int i){ +static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream *st, int i){ NUTContext *nut = avctx->priv_data; AVCodecContext *codec = st->codec; ff_put_v(bc, i); @@ -422,17 +422,17 @@ static int write_streamheader(AVFormatContext *avctx, ByteIOContext *bc, AVStrea return 0; } -static int add_info(ByteIOContext *bc, const char *type, const char *value){ +static int add_info(AVIOContext *bc, const char *type, const char *value){ put_str(bc, type); put_s(bc, -1); put_str(bc, value); return 1; } -static int write_globalinfo(NUTContext *nut, ByteIOContext *bc){ +static int write_globalinfo(NUTContext *nut, AVIOContext *bc){ AVFormatContext *s= nut->avf; AVMetadataTag *t = NULL; - ByteIOContext *dyn_bc; + AVIOContext *dyn_bc; uint8_t *dyn_buf=NULL; int count=0, dyn_size; int ret = url_open_dyn_buf(&dyn_bc); @@ -455,10 +455,10 @@ static int write_globalinfo(NUTContext *nut, ByteIOContext *bc){ return 0; } -static int write_streaminfo(NUTContext *nut, ByteIOContext *bc, int stream_id){ +static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id){ AVFormatContext *s= nut->avf; AVStream* st = s->streams[stream_id]; - ByteIOContext *dyn_bc; + AVIOContext *dyn_bc; uint8_t *dyn_buf=NULL; int count=0, dyn_size, i; int ret = url_open_dyn_buf(&dyn_bc); @@ -486,9 +486,9 @@ static int write_streaminfo(NUTContext *nut, ByteIOContext *bc, int stream_id){ return count; } -static int write_headers(AVFormatContext *avctx, ByteIOContext *bc){ +static int write_headers(AVFormatContext *avctx, AVIOContext *bc){ NUTContext *nut = avctx->priv_data; - ByteIOContext *dyn_bc; + AVIOContext *dyn_bc; int i, ret; ff_metadata_conv_ctx(avctx, ff_nut_metadata_conv, NULL); @@ -537,7 +537,7 @@ static int write_headers(AVFormatContext *avctx, ByteIOContext *bc){ static int write_header(AVFormatContext *s){ NUTContext *nut = s->priv_data; - ByteIOContext *bc = s->pb; + AVIOContext *bc = s->pb; int i, j, ret; nut->avf= s; @@ -628,7 +628,7 @@ static int find_best_header_idx(NUTContext *nut, AVPacket *pkt){ static int write_packet(AVFormatContext *s, AVPacket *pkt){ NUTContext *nut = s->priv_data; StreamContext *nus= &nut->stream[pkt->stream_index]; - ByteIOContext *bc = s->pb, *dyn_bc; + AVIOContext *bc = s->pb, *dyn_bc; FrameCode *fc; int64_t coded_pts; int best_length, frame_code, flags, needed_flags, i, header_idx, best_header_idx; @@ -781,7 +781,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){ static int write_trailer(AVFormatContext *s){ NUTContext *nut= s->priv_data; - ByteIOContext *bc= s->pb; + AVIOContext *bc= s->pb; while(nut->header_count<3) write_headers(s, bc); |