2021-09-30 11:27:42 +08:00
|
|
|
|
/*
|
2023-12-09 16:23:51 +08:00
|
|
|
|
* Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
|
2021-09-30 11:27:42 +08:00
|
|
|
|
*
|
2023-12-09 16:23:51 +08:00
|
|
|
|
* This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).
|
2021-09-30 11:27:42 +08:00
|
|
|
|
*
|
2023-12-09 16:23:51 +08:00
|
|
|
|
* Use of this source code is governed by MIT-like license that can be found in the
|
2021-09-30 11:27:42 +08:00
|
|
|
|
* LICENSE file in the root of the source tree. All contributing project authors
|
|
|
|
|
* may be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "macros.h"
|
2021-10-16 16:24:40 +08:00
|
|
|
|
#include "Util/util.h"
|
|
|
|
|
|
|
|
|
|
using namespace toolkit;
|
2021-09-30 11:27:42 +08:00
|
|
|
|
|
|
|
|
|
#if defined(ENABLE_VERSION)
|
2024-03-24 17:18:18 +08:00
|
|
|
|
#include "ZLMVersion.h"
|
2021-09-30 11:27:42 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
2021-10-16 16:24:40 +08:00
|
|
|
|
extern "C" {
|
|
|
|
|
void Assert_Throw(int failed, const char *exp, const char *func, const char *file, int line, const char *str) {
|
|
|
|
|
if (failed) {
|
|
|
|
|
_StrPrinter printer;
|
|
|
|
|
printer << "Assertion failed: (" << exp ;
|
|
|
|
|
if(str && *str){
|
|
|
|
|
printer << ", " << str;
|
|
|
|
|
}
|
|
|
|
|
printer << "), function " << func << ", file " << file << ", line " << line << ".";
|
2023-04-14 15:10:48 +08:00
|
|
|
|
throw mediakit::AssertFailedException(printer);
|
2021-10-16 16:24:40 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace mediakit {
|
|
|
|
|
|
2023-12-09 16:23:51 +08:00
|
|
|
|
/**
|
|
|
|
|
* 本项目采用类MIT协议,用户在履行MIT协议义务的同时,应当同时遵循保留ZLMediaKit软件版权信息的义务。
|
|
|
|
|
* 用户不得去除ZLMediaKit提供的各种服务中包括但不限于 "title"、"Server"、"User-Agent" 等字段中 "ZLMediaKit" 的信息。
|
|
|
|
|
* 否则本项目主要权利人(项目发起人、主要作者)保留声索起诉的权利。
|
|
|
|
|
*/
|
2021-09-30 11:27:42 +08:00
|
|
|
|
#if !defined(ENABLE_VERSION)
|
2023-12-09 16:23:51 +08:00
|
|
|
|
const char kServerName[] = "ZLMediaKit-8.0(build in " __DATE__ " " __TIME__ ")";
|
2021-09-30 11:27:42 +08:00
|
|
|
|
#else
|
2022-11-06 00:38:14 +08:00
|
|
|
|
const char kServerName[] = "ZLMediaKit(git hash:" COMMIT_HASH "/" COMMIT_TIME ",branch:" BRANCH_NAME ",build time:" BUILD_TIME ")";
|
2021-09-30 11:27:42 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
2024-03-24 17:18:18 +08:00
|
|
|
|
}//namespace mediakit
|