The PSI decoder and the specific decoder:
Each decoder is split into two entities:
The reason of this split is that each PSI section has a common format. The main task of the PSI decoder is to get the TS packets given by the application and send complete PSI sections to the specific decoder. The PSI decoder must be reliable on TS discontinuities and signal them to the specific decoder.
The task of the specific decoder is to get the PSI sections given by the PSI decoder, to build complete tables and to send them back to the application. At the same time it has to check TS discontinuities signaled by the PSI decoder.
The PSI decoder is common to all the decoders wheras the specific decoder must be implemented for all the PSI tables.