|
libdvbpsi
2.0.0-git
MPEG Transport Stream PSI table parser
|
Common descriptor tools. More...
Go to the source code of this file.
Data Structures | |
| struct | dvbpsi_descriptor_s |
| Descriptor structure. More... | |
Typedefs | |
| typedef uint8_t | iso_639_language_code_t[3] |
| ISO639 three letter language codes. | |
| typedef struct dvbpsi_descriptor_s | dvbpsi_descriptor_t |
| dvbpsi_descriptor_t type definition. More... | |
Functions | |
| dvbpsi_descriptor_t * | dvbpsi_NewDescriptor (uint8_t i_tag, uint8_t i_length, uint8_t *p_data) |
| Creation of a new dvbpsi_descriptor_t structure. More... | |
| void | dvbpsi_DeleteDescriptors (dvbpsi_descriptor_t *p_descriptor) |
| Destruction of a dvbpsi_descriptor_t structure together with the decoded descriptor, if present. More... | |
| dvbpsi_descriptor_t * | dvbpsi_AddDescriptor (dvbpsi_descriptor_t *p_list, dvbpsi_descriptor_t *p_descriptor) |
| Add a descriptor to the end of descriptor list. More... | |
| bool | dvbpsi_CanDecodeAsDescriptor (dvbpsi_descriptor_t *p_descriptor, const uint8_t i_tag) |
| Checks if descriptor tag matches. More... | |
| bool | dvbpsi_IsDescriptorDecoded (dvbpsi_descriptor_t *p_descriptor) |
| Checks if descriptor was already decoded. More... | |
| void * | dvbpsi_DuplicateDecodedDescriptor (void *p_decoded, ssize_t i_size) |
| Duplicate a decoded descriptor. The caller is responsible for releasing the associated memory. More... | |
Common descriptor tools.
>
Descriptor structure and its Manipulation tools.
NOTE: Descriptor generators and decoder functions return a pointer on success and NULL on error. They do not use a dvbpsi_t handle as first argument.
dvbpsi_descriptor_t type definition.
The common descriptor header and its payload is contained in this structure. The payload is the raw descriptor data and its interpretation depends on the the p_descriptor::i_tag value.
After passing the descriptor to a dvbpsi_DecodeXXXXDr function the raw descriptor data is interpreted and decoded into a descriptor specific structure. This structure is stored in the p_descriptor::p_decoded member by the dvbpsi_DecodeXXXXDr function.
NOTE: It is mandatory to add a decoded descriptor to the 'p_decoded' member of this struct. Failing to do so will result in memory leakage when deleting descriptor with
| dvbpsi_descriptor_t * dvbpsi_AddDescriptor | ( | dvbpsi_descriptor_t * | p_list, |
| dvbpsi_descriptor_t * | p_descriptor | ||
| ) |
Add a descriptor to the end of descriptor list.
| p_list | the first descriptor in the descriptor list. |
| p_descriptor | the descriptor to add to the list |
| bool dvbpsi_CanDecodeAsDescriptor | ( | dvbpsi_descriptor_t * | p_descriptor, |
| const uint8_t | i_tag | ||
| ) |
Checks if descriptor tag matches.
| p_descriptor | pointer to descriptor allocated with |
| i_tag | descriptor tag to evaluate against |
| void dvbpsi_DeleteDescriptors | ( | dvbpsi_descriptor_t * | p_descriptor | ) |
Destruction of a dvbpsi_descriptor_t structure together with the decoded descriptor, if present.
| p_descriptor | pointer to the first descriptor structure |
| void * dvbpsi_DuplicateDecodedDescriptor | ( | void * | p_decoded, |
| ssize_t | i_size | ||
| ) |
Duplicate a decoded descriptor. The caller is responsible for releasing the associated memory.
| p_decoded | pointer to decoded descriptor obtained with dvbpsi_Decode* function |
| i_size | the sizeof decoded descriptor |
| bool dvbpsi_IsDescriptorDecoded | ( | dvbpsi_descriptor_t * | p_descriptor | ) |
Checks if descriptor was already decoded.
| p_descriptor | pointer to descriptor allocated with |
| dvbpsi_descriptor_t * dvbpsi_NewDescriptor | ( | uint8_t | i_tag, |
| uint8_t | i_length, | ||
| uint8_t * | p_data | ||
| ) |
Creation of a new dvbpsi_descriptor_t structure.
| i_tag | descriptor's tag |
| i_length | descriptor's length |
| p_data | descriptor's data |