Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
materight committed Jul 1, 2024
1 parent 5e79d0f commit a65c6d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion av/logging.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CRITICAL: int
def adapt_level(level: int) -> int: ...
def get_level() -> int | None: ...
def set_level(level: int | None) -> None: ...
def set_libav_level(level: int | None) -> None: ...
def set_libav_level(level: int) -> None: ...
def restore_default_callback() -> None: ...
def get_skip_repeated() -> bool: ...
def set_skip_repeated(v: bool) -> None: ...
Expand Down
8 changes: 3 additions & 5 deletions av/logging.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,14 @@ def set_level(level):


def set_libav_level(level):
"""set_libav_level(level)
Sets libAV's log level. It can be set to constants available in this
"""Sets libAV's log level. It can be set to constants available in this
module: ``PANIC``, ``FATAL``, ``ERROR``, ``WARNING``, ``INFO``,
``VERBOSE``, ``DEBUG``.
If PyAV logging is not enabled, setting the level of ffpmeg will change
the logs printed to terminal.
lib.av_log_set_level(level);
"""
lib.av_log_set_level(level)


def restore_default_callback():
Expand Down
1 change: 1 addition & 0 deletions include/libavutil/avutil.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,4 @@ cdef extern from "libavutil/log.h" nogil:
ctypedef void(*av_log_callback)(void *, int, const char *, va_list)
void av_log_default_callback(void *, int, const char *, va_list)
void av_log_set_callback (av_log_callback callback)
void av_log_set_level(int level)

0 comments on commit a65c6d1

Please sign in to comment.