mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 12:11:36 +08:00
整理宏
This commit is contained in:
parent
7e5873d818
commit
397c1c7c57
@ -13,22 +13,20 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void Assert_Throw(int failed, const char *exp, const char *func, const char *file, int line);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define CHECK(exp) Assert_Throw(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__)
|
||||
|
||||
#ifndef NDEBUG
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif//assert
|
||||
|
||||
#define assert(exp) Assert_Throw(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void Assert_Throw(int failed, const char *exp, const char *func, const char *file, int line);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define assert(exp) Assert_Throw(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__)
|
||||
#else
|
||||
#define assert(e) ((void)0)
|
||||
#endif//NDEBUG
|
||||
|
@ -20,15 +20,10 @@
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace mediakit {
|
||||
#ifndef CHECK
|
||||
#define CHECK(exp) Assert_Throw(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__)
|
||||
#endif//CHECK
|
||||
|
||||
//加载配置文件,如果配置文件不存在,那么会导出默认配置并生成配置文件
|
||||
//加载配置文件成功后会触发kBroadcastUpdateConfig广播
|
||||
//如果指定的文件名(ini_path)为空,那么会加载默认配置文件
|
||||
//默认配置文件名为 /path/to/your/exe.ini
|
||||
//加载配置文件成功后返回true,否则返回false
|
||||
bool loadIniConfig(const char *ini_path = nullptr);
|
||||
////////////其他宏定义///////////
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b) )
|
||||
#endif //MAX
|
||||
@ -51,6 +46,17 @@ bool loadIniConfig(const char *ini_path = nullptr);
|
||||
#define FMP4_SCHEMA "fmp4"
|
||||
#define DEFAULT_VHOST "__defaultVhost__"
|
||||
|
||||
extern "C" void Assert_Throw(int failed, const char *exp, const char *func, const char *file, int line);
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
//加载配置文件,如果配置文件不存在,那么会导出默认配置并生成配置文件
|
||||
//加载配置文件成功后会触发kBroadcastUpdateConfig广播
|
||||
//如果指定的文件名(ini_path)为空,那么会加载默认配置文件
|
||||
//默认配置文件名为 /path/to/your/exe.ini
|
||||
//加载配置文件成功后返回true,否则返回false
|
||||
bool loadIniConfig(const char *ini_path = nullptr);
|
||||
|
||||
////////////广播名称///////////
|
||||
namespace Broadcast {
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define ZLMEDIAKIT_RTCPFCI_H
|
||||
|
||||
#include "Rtcp.h"
|
||||
#include "assert.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user