diff gxfenc.c @ 2282:47f5906c30cc libavformat

replaces hardcoded values by the equivalent enum definitions
author aurel
date Thu, 26 Jul 2007 13:01:09 +0000
parents 708e6e93d6f2
children be2b786dc550
line wrap: on
line diff
--- a/gxfenc.c	Wed Jul 25 20:39:43 2007 +0000
+++ b/gxfenc.c	Thu Jul 26 13:01:09 2007 +0000
@@ -187,7 +187,7 @@
                     (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 @@
     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 @@
 
     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 @@
     }
 
     /* file system version */
-    put_byte(pb, 0x4E);
+    put_byte(pb, TRACK_VER);
     put_byte(pb, 4);
     put_be32(pb, 0);
 
@@ -242,17 +242,17 @@
         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 @@
         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);