libvlc_log_* functions provide access to the LibVLC messages log.
More...
Detailed Description
libvlc_log_* functions provide access to the LibVLC messages log.
This is used for logging and debugging.
Typedef Documentation
| typedef void(* libvlc_log_cb)(void *data, int level, const char *fmt, va_list args) |
Callback prototype for LibVLC log message handler.
- Parameters
-
| data | data pointer as given to libvlc_log_subscribe() |
| level | message level (enum libvlc_log_level) |
| fmt | printf() format string (as defined by ISO C11) |
| args | variable argument list for the format |
- Note
- Log message handlers must be thread-safe.
This structure is opaque.
It represents a libvlc log iterator
Data structure for a LibVLC logging callbacks.
- Note
- This structure contains exactly 4 pointers and will never change. Nevertheless, it should not be accessed directly outside of LibVLC. (In fact, doing so would fail the thread memory model.)
This structure is opaque.
It represents a libvlc log instance
Enumeration Type Documentation
Logging messages level.
- Note
- Future LibVLC versions may define new levels.
- Enumerator:
| LIBVLC_DEBUG |
Debug message.
|
| LIBVLC_NOTICE |
Important informational message.
|
| LIBVLC_WARNING |
Warning (potential error) message.
|
| LIBVLC_ERROR |
Error message.
|
Function Documentation
Always returns minus one.
This function is only provided for backward compatibility.
- Parameters
-
- Returns
- always -1
This function does nothing.
It is only provided for backward compatibility.
- Parameters
-
Frees memory allocated by libvlc_log_open().
- Parameters
-
| p_log | libvlc log instance or NULL |
Always returns zero.
This function is only provided for backward compatibility.
- Parameters
-
- Returns
- always zero
This function does nothing useful.
It is only provided for backward compatibility.
- Parameters
-
- Returns
- an unique pointer or NULL on error or if the parameter was NULL
Always returns zero.
This function is only provided for backward compatibility.
- Parameters
-
- Returns
- always zero
Always returns NULL.
This function is only provided for backward compatibility.
- Parameters
-
| p_iter | libvlc log iterator or NULL |
| p_buf | ignored |
- Returns
- always NULL
This function does nothing useful.
It is only provided for backward compatibility.
- Parameters
-
| p_instance | libvlc instance |
- Returns
- an unique pointer or NULL on error
Registers a logging callback to LibVLC.
This function is thread-safe.
- Parameters
-
| sub | uninitialized subscriber structure |
| cb | callback function pointer |
| data | opaque data pointer for the callback function |
- Note
- Some log messages (especially debug) are emitted by LibVLC while initializing, before any LibVLC instance even exists. Thus this function does not require a LibVLC instance parameter.
- Warning
- As a consequence of not depending on a LibVLC instance, all logging callbacks are shared by all LibVLC instances within the process / address space. This also enables log messages to be emitted by LibVLC components that are not specific to any given LibVLC instance.
-
Do not call this function from within a logging callback. It would trigger a dead lock.
- Version
- LibVLC 2.1.0 or later
Registers a logging callback to a file.
- Parameters
-
- Version
- LibVLC 2.1.0 or later
Deregisters a logging callback from LibVLC.
This function is thread-safe.
- Note
- After (and only after) libvlc_log_unsubscribe() has returned, LibVLC warrants that there are no more pending calls of the subscription callback function.
- Warning
- Do not call this function from within a logging callback. It would trigger a dead lock.
- Parameters
-
| sub | initialized subscriber structure |
- Version
- LibVLC 2.1.0 or later
This function does nothing.
It is only provided for backward compatibility.
- Parameters
-
| p_instance | ignored |
| level | ignored |