diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-22 11:18:41 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-22 11:18:41 -0300 |
commit | e602c144fc7236ecde29110e3ba42cf56382a46d (patch) | |
tree | 1890ca7018411b76011a7c193b7d68a430af79ed | |
parent | a8c1861f114f4c572e106dcc57b6c6ab91a08ae1 (diff) |
libdvbv5: Add description for the LCN descriptor
This descriptor comes from IEC/CENELEC DS/EN 62216-1:201,
and it is used on several places, as a way to represent the
virtual channels.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | doxygen_libdvbv5.cfg | 1 | ||||
-rw-r--r-- | lib/include/libdvbv5/desc_logical_channel.h | 73 |
2 files changed, 72 insertions, 2 deletions
diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg index dd8ba343..7ffd00fd 100644 --- a/doxygen_libdvbv5.cfg +++ b/doxygen_libdvbv5.cfg @@ -778,6 +778,7 @@ INPUT = $(SRCDIR)/doc/libdvbv5-index.doc \ $(SRCDIR)/lib/include/libdvbv5/desc_hierarchy.h \ $(SRCDIR)/lib/include/libdvbv5/desc_isdbt_delivery.h \ $(SRCDIR)/lib/include/libdvbv5/desc_language.h \ + $(SRCDIR)/lib/include/libdvbv5/desc_logical_channel.h \ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/lib/include/libdvbv5/desc_logical_channel.h b/lib/include/libdvbv5/desc_logical_channel.h index 9b02dd18..69d263d9 100644 --- a/lib/include/libdvbv5/desc_logical_channel.h +++ b/lib/include/libdvbv5/desc_logical_channel.h @@ -22,11 +22,38 @@ * http://tdt.telecom.pt/recursos/apresentacoes/Signalling Specifications for DTT deployment in Portugal.pdf */ +/** + * @file desc_logical_channel.h + * @ingroup descriptors + * @brief Provides the descriptors for the LCN - Logican Channel Number + * @copyright GNU General Public License version 2 (GPLv2) + * @author Mauro Carvalho Chehab + * + * @par Relevant specs + * The descriptor described herein is defined at: + * - IEC/CENELEC DS/EN 62216-1:2011 + * + * @see http://tdt.telecom.pt/recursos/apresentacoes/Signalling Specifications for DTT deployment in Portugal.pdf + * + * @par Bug Report + * Please submit bug reports and patches to linux-media@vger.kernel.org + */ + #ifndef _LCN_DESC_H #define _LCN_DESC_H #include <libdvbv5/descriptors.h> +/** + * @struct dvb_desc_logical_channel_number + * @ingroup descriptors + * @brief Structure containing the logical channel number entires + * + * @param service_id service id + * @param visible_service_flag visible service flag + * @param logical_channel_number logical channel number + */ + struct dvb_desc_logical_channel_number { uint16_t service_id; union { @@ -39,6 +66,16 @@ struct dvb_desc_logical_channel_number { } __attribute__((packed)); } __attribute__((packed)); +/** + * @struct dvb_desc_logical_channel + * @ingroup descriptors + * @brief Structure containing the logical channel number descriptor + * + * @param type descriptor tag + * @param length descriptor length + * @param next pointer to struct dvb_desc + * @param lcn pointer to struct dvb_desc_logical_channel_number + */ struct dvb_desc_logical_channel { uint8_t type; uint8_t length; @@ -53,8 +90,40 @@ struct dvb_v5_fe_parms; extern "C" { #endif -int dvb_desc_logical_channel_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc); -void dvb_desc_logical_channel_print(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc); +/** + * @brief Initializes and parses the logical channel number descriptor + * @ingroup descriptors + * + * @param parms struct dvb_v5_fe_parms pointer to the opened device + * @param buf buffer containing the descriptor's raw data + * @param desc pointer to struct dvb_desc to be allocated and filled + * + * This function allocates a the descriptor and fills the fields inside + * the struct. It also makes sure that all fields will follow the CPU + * endianness. Due to that, the content of the buffer may change. + * + * @return On success, it returns the size of the allocated struct. + * A negative value indicates an error. + */ +int dvb_desc_logical_channel_init(struct dvb_v5_fe_parms *parms, + const uint8_t *buf, struct dvb_desc *desc); + +/** + * @brief Prints the content of the logical channel number descriptor + * @ingroup descriptors + * + * @param parms struct dvb_v5_fe_parms pointer to the opened device + * @param desc pointer to struct dvb_desc + */ +void dvb_desc_logical_channel_print(struct dvb_v5_fe_parms *parms, + const struct dvb_desc *desc); + +/** + * @brief Frees all data allocated by the logical channel number descriptor + * @ingroup descriptors + * + * @param desc pointer to struct dvb_desc to be freed + */ void dvb_desc_logical_channel_free(struct dvb_desc *desc); #ifdef __cplusplus |