libdvbpsi
2.0.0-git
MPEG Transport Stream PSI table parser
|
Each application requires a handle to the dvbpsi library. The function dvbpsi_new(&message_cb, DVBPSI_MSG_DEBUG) will return a handle. All error, warning or debug messages will trigger the message_cb function. Unless DVBPSI_MSG_NONE is passed to dvbpsi_new(). For each dvbpsi_XXX_attach() function a unique dvbpsi handle must be used.
A dvbpsi handle must be passed to an dvbpsi_XXX_attach() function which attaches a decoder to the (dvbpsi_t*)->p_decoder pointer. The dvbpsi_XXX_attach() function where XXX is the name of the table (ex: dvbpsi_pat_attach()). The function returns the dvbpsi handle with the new decoder attached decoder.
Then the application has to send the TS packets needed by the decoder by calling the dvbpsi_packet_push() function. If a new table is complete then the decoder calls the callback specified by the application when it called dvbpsi_XXX_attach().
When the application don't need the decoder anymore it just has to call the dvbpsi_XXX_detach() function (ex: dvbpsi_pat_detach()). The dvbpsi handle must be released by calling dvbpsi_delete(). At the time of calling the decoder must already have been detached.
Look at the header files for specific table, see the list below:
See also: