aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-22 08:02:25 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-22 08:02:25 -0300
commite00882e9ea74ae158c4ba60a6676db5ce4865f6a (patch)
tree2f44a4c057bfe177ff38bd6b0b1a41e82878acfd
parent04599a8eb60276e24f94ba4ce97ed9580e292b03 (diff)
libdvbv5: add documentation for cable delivery system descriptor
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--doxygen_libdvbv5.cfg1
-rw-r--r--lib/include/libdvbv5/desc_ca_identifier.h3
-rw-r--r--lib/include/libdvbv5/desc_cable_delivery.h71
3 files changed, 69 insertions, 6 deletions
diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg
index 367b7d79..f940d57a 100644
--- a/doxygen_libdvbv5.cfg
+++ b/doxygen_libdvbv5.cfg
@@ -770,6 +770,7 @@ INPUT = $(SRCDIR)/doc/libdvbv5-index.doc \
$(SRCDIR)/lib/include/libdvbv5/desc_atsc_service_location.h \
$(SRCDIR)/lib/include/libdvbv5/desc_ca.h \
$(SRCDIR)/lib/include/libdvbv5/desc_ca_identifier.h \
+ $(SRCDIR)/lib/include/libdvbv5/desc_cable_delivery.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_ca_identifier.h b/lib/include/libdvbv5/desc_ca_identifier.h
index c774f59b..75c6b719 100644
--- a/lib/include/libdvbv5/desc_ca_identifier.h
+++ b/lib/include/libdvbv5/desc_ca_identifier.h
@@ -24,15 +24,12 @@
* @ingroup descriptors
* @brief Provides the descriptors for the Conditional Access identifier
* @copyright GNU General Public License version 2 (GPLv2)
- * @author Mauro Carvalho Chehab
* @author Andre Roth
*
* @par Relevant specs
* The descriptor described herein is defined at:
* - ETSI EN 300 468 V1.11.1 (2010-04)
*
- * @see
- *
* @par Bug Report
* Please submit bug reports and patches to linux-media@vger.kernel.org
*/
diff --git a/lib/include/libdvbv5/desc_cable_delivery.h b/lib/include/libdvbv5/desc_cable_delivery.h
index f327ece5..162acbeb 100644
--- a/lib/include/libdvbv5/desc_cable_delivery.h
+++ b/lib/include/libdvbv5/desc_cable_delivery.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2012 - Mauro Carvalho Chehab
+ * Copyright (c) 2011-2014 - Mauro Carvalho Chehab
* Copyright (c) 2012 - Andre Roth <neolynx@gmail.com>
*
* This program is free software; you can redistribute it and/or
@@ -20,11 +20,41 @@
* Described at ETSI EN 300 468 V1.11.1 (2010-04)
*/
+/**
+ * @file desc_cable_delivery.h
+ * @ingroup descriptors
+ * @brief Provides the descriptors for the cable delivery system descriptor
+ * @copyright GNU General Public License version 2 (GPLv2)
+ * @author Mauro Carvalho Chehab
+ * @author Andre Roth
+ *
+ * @par Relevant specs
+ * The descriptor described herein is defined at:
+ * - ETSI EN 300 468 V1.11.1 (2010-04)
+ *
+ * @par Bug Report
+ * Please submit bug reports and patches to linux-media@vger.kernel.org
+ */
+
#ifndef _CABLE_DELIVERY_H
#define _CABLE_DELIVERY_H
#include <libdvbv5/descriptors.h>
+/**
+ * @struct dvb_desc_cable_delivery
+ * @ingroup descriptors
+ * @brief structure containing the cable delivery system descriptor
+ *
+ * @param type descriptor tag
+ * @param length descriptor length
+ * @param next pointer to struct dvb_desc
+ * @param frequency frequency, converted to Hz.
+ * @param fec_outer FEC outer (typically, Viterbi)
+ * @param modulation modulation
+ * @param fec_inner FEC inner (convolutional code)
+ * @param symbol_rate symbol rate, converted to symbols/sec (bauds)
+ */
struct dvb_desc_cable_delivery {
uint8_t type;
uint8_t length;
@@ -54,10 +84,45 @@ struct dvb_v5_fe_parms;
extern "C" {
#endif
-int dvb_desc_cable_delivery_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc);
-void dvb_desc_cable_delivery_print(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc);
+/**
+ * @brief Initializes and parses the service location 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 initializes and makes sure that all fields will follow the CPU
+ * endianness. Due to that, the content of the buffer may change.
+ *
+ * Currently, no memory is allocated internally.
+ *
+ * @return On success, it returns the size of the allocated struct.
+ * A negative value indicates an error.
+ */
+int dvb_desc_cable_delivery_init(struct dvb_v5_fe_parms *parms,
+ const uint8_t *buf, struct dvb_desc *desc);
+
+/**
+ * @brief Prints the content of the service location 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_cable_delivery_print(struct dvb_v5_fe_parms *parms,
+ const struct dvb_desc *desc);
+/**
+ * @brief converts from the descriptor's modulation into enum fe_modulation,
+ * as defined by DVBv5 API.
+ */
extern const unsigned dvbc_modulation_table[];
+
+/**
+ * @brief converts from the descriptor's FEC into enum fe_code_rate,
+ * as defined by DVBv5 API.
+ */
extern const unsigned dvbc_fec_table[];

Privacy Policy