changeset 2477:d802e4390b2c libavformat

Doxygenize some comments
author conrad
date Wed, 05 Sep 2007 00:24:25 +0000
parents 4121545128f3
children b2dc0bc246f9
files matroskaenc.c
diffstat 1 files changed, 22 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/matroskaenc.c	Wed Sep 05 00:24:22 2007 +0000
+++ b/matroskaenc.c	Wed Sep 05 00:24:25 2007 +0000
@@ -130,7 +130,12 @@
     put_ebml_binary(pb, elementid, str, strlen(str));
 }
 
-// this reserves exactly the amount of space specified by size, which must be at least 2
+/**
+ * Writes a void element of a given size. Useful for reserving space in the file to be
+ * written to later.
+ *
+ * @param size The amount of space to reserve, which must be at least 2.
+ */
 static void put_ebml_void(ByteIOContext *pb, uint64_t size)
 {
     offset_t currentpos = url_ftell(pb);
@@ -174,10 +179,15 @@
     put_byte(pb, size % 255);
 }
 
-// initializes a mkv_seekhead element to be ready to index level 1 matroska elements
-// if numelements is greater than 0, it reserves enough space for that many elements
-// at the current file position and writes the seekhead there, otherwise the seekhead
-// will be appended to the file when end_mkv_seekhead() is called
+/**
+ * Initialize a mkv_seekhead element to be ready to index level 1 Matroska elements.
+ * If a maximum number of elements is specified, enough space will be reserved at
+ * the current file location to write a seek head of that size.
+ *
+ * @param segment_offset the absolute offset into the file that the segment begins
+ * @param numelements the maximum number of elements that will be indexed by this
+ *                    seek head, 0 if unlimited.
+ */
 static mkv_seekhead * mkv_start_seekhead(ByteIOContext *pb, offset_t segment_offset, int numelements)
 {
     mkv_seekhead *new_seekhead = av_mallocz(sizeof(mkv_seekhead));
@@ -220,7 +230,13 @@
     return 0;
 }
 
-// returns the file offset where the seekhead was written and frees the seekhead
+/**
+ * Write the seek head to the file and free it. If a maximum number of elements was
+ * specified to mkv_start_seekhead(), the seek head will be written at the location
+ * reserved for it. Otherwise, it is written at the current location in the file.
+ *
+ * @return the file offset where the seekhead was written
+ */
 static offset_t mkv_write_seekhead(ByteIOContext *pb, mkv_seekhead *seekhead)
 {
     offset_t metaseek, seekentry, currentpos;