X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fecdec_filter.c;h=6bb827c83fde8f9bf12a393324af909d9205037f;hp=a17ddf7cf6fff85192d6b49cc0c56b286fe45610;hb=36bc7580a5ddee8f6e46bccfea7519291f372f0f;hpb=c19a0921ea3a8cd9d0e35cb2b09748c3f9f607ef diff --git a/fecdec_filter.c b/fecdec_filter.c index a17ddf7c..6bb827c8 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -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; };