PonyPlayer
|
#include <utility>
#include <QString>
#include <QDir>
命名空间 | |
namespace | PonyPlayer |
宏定义 | |
#define | INCLUDE_FFMPEG_END |
#define | STRINGIFY(x) #x |
#define | TOSTRING(x) STRINGIFY(x) |
#define | FILE_AND_LINE __FILE__ ":" TOSTRING(__LINE__) |
#define | NOT_IMPLEMENT_YET { throw std::runtime_error("Unsupported operation: " FILE_AND_LINE); } |
#define | ILLEGAL_STATE(msg) throw std::runtime_error(std::string("Illegal State Exception: ").append(msg).append(" : " FILE_AND_LINE)) |
#define | PONY_THREAD_ANNOTATION(...) static_assert([]{using namespace PonyPlayer; return checkThreadType(__VA_ARGS__);}()); |
#define | PONY_GUARD_BY(...) PONY_THREAD_ANNOTATION(__VA_ARGS__) |
#define | PONY_CONDITION(description) |
#define | PONY_THREAD_AFFINITY(thread) PONY_THREAD_ANNOTATION(thread) |
类型定义 | |
using | PonyPlayer::PonyThread = const char * |
函数 | |
template<typename T0 > | |
constexpr bool | PonyPlayer::checkThreadType (T0) |
template<typename T0 , typename ... T> | |
constexpr bool | PonyPlayer::checkThreadType (T0, T ...t) |
QString | PonyPlayer::getHome () |
变量 | |
constexpr PonyThread | PonyPlayer::PLAYBACK = "PlaybackThread" |
constexpr PonyThread | PonyPlayer::DECODER = "DecoderThread" |
constexpr PonyThread | PonyPlayer::MAIN = "MainThread" |
constexpr PonyThread | PonyPlayer::RENDER = "RenderThread" |
constexpr PonyThread | PonyPlayer::PREVIEW = "PreviewThread" |
constexpr PonyThread | PonyPlayer::FRAME = "FrameControllerThread" |
constexpr PonyThread | PonyPlayer::ANY = "__AnyThread" |
constexpr PonyThread | PonyPlayer::SELF = "__SelfThread" |
#define FILE_AND_LINE __FILE__ ":" TOSTRING(__LINE__) |
#define ILLEGAL_STATE | ( | msg | ) | throw std::runtime_error(std::string("Illegal State Exception: ").append(msg).append(" : " FILE_AND_LINE)) |
#define INCLUDE_FFMPEG_END |
#define NOT_IMPLEMENT_YET { throw std::runtime_error("Unsupported operation: " FILE_AND_LINE); } |
#define PONY_CONDITION | ( | description | ) |
仅在合适的时机调用可以保证线程安全. 通常通过Qt的信号机制保证.
#define PONY_GUARD_BY | ( | ... | ) | PONY_THREAD_ANNOTATION(__VA_ARGS__) |
仅在指定线程调用可以保证线程安全
#define PONY_THREAD_AFFINITY | ( | thread | ) | PONY_THREAD_ANNOTATION(thread) |
#define PONY_THREAD_ANNOTATION | ( | ... | ) | static_assert([]{using namespace PonyPlayer; return checkThreadType(__VA_ARGS__);}()); |
#define STRINGIFY | ( | x | ) | #x |
#define TOSTRING | ( | x | ) | STRINGIFY(x) |