X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fecdec_filter.c;h=6bb827c83fde8f9bf12a393324af909d9205037f;hp=721fc09443011c7bfcc53e2f655f171e9cef3d8c;hb=36bc7580a5ddee8f6e46bccfea7519291f372f0f;hpb=625c5cd993d07a63061a0788f174e12fa1c221e0 diff --git a/fecdec_filter.c b/fecdec_filter.c index 721fc094..6bb827c8 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -4,7 +4,7 @@ * 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 #include "para.h" @@ -18,21 +18,35 @@ #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 INPUT_BUFFER_SIZE 16384 -/** size of the output buffer */ +/** Size of the output buffer of the fecdec filter. */ #define FECDEC_OUTBUF_SIZE 81920 +/** Data read from the header of a slice. */ struct fec_header { + /** Total number of slices in this group. */ uint8_t slices_per_group; + /** Number of slices needed to start decoding. */ uint8_t data_slices_per_group; + /** Size of the ogg vorbis header (zero for mp3, aac). */ uint32_t audio_header_size; - + /** Number of the FEC group this slice belongs to. */ uint32_t group_num; + /** Size of the data in this FEC group. */ uint32_t group_bytes; - + /** Number of this slice in the group. */ uint8_t slice_num; + /** Used data bytes of this slice. */ uint16_t slice_bytes; };