diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-07-26 13:01:09 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-07-26 13:01:09 +0000 |
commit | b1dc5beb1278bd35316fe52a0fd38921a14bacb0 (patch) | |
tree | dfd128b2e8245293ba5e22bbc25351760aa09041 /libavformat/gxfenc.c | |
parent | 4d8243d362c3b48ad0a7a562ce52a2b744a2b2c5 (diff) | |
download | ffmpeg-b1dc5beb1278bd35316fe52a0fd38921a14bacb0.tar.gz |
replaces hardcoded values by the equivalent enum definitions
Originally committed as revision 9801 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/gxfenc.c')
-rw-r--r-- | libavformat/gxfenc.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index c6ad97fd5d..2008e8e68a 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -187,7 +187,7 @@ static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx) (float)ctx->codec->bit_rate, ctx->p_per_gop, ctx->b_per_gop, ctx->codec->pix_fmt == PIX_FMT_YUV422P ? 2 : 1, ctx->first_gop_closed == 1, ctx->codec->height / 16); - put_byte(pb, 0x4F); + put_byte(pb, TRACK_MPG_AUX); put_byte(pb, size + 1); put_buffer(pb, (uint8_t *)buffer, size + 1); return size + 3; @@ -217,7 +217,7 @@ static int gxf_write_track_description(ByteIOContext *pb, GXFStreamContext *stre put_be16(pb, 0); /* size */ /* media file name */ - put_byte(pb, 0x4C); + put_byte(pb, TRACK_NAME); put_byte(pb, strlen(ES_NAME_PATTERN) + 3); put_tag(pb, ES_NAME_PATTERN); put_be16(pb, stream->media_info); @@ -225,7 +225,7 @@ static int gxf_write_track_description(ByteIOContext *pb, GXFStreamContext *stre if (stream->codec->codec_id != CODEC_ID_MPEG2VIDEO) { /* auxiliary information */ - put_byte(pb, 0x4D); + put_byte(pb, TRACK_AUX); put_byte(pb, 8); if (stream->codec->codec_id == CODEC_ID_NONE) gxf_write_timecode_auxiliary(pb, stream); @@ -234,7 +234,7 @@ static int gxf_write_track_description(ByteIOContext *pb, GXFStreamContext *stre } /* file system version */ - put_byte(pb, 0x4E); + put_byte(pb, TRACK_VER); put_byte(pb, 4); put_be32(pb, 0); @@ -242,17 +242,17 @@ static int gxf_write_track_description(ByteIOContext *pb, GXFStreamContext *stre gxf_write_mpeg_auxiliary(pb, stream); /* frame rate */ - put_byte(pb, 0x50); + put_byte(pb, TRACK_FPS); put_byte(pb, 4); put_be32(pb, stream->frame_rate_index); /* lines per frame */ - put_byte(pb, 0x51); + put_byte(pb, TRACK_LINES); put_byte(pb, 4); put_be32(pb, stream->lines_index); /* fields per frame */ - put_byte(pb, 0x52); + put_byte(pb, TRACK_FPF); put_byte(pb, 4); put_be32(pb, stream->fields); @@ -272,33 +272,33 @@ static int gxf_write_material_data_section(ByteIOContext *pb, GXFContext *ctx) filename++; else filename = ctx->fc->filename; - put_byte(pb, 0x40); + put_byte(pb, MAT_NAME); put_byte(pb, strlen(SERVER_PATH) + strlen(filename) + 1); put_tag(pb, SERVER_PATH); put_tag(pb, filename); put_byte(pb, 0); /* first field */ - put_byte(pb, 0x41); + put_byte(pb, MAT_FIRST_FIELD); put_byte(pb, 4); put_be32(pb, 0); /* last field */ - put_byte(pb, 0x42); + put_byte(pb, MAT_LAST_FIELD); put_byte(pb, 4); put_be32(pb, ctx->nb_frames); /* reserved */ - put_byte(pb, 0x43); + put_byte(pb, MAT_MARK_IN); put_byte(pb, 4); put_be32(pb, 0); - put_byte(pb, 0x44); + put_byte(pb, MAT_MARK_OUT); put_byte(pb, 4); put_be32(pb, ctx->nb_frames); /* estimated size */ - put_byte(pb, 0x45); + put_byte(pb, MAT_SIZE); put_byte(pb, 4); put_be32(pb, url_fsize(pb) / 1024); |