Loading...
Searching...
No Matches
log_control.h File Reference

Log control and capture. More...

`#include <stdint.h>`

Go to the source code of this file.

## Typedefs

typedef void(* | BD_LOG_FUNC) (const char *msg)
| Log a message.

## Enumerations

enum

debug_mask_t {
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 ,
DBG_HDMV = 0x01000 ,
DBG_BDJ = 0x02000 ,
DBG_STREAM = 0x04000 ,
DBG_GC = 0x08000 ,
DBG_DECODE = 0x10000 ,
DBG_JNI = 0x20000
}

| Flags for log filtering. More...

## Functions

BD_PUBLIC void | bd_set_debug_handler (BD_LOG_FUNC handler)
| Set (global) debug handler.
BD_PUBLIC void | bd_set_debug_mask (uint32_t mask)
| Set (global) debug mask.
BD_PUBLIC uint32_t | bd_get_debug_mask (void)
| Get current (global) debug mask.

## Detailed Description

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.

## Typedef Documentation

## BD_LOG_FUNC

typedef void(* BD_LOG_FUNC) (const char *msg)

Log a message.

Parameters

  msg | Log message as null-terminated string

## Enumeration Type Documentation

## debug_mask_t

enum debug_mask_t

Flags for log filtering.

Enumerator
DBG_BLURAY | BluRay player.
DBG_DIR | Directory access.
DBG_NAV | Database files (playlist and clip info).
DBG_CRIT | Critical messages and errors (default)
DBG_HDMV | HDMV virtual machine execution trace.
DBG_BDJ | BD-J subsystem and Xlet trace.
DBG_STREAM | m2ts stream trace
DBG_GC | graphics controller trace
DBG_DECODE | PG / IG decoders, m2ts demuxer.
DBG_JNI | JNI calls.

## Function Documentation

## bd_get_debug_mask()

BD_PUBLIC uint32_t bd_get_debug_mask | ( | void |  | ) |

Get current (global) debug mask.

Returns
  combination of flags from debug_mask_enum

## bd_set_debug_handler()

BD_PUBLIC void bd_set_debug_handler | ( | BD_LOG_FUNC | handler | ) |

Set (global) debug handler.

The function will receive all enabled log messages.

Parameters

  handler | function that will receive all enabled log and trace messages

## bd_set_debug_mask()

BD_PUBLIC void bd_set_debug_mask | ( | uint32_t | mask | ) |

Set (global) debug mask.

Parameters

  mask | combination of flags from debug_mask_enum