check_func_headers windows.h GetProcessTimes
check_func_headers windows.h GetSystemTimeAsFileTime
check_func_headers windows.h MapViewOfFile
+ check_func_headers windows.h SetConsoleTextAttribute
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
+check_func_headers glob.h glob
check_header direct.h
check_header dlfcn.h
disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib
disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
+# check for VDA header
+if ! disabled vda && ! enabled ppc; then
+ if check_header VideoDecodeAcceleration/VDADecoder.h; then
+ enable vda
+ add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore
+ fi
+fi
+
if ! disabled w32threads && ! enabled pthreads; then
- check_func _beginthreadex && enable w32threads
+ check_func_headers "windows.h process.h" _beginthreadex && enable w32threads
fi
# check for some common methods of building with pthread support
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+ #if HAVE_IO_H
+ #include <io.h>
+ #endif
#include <stdlib.h>
-#include "avstring.h"
#include "avutil.h"
#include "common.h"
#include "log.h"
static int av_log_level = AV_LOG_INFO;
static int flags;
- #if defined(_WIN32) && !defined(__MINGW32CE__)
+ #if HAVE_SETCONSOLETEXTATTRIBUTE
#include <windows.h>
- #include <io.h>
-static const uint8_t color[] = { 12, 12, 12, 14, 7, 10, 11 };
+static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = {
+ [AV_LOG_PANIC /8] = 12,
+ [AV_LOG_FATAL /8] = 12,
+ [AV_LOG_ERROR /8] = 12,
+ [AV_LOG_WARNING/8] = 14,
+ [AV_LOG_INFO /8] = 7,
+ [AV_LOG_VERBOSE/8] = 10,
+ [AV_LOG_DEBUG /8] = 10,
+ [16+AV_CLASS_CATEGORY_NA ] = 7,
+ [16+AV_CLASS_CATEGORY_INPUT ] = 13,
+ [16+AV_CLASS_CATEGORY_OUTPUT ] = 5,
+ [16+AV_CLASS_CATEGORY_MUXER ] = 13,
+ [16+AV_CLASS_CATEGORY_DEMUXER ] = 5,
+ [16+AV_CLASS_CATEGORY_ENCODER ] = 11,
+ [16+AV_CLASS_CATEGORY_DECODER ] = 3,
+ [16+AV_CLASS_CATEGORY_FILTER ] = 10,
+ [16+AV_CLASS_CATEGORY_BITSTREAM_FILTER] = 9,
+ [16+AV_CLASS_CATEGORY_SWSCALER ] = 7,
+ [16+AV_CLASS_CATEGORY_SWRESAMPLER ] = 7,
+};
+
static int16_t background, attr_orig;
static HANDLE con;
#define set_color(x) SetConsoleTextAttribute(con, background | color[x])