Skip to content

Commit 93647e4

Browse files
author
Clement Champetier
committed
Add log levels in SWIG interface
1 parent 668109e commit 93647e4

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

src/AvTranscoder/avTranscoder.i

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
%include "AvTranscoder/swig/avExport.i"
1212
%include "AvTranscoder/swig/avDocumentation.i"
1313
%include "AvTranscoder/swig/avRational.i"
14+
%include "AvTranscoder/swig/avLogLevel.i"
1415

1516
%{
1617
#include <AvTranscoder/ProfileLoader.hpp>

src/AvTranscoder/common.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ void AvExport preloadCodecsAndFormats();
6060

6161
/**
6262
* @brief Set the log level of ffmpeg/libav.
63-
* @param level: refer to define AV_LOG_*** (from AV_LOG_QUIET to AV_LOG_MAX_OFFSET)
63+
* @param level: refer to define AV_LOG_xxx (from AV_LOG_QUIET to AV_LOG_DEBUG)
64+
* @see SWIG interface avLogLevel.i
6465
*/
6566
void AvExport setLogLevel( const int level );
6667

src/AvTranscoder/swig/avLogLevel.i

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Print no output.
3+
*/
4+
#define AV_LOG_QUIET -8
5+
6+
/**
7+
* Something went really wrong and we will crash now.
8+
*/
9+
#define AV_LOG_PANIC 0
10+
11+
/**
12+
* Something went wrong and recovery is not possible.
13+
* For example, no header was found for a format which depends
14+
* on headers or an illegal combination of parameters is used.
15+
*/
16+
#define AV_LOG_FATAL 8
17+
18+
/**
19+
* Something went wrong and cannot losslessly be recovered.
20+
* However, not all future data is affected.
21+
*/
22+
#define AV_LOG_ERROR 16
23+
24+
/**
25+
* Something somehow does not look correct. This may or may not
26+
* lead to problems. An example would be the use of '-vstrict -2'.
27+
*/
28+
#define AV_LOG_WARNING 24
29+
30+
/**
31+
* Standard information.
32+
*/
33+
#define AV_LOG_INFO 32
34+
35+
/**
36+
* Detailed information.
37+
*/
38+
#define AV_LOG_VERBOSE 40
39+
40+
/**
41+
* Stuff which is only useful for libav* developers.
42+
*/
43+
#define AV_LOG_DEBUG 48

0 commit comments

Comments
 (0)