add code.
All checks were successful
Deploy / PullDocker (push) Successful in 9s
Deploy / Build (push) Successful in 1m28s

This commit is contained in:
amass 2024-09-22 23:55:25 +08:00
parent 81f4517adf
commit 1a5a903fba
4 changed files with 24 additions and 2 deletions

View File

@ -5,7 +5,8 @@
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/build/_deps/kylin-src/Universal",
"/opt/Libraries/boost_1_85_0/include"
"/opt/Libraries/boost_1_86_0/include",
"/opt/Libraries/ZLMediaKit/include"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",

12
Server/MediaServer.cpp Normal file
View File

@ -0,0 +1,12 @@
#include "MediaServer.h"
#include "BoostLog.h"
#include <mk_media.h>
MediaServer::MediaServer() {
uint16_t status = mk_rtsp_server_start(554, 0);
if (status == 0) {
LOG(info) << "rtsp server start failed.";
} else {
LOG(info) << "rtsp server start succeed, port: " << status;
}
}

9
Server/MediaServer.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef __MEDIASERVER_H__
#define __MEDIASERVER_H__
class MediaServer {
public:
MediaServer();
};
#endif // __MEDIASERVER_H__

View File

@ -17,7 +17,7 @@ function cmake_scan() {
fi
${cmake_exe} -G Ninja -S ${base_path} -B ${build_path} \
-DCMAKE_BUILD_TYPE=Debug \
-DBOOST_ROOT=${libraries_root}/boost_1_85_0
-DBOOST_ROOT=${libraries_root}/boost_1_86_0
}
function build() {