[libbluray-devel] [Git][videolan/libbluray][master] 2 commits: logging: improve documentation
Petri Hintukainen (@hpi)
gitlab at videolan.org
Sun Sep 25 12:54:54 UTC 2022
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
d0119179 by Petri Hintukainen at 2022-09-25T15:47:53+03:00
logging: improve documentation
- - - - -
fccabb93 by Petri Hintukainen at 2022-09-25T15:53:05+03:00
meta_data.h: document struct members
- - - - -
2 changed files:
- src/libbluray/bdnav/meta_data.h
- src/util/log_control.h
Changes:
=====================================
src/libbluray/bdnav/meta_data.h
=====================================
@@ -17,38 +17,41 @@
* <http://www.gnu.org/licenses/>.
*/
-#if !defined(_META_DATA_H_)
-#define _META_DATA_H_
-
/**
* @file
* \brief Disc metadata definitions
*/
+#if !defined(_META_DATA_H_)
+#define _META_DATA_H_
+
#include <stdint.h>
+/** Thumbnail path and resolution */
typedef struct meta_thumbnail {
- char * path;
- uint32_t xres;
- uint32_t yres;
+ char * path; /**< Path to thumbnail image (relative to disc root) */
+ uint32_t xres; /**< Thumbnail width */
+ uint32_t yres; /**< Thumbnail height */
} META_THUMBNAIL;
+/** Title name */
typedef struct meta_title {
- uint32_t title_number;
- char * title_name;
+ uint32_t title_number; /**< Title number (from disc index) */
+ char * title_name; /**< Title name */
} META_TITLE;
+/** DL (Disc Library) metadata entry */
typedef struct meta_dl {
- char language_code[4];
- char * filename;
- char * di_name;
- char * di_alternative;
- uint8_t di_num_sets;
- uint8_t di_set_number;
- uint32_t toc_count;
- META_TITLE * toc_entries;
- uint8_t thumb_count;
- META_THUMBNAIL * thumbnails;
+ char language_code[4]; /**< Language used in this metadata entry */
+ char * filename; /**< Source file (relative to disc root) */
+ char * di_name; /**< Disc name */
+ char * di_alternative; /**< Alternative name */
+ uint8_t di_num_sets; /**< Number of discs in original volume or collection */
+ uint8_t di_set_number; /**< Sequence order of the disc from an original collection */
+ uint32_t toc_count; /**< Number of title entries */
+ META_TITLE * toc_entries; /**< Title data */
+ uint8_t thumb_count; /**< Number of thumbnails */
+ META_THUMBNAIL * thumbnails; /**< Thumbnail data */
} META_DL;
#endif // _META_DATA_H_
=====================================
src/util/log_control.h
=====================================
@@ -21,6 +21,13 @@
/**
* @file
* \brief Log control and capture
+ *
+ * Logging level can be changed with function bd_set_debug_mask() or environment variable BD_DEBUG_MASK.
+ * Default is to log only errors and critical messages (DBG_CRIT).
+ *
+ * Application can capture log messages with bd_set_debug_handler().
+ * Messages can be written to a log file with BD_DEBUG_FILE environment variable.
+ * By default messages are written to standard error output.
*/
#ifndef BD_LOG_CONTROL_H_
@@ -32,39 +39,56 @@ extern "C" {
#include <stdint.h>
-
+/**
+ * Flags for log filtering.
+ */
enum debug_mask_enum {
DBG_RESERVED = 0x00001,
- DBG_CONFIGFILE = 0x00002,
- DBG_FILE = 0x00004,
- DBG_AACS = 0x00008,
- DBG_MKB = 0x00010,
- DBG_MMC = 0x00020,
- DBG_BLURAY = 0x00040,
- DBG_DIR = 0x00080,
- DBG_NAV = 0x00100,
- DBG_BDPLUS = 0x00200,
- DBG_DLX = 0x00400,
- DBG_CRIT = 0x00800, /* this is libbluray's default debug mask so use this if you want to display critical info */
- DBG_HDMV = 0x01000,
- DBG_BDJ = 0x02000,
- DBG_STREAM = 0x04000,
- DBG_GC = 0x08000, /* graphics controller */
- DBG_DECODE = 0x10000, /* PG / IG decoders, m2ts demuxer */
- DBG_JNI = 0x20000, /* JNI calls */
+ DBG_CONFIGFILE = 0x00002, /* (reserved for libaacs) */
+ DBG_FILE = 0x00004, /* (reserved for libaacs) */
+ DBG_AACS = 0x00008, /* (reserved for libaacs) */
+ DBG_MKB = 0x00010, /* (reserved for libaacs) */
+ DBG_MMC = 0x00020, /* (reserved for libaacs) */
+ DBG_BLURAY = 0x00040, /**< BluRay player */
+ DBG_DIR = 0x00080, /**< Directory access */
+ DBG_NAV = 0x00100, /**< Database files (playlist and clip info) */
+ DBG_BDPLUS = 0x00200, /* (reserved for libbdplus) */
+ DBG_DLX = 0x00400, /* (reserved for libbdplus) */
+ DBG_CRIT = 0x00800, /**< **Critical messages and errors** (default) */
+ DBG_HDMV = 0x01000, /**< HDMV virtual machine execution trace */
+ DBG_BDJ = 0x02000, /**< BD-J subsystem and Xlet trace */
+ DBG_STREAM = 0x04000, /**< m2ts stream trace */
+ DBG_GC = 0x08000, /**< graphics controller trace */
+ DBG_DECODE = 0x10000, /**< PG / IG decoders, m2ts demuxer */
+ DBG_JNI = 0x20000, /**< JNI calls */
};
typedef enum debug_mask_enum debug_mask_t;
typedef void (*BD_LOG_FUNC)(const char *);
-/*
+/**
+ * Set (global) debug handler
+ *
+ * The function will receive all enabled log messages.
+ *
+ * @param handler function that will receive all enabled log and trace messages
*
*/
+void bd_set_debug_handler(BD_LOG_FUNC handler);
-void bd_set_debug_handler(BD_LOG_FUNC);
-
+/**
+ * Set (global) debug mask
+ *
+ * @param mask combination of flags from debug_mask_enum
+ */
void bd_set_debug_mask(uint32_t mask);
+
+/**
+ * Get current (global) debug mask
+ *
+ * @return combination of flags from debug_mask_enum
+ */
uint32_t bd_get_debug_mask(void);
#ifdef __cplusplus
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/caab0081f34aec0f4eb3b0da4e78c50a49b6fa87...fccabb932d76da76f2c83f503d5c38906c308d72
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/caab0081f34aec0f4eb3b0da4e78c50a49b6fa87...fccabb932d76da76f2c83f503d5c38906c308d72
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the libbluray-devel
mailing list