libav_verbose flag
This commit is contained in:
parent
e3d87b1715
commit
afa013f4bf
|
@ -7,8 +7,11 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "xenia/apu/xma_context.h"
|
|
||||||
#include "xenia/apu/xma_decoder.h"
|
#include "xenia/apu/xma_decoder.h"
|
||||||
|
|
||||||
|
#include <gflags/gflags.h>
|
||||||
|
|
||||||
|
#include "xenia/apu/xma_context.h"
|
||||||
#include "xenia/base/logging.h"
|
#include "xenia/base/logging.h"
|
||||||
#include "xenia/base/math.h"
|
#include "xenia/base/math.h"
|
||||||
#include "xenia/base/ring_buffer.h"
|
#include "xenia/base/ring_buffer.h"
|
||||||
|
@ -46,6 +49,8 @@ extern "C" {
|
||||||
// do this, it's likely they are either passing the context to XAudio or
|
// do this, it's likely they are either passing the context to XAudio or
|
||||||
// using the XMA* functions.
|
// using the XMA* functions.
|
||||||
|
|
||||||
|
DEFINE_bool(libav_verbose, false, "Verbose libav output (debug and above)");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace apu {
|
namespace apu {
|
||||||
|
|
||||||
|
@ -55,11 +60,9 @@ XmaDecoder::XmaDecoder(cpu::Processor* processor)
|
||||||
XmaDecoder::~XmaDecoder() = default;
|
XmaDecoder::~XmaDecoder() = default;
|
||||||
|
|
||||||
void av_log_callback(void* avcl, int level, const char* fmt, va_list va) {
|
void av_log_callback(void* avcl, int level, const char* fmt, va_list va) {
|
||||||
#ifdef NDEBUG
|
if (!FLAGS_libav_verbose && level > AV_LOG_WARNING) {
|
||||||
if (level > AV_LOG_WARNING) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
char level_char = '?';
|
char level_char = '?';
|
||||||
switch (level) {
|
switch (level) {
|
||||||
|
|
Loading…
Reference in New Issue