aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doxygen_libdvbv5.cfg2
-rw-r--r--lib/include/libdvbv5/atsc_eit.h2
-rw-r--r--lib/include/libdvbv5/atsc_header.h18
-rw-r--r--lib/include/libdvbv5/cat.h59
4 files changed, 76 insertions, 5 deletions
diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg
index c3df20c6..55450828 100644
--- a/doxygen_libdvbv5.cfg
+++ b/doxygen_libdvbv5.cfg
@@ -753,7 +753,9 @@ INPUT = $(SRCDIR)/doc/libdvbv5-index.doc \
$(SRCDIR)/lib/include/libdvbv5/dvb-v5-std.h \
$(SRCDIR)/lib/include/libdvbv5/descriptors.h \
$(SRCDIR)/lib/include/libdvbv5/header.h \
+ $(SRCDIR)/lib/include/libdvbv5/atsc_header.h \
$(SRCDIR)/lib/include/libdvbv5/atsc_eit.h \
+ $(SRCDIR)/lib/include/libdvbv5/cat.h \
$(SRCDIR)/lib/include/libdvbv5/eit.h \
$(SRCDIR)/lib/include/libdvbv5/nit.h \
$(SRCDIR)/lib/include/libdvbv5/pat.h \
diff --git a/lib/include/libdvbv5/atsc_eit.h b/lib/include/libdvbv5/atsc_eit.h
index a6219d94..2be3578a 100644
--- a/lib/include/libdvbv5/atsc_eit.h
+++ b/lib/include/libdvbv5/atsc_eit.h
@@ -47,7 +47,7 @@
/**
* @def ATSC_TABLE_EIT
- * @brief ATSC EIT table ID for the actual TS
+ * @brief ATSC EIT table ID
*/
#define ATSC_TABLE_EIT 0xCB
diff --git a/lib/include/libdvbv5/atsc_header.h b/lib/include/libdvbv5/atsc_header.h
index 96bfc119..2c57d802 100644
--- a/lib/include/libdvbv5/atsc_header.h
+++ b/lib/include/libdvbv5/atsc_header.h
@@ -21,13 +21,28 @@
#ifndef _ATSC_HEADER_H
#define _ATSC_HEADER_H
+/**
+ * @file atsc_header.h
+ * @brief Provides some common ATSC stuff
+ * @copyright GNU General Public License version 2 (GPLv2)
+ * @author Andre Roth
+ *
+ * @par Bug Report
+ * Please submit bug reports and patches to linux-media@vger.kernel.org
+ */
+
#include <stdint.h>
#include <unistd.h> /* ssize_t */
#include <libdvbv5/header.h>
+/**
+ * @def ATSC_BASE_PID
+ * @brief ATSC PID for the Program and System Information Protocol
+ */
#define ATSC_BASE_PID 0x1FFB
+#ifndef _DOXYGEN
#define ATSC_HEADER() \
struct dvb_table_header header; \
uint8_t protocol_version; \
@@ -36,5 +51,6 @@
dvb_table_header_print(_parms, &_table->header); \
dvb_loginfo("| protocol_version %d", _table->protocol_version); \
+#endif /* _DOXYGEN */
-#endif
+#endif /* _ATSC_HEADER_H */
diff --git a/lib/include/libdvbv5/cat.h b/lib/include/libdvbv5/cat.h
index 134e3e5c..0b3375fe 100644
--- a/lib/include/libdvbv5/cat.h
+++ b/lib/include/libdvbv5/cat.h
@@ -18,6 +18,16 @@
*
*/
+/**
+ * @file cat.h
+ * @brief Provides the table parser for the CAT (Conditional Access Table)
+ * @copyright GNU General Public License version 2 (GPLv2)
+ * @author Andre Roth
+ *
+ * @par Bug Report
+ * Please submit bug reports and patches to linux-media@vger.kernel.org
+ */
+
#ifndef _CAT_H
#define _CAT_H
@@ -26,9 +36,22 @@
#include <libdvbv5/header.h>
+/**
+ * @def DVB_TABLE_CAT
+ * @brief ATSC CAT table ID
+ * @def DVB_TABLE_CAT_PID
+ * @brief ATSC PID table ID
+ */
#define DVB_TABLE_CAT 0x01
#define DVB_TABLE_CAT_PID 0x0001
+/**
+ * @struct dvb_table_cat
+ * @brief ATSC CAT table
+ *
+ * @param header struct dvb_table_header content
+ * @param descriptor pointer to struct dvb_desc
+ */
struct dvb_table_cat {
struct dvb_table_header header;
struct dvb_desc *descriptor;
@@ -40,9 +63,39 @@ struct dvb_v5_fe_parms;
extern "C" {
#endif
-ssize_t dvb_table_cat_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_cat **table);
-void dvb_table_cat_free(struct dvb_table_cat *cat);
-void dvb_table_cat_print(struct dvb_v5_fe_parms *parms, struct dvb_table_cat *t);
+/**
+ * @brief Initializes and parses CAT table
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param buf buffer containing the CAT raw data
+ * @param buflen length of the buffer
+ * @param table pointer to struct dvb_table_cat to be allocated and filled
+ *
+ * This function allocates an CAT table 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.
+ */
+ssize_t dvb_table_cat_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
+ ssize_t buflen, struct dvb_table_cat **table);
+
+/**
+ * @brief Frees all data allocated by the CAT table parser
+ *
+ * @param table pointer to struct dvb_table_cat to be freed
+ */
+void dvb_table_cat_free(struct dvb_table_cat *table);
+
+/**
+ * @brief Prints the content of the CAT table
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param table pointe to struct dvb_table_cat
+ */
+void dvb_table_cat_print(struct dvb_v5_fe_parms *parms,
+ struct dvb_table_cat *table);
#ifdef __cplusplus
}

Privacy Policy