File: logging.R

package info (click to toggle)
r-cran-av 0.5.1+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 324 kB
  • sloc: ansic: 1,353; sh: 83; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#' Logging
#'
#' Get or set the [log level](https://www.ffmpeg.org/doxygen/4.0/group__lavu__log__constants.html).
#'
#' @useDynLib av R_log_level
#' @family av
#' @name logging
#' @export
#' @param set new [log level](https://www.ffmpeg.org/doxygen/4.0/group__lavu__log__constants.html) value
av_log_level <- function(set = NULL){
  if(length(set)){
    levels <- seq(-8, 56, 8)
    if(!(set %in% levels))
      stop("Log level must be one of: ", paste(levels, collapse = ", "))
  }
  .Call(R_log_level, set)
}

#' @useDynLib av R_get_open_handles
get_open_handles <- function(){
  .Call(R_get_open_handles)
}