Libav.hpp
1 #pragma once
2 #if __has_include(<libavcodec/avcodec.h>) && \
3  __has_include(<libavformat/avformat.h>) && \
4  __has_include(<libavdevice/avdevice.h>) && \
5  __has_include(<libavutil/frame.h>) && \
6  __has_include(<libswresample/swresample.h>) && \
7  __has_include(<libswscale/swscale.h>)
8 
9 #include <QString>
10 #define SCORE_HAS_LIBAV 1
11 
12 extern "C" int av_strerror(int errnum, char* errbuf, size_t errbuf_size);
13 
14 static inline QString av_to_string(int errnum)
15 {
16  char err[512];
17  av_strerror(errnum, err, 512);
18  return QString::fromUtf8(err);
19 }
20 
21 #endif