]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - fecdec_filter.c
Add some more FEC source code documentation.
[paraslash.git] / fecdec_filter.c
index 721fc09443011c7bfcc53e2f655f171e9cef3d8c..6bb827c83fde8f9bf12a393324af909d9205037f 100644 (file)
@@ -4,7 +4,7 @@
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
-/** \file fecdev_filter.c A filter fec-decodes an audio stream. */
+/** \file fecdec_filter.c A filter fec-decodes an audio stream. */
 
 #include <dirent.h>
 #include "para.h"
 
 #include <dirent.h>
 #include "para.h"
 #include "fec.h"
 #include "fd.h"
 
 #include "fec.h"
 #include "fd.h"
 
+/**
+ * How many FEC groups to store in memory.
+ *
+ * Packet reordering requires to keep more than one FEC group in memory because
+ * slices belonging to the next FEC group may arrive before the current FEC group
+ * is complete.
+ */
 #define NUM_FEC_GROUPS 3
 #define NUM_FEC_GROUPS 3
+
 #define INPUT_BUFFER_SIZE 16384
 
 #define INPUT_BUFFER_SIZE 16384
 
-/** size of the output buffer */
+/** Size of the output buffer of the fecdec filter. */
 #define FECDEC_OUTBUF_SIZE 81920
 
 #define FECDEC_OUTBUF_SIZE 81920
 
+/** Data read from the header of a slice. */
 struct fec_header {
 struct fec_header {
+       /** Total number of slices in this group. */
        uint8_t slices_per_group;
        uint8_t slices_per_group;
+       /** Number of slices needed to start decoding. */
        uint8_t data_slices_per_group;
        uint8_t data_slices_per_group;
+       /** Size of the ogg vorbis header (zero for mp3, aac). */
        uint32_t audio_header_size;
        uint32_t audio_header_size;
-
+       /** Number of the FEC group this slice belongs to. */
        uint32_t group_num;
        uint32_t group_num;
+       /** Size of the data in this FEC group. */
        uint32_t group_bytes;
        uint32_t group_bytes;
-
+       /** Number of this slice in the group. */
        uint8_t slice_num;
        uint8_t slice_num;
+       /** Used data bytes of this slice. */
        uint16_t slice_bytes;
 };
 
        uint16_t slice_bytes;
 };