WebAPI: Fix build if ENABLE_MP4=false (#3699)

The class `MP4Reader` is only defined if the macro is ON
This commit is contained in:
autoantwort 2024-07-09 04:43:34 +02:00 committed by GitHub
parent c72e576420
commit f24802d0e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1949,6 +1949,7 @@ void installWebApi() {
}); });
#endif #endif
#if ENABLE_MP4
api_regist("/index/api/loadMP4File", [](API_ARGS_MAP) { api_regist("/index/api/loadMP4File", [](API_ARGS_MAP) {
CHECK_SECRET(); CHECK_SECRET();
CHECK_ARGS("vhost", "app", "stream", "file_path"); CHECK_ARGS("vhost", "app", "stream", "file_path");
@ -1967,6 +1968,7 @@ void installWebApi() {
// sample_ms设置为0从配置文件加载file_repeat可以指定如果配置文件也指定循环解复用那么强制开启 // sample_ms设置为0从配置文件加载file_repeat可以指定如果配置文件也指定循环解复用那么强制开启
reader->startReadMP4(0, true, allArgs["file_repeat"]); reader->startReadMP4(0, true, allArgs["file_repeat"]);
}); });
#endif
GET_CONFIG_FUNC(std::set<std::string>, download_roots, API::kDownloadRoot, [](const string &str) -> std::set<std::string> { GET_CONFIG_FUNC(std::set<std::string>, download_roots, API::kDownloadRoot, [](const string &str) -> std::set<std::string> {
std::set<std::string> ret; std::set<std::string> ret;