10#if defined(WIN32) || defined(linux)
11#define INCLUDE_FFMPEG_BEGIN \
13_Pragma("GCC diagnostic push") \
14_Pragma("GCC diagnostic ignored \"-Wold-style-cast\"") \
15_Pragma("GCC diagnostic ignored \"-Wsign-conversion\"") \
16_Pragma("GCC diagnostic ignored \"-Wconversion\"")
17#elif defined(__APPLE__)
18#define INCLUDE_FFMPEG_BEGIN \
20_Pragma("GCC diagnostic push") \
21_Pragma("GCC diagnostic ignored \"-Wold-style-cast\"") \
22_Pragma("GCC diagnostic ignored \"-Wsign-conversion\"") \
23_Pragma("GCC diagnostic ignored \"-Wimplicit-int-conversion\"")
26#define INCLUDE_FFMPEG_END \
27_Pragma("GCC diagnostic pop") \
33#define NOT_IMPLEMENT_YET { throw std::runtime_error("Unsupported operation:"); }
34#define ILLEGAL_STATE(msg) throw std::runtime_error(std::string("Illegal State Exception: ").append(msg))
36#define STRINGIFY(x) #x
37#define TOSTRING(x) STRINGIFY(x)
38#define FILE_AND_LINE __FILE__ ":" TOSTRING(__LINE__)
39#define NOT_IMPLEMENT_YET { throw std::runtime_error("Unsupported operation: " FILE_AND_LINE); }
40#define ILLEGAL_STATE(msg) throw std::runtime_error(std::string("Illegal State Exception: ").append(msg).append(" : " FILE_AND_LINE))
57 return std::is_same<T0, PonyThread>();
60 template<
typename T0,
typename ...T>
70 QString home = QDir::homePath();
72 home +=
"/Library/Containers/PonyPlayer";
73#elif defined(Q_OS_WIN32)
74 home +=
"/AppData/Local/PonyPlayer";
75#elif defined(Q_OS_LINUX)
76 home +=
"/.PonyPlayer";
84#define PONY_THREAD_ANNOTATION(...) static_assert([]{using namespace PonyPlayer; return checkThreadType(__VA_ARGS__);}());
89#define PONY_GUARD_BY(...) PONY_THREAD_ANNOTATION(__VA_ARGS__)
94#define PONY_CONDITION(description)
95#define PONY_THREAD_AFFINITY(thread) PONY_THREAD_ANNOTATION(thread)
96#define PONY_THREAD_SAFE
Definition: audioformat.hpp:155
constexpr PonyThread MAIN
Definition: ponyplayer.h:47
constexpr PonyThread ANY
Definition: ponyplayer.h:52
constexpr PonyThread SELF
Definition: ponyplayer.h:53
constexpr PonyThread RENDER
Definition: ponyplayer.h:48
constexpr bool checkThreadType(T0)
Definition: ponyplayer.h:56
constexpr PonyThread DECODER
Definition: ponyplayer.h:46
const char * PonyThread
Definition: ponyplayer.h:44
constexpr PonyThread PLAYBACK
Definition: ponyplayer.h:45
constexpr PonyThread PREVIEW
Definition: ponyplayer.h:49
QString getHome()
Definition: ponyplayer.h:69
constexpr PonyThread FRAME
Definition: ponyplayer.h:50