PonyPlayer
ponyplayer.h 文件参考
#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"
 

宏定义说明

◆ FILE_AND_LINE

#define FILE_AND_LINE   __FILE__ ":" TOSTRING(__LINE__)

◆ ILLEGAL_STATE

#define ILLEGAL_STATE (   msg)    throw std::runtime_error(std::string("Illegal State Exception: ").append(msg).append(" : " FILE_AND_LINE))

◆ INCLUDE_FFMPEG_END

#define INCLUDE_FFMPEG_END
值:
_Pragma("GCC diagnostic pop") \
}

◆ NOT_IMPLEMENT_YET

#define NOT_IMPLEMENT_YET   { throw std::runtime_error("Unsupported operation: " FILE_AND_LINE); }

◆ PONY_CONDITION

#define PONY_CONDITION (   description)

仅在合适的时机调用可以保证线程安全. 通常通过Qt的信号机制保证.

◆ PONY_GUARD_BY

#define PONY_GUARD_BY (   ...)    PONY_THREAD_ANNOTATION(__VA_ARGS__)

仅在指定线程调用可以保证线程安全

◆ PONY_THREAD_AFFINITY

#define PONY_THREAD_AFFINITY (   thread)    PONY_THREAD_ANNOTATION(thread)

◆ PONY_THREAD_ANNOTATION

#define PONY_THREAD_ANNOTATION (   ...)    static_assert([]{using namespace PonyPlayer; return checkThreadType(__VA_ARGS__);}());

◆ STRINGIFY

#define STRINGIFY (   x)    #x

◆ TOSTRING

#define TOSTRING (   x)    STRINGIFY(x)