迁移代码。
This commit is contained in:
parent
dd97037629
commit
0684c0fbc5
6
.vscode/c_cpp_properties.json
vendored
6
.vscode/c_cpp_properties.json
vendored
@ -5,11 +5,11 @@
|
|||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/**",
|
"${workspaceFolder}/**",
|
||||||
"${workspaceFolder}/3rdparty/ds_pedestrian_mot_hisi/include",
|
"${workspaceFolder}/3rdparty/ds_pedestrian_mot_hisi/include",
|
||||||
"/opt/Libraries/boost_1_86_0/include",
|
"/opt/aarch64-v01c01-linux-gnu-gcc/lib/boost_1_87_0/include",
|
||||||
"/opt/Libraries/libdatachannel-0.22.4",
|
"/opt/aarch64-v01c01-linux-gnu-gcc/lib/libdatachannel-0.22.5",
|
||||||
"/opt/aarch64-v01c01-linux-gnu-gcc/lib/ZLMediaKit/include",
|
"/opt/aarch64-v01c01-linux-gnu-gcc/lib/ZLMediaKit/include",
|
||||||
"/opt/aarch64-v01c01-linux-gnu-gcc/lib/LeakTracer/include",
|
"/opt/aarch64-v01c01-linux-gnu-gcc/lib/LeakTracer/include",
|
||||||
"build/_deps/kylin-src/Universal"
|
"build/_deps/kylin-src"
|
||||||
],
|
],
|
||||||
"defines": [],
|
"defines": [],
|
||||||
"compilerPath": "/usr/bin/gcc",
|
"compilerPath": "/usr/bin/gcc",
|
||||||
|
@ -9,15 +9,15 @@ option(CROSS_BUILD "build for embeded product." ON)
|
|||||||
|
|
||||||
if(CROSS_BUILD)
|
if(CROSS_BUILD)
|
||||||
set(Libraries_ROOT /opt/aarch64-v01c01-linux-gnu-gcc/lib)
|
set(Libraries_ROOT /opt/aarch64-v01c01-linux-gnu-gcc/lib)
|
||||||
set(OPENSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/openssl)
|
set(OPENSSL_ROOT_DIR ${Libraries_ROOT}/openssl-3.4.1)
|
||||||
set(OPENSSL_LIBRARY_DIRS ${OPENSSL_ROOT_DIR}/libs)
|
set(OPENSSL_LIBRARY_DIRS ${OPENSSL_ROOT_DIR}/libs)
|
||||||
|
set(SCTP_ROOT ${Libraries_ROOT}/usrsctp-0.9.5.0)
|
||||||
|
set(SCTP_LIBRARIES ${SCTP_ROOT}/lib/libusrsctp.so)
|
||||||
else()
|
else()
|
||||||
set(Libraries_ROOT /opt/Libraries)
|
set(Libraries_ROOT /opt/Libraries)
|
||||||
endif()
|
endif()
|
||||||
set(OPENSSL_INCLUDE_DIR ${OPENSSL_ROOT_DIR}/include)
|
|
||||||
set(OPENSSL_LIBRARIES ssl crypto)
|
|
||||||
|
|
||||||
set(BOOST_ROOT ${Libraries_ROOT}/boost_1_86_0)
|
set(BOOST_ROOT ${Libraries_ROOT}/boost_1_87_0)
|
||||||
set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include)
|
set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include)
|
||||||
option(Boost_USE_STATIC_LIBS OFF)
|
option(Boost_USE_STATIC_LIBS OFF)
|
||||||
find_package(Boost REQUIRED COMPONENTS log serialization)
|
find_package(Boost REQUIRED COMPONENTS log serialization)
|
||||||
@ -36,6 +36,6 @@ add_subdirectory(Tools)
|
|||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(Kylin
|
FetchContent_Declare(Kylin
|
||||||
GIT_REPOSITORY https://gitea.amass.fun/amass/Kylin.git
|
GIT_REPOSITORY ssh://git@gitea.amass.fun:2022/amass/Kylin.git
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(Kylin)
|
FetchContent_MakeAvailable(Kylin)
|
@ -1,7 +1,8 @@
|
|||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
add_executable(PassengerStatistics main.cpp
|
add_executable(PassengerStatistics main.cpp
|
||||||
DetectAlgorithm.h DetectAlgorithm.cpp
|
DetectAlgorithm.h DetectAlgorithm.cpp
|
||||||
ImageUtilities.h ImageUtilities.cpp
|
ImageUtilities.h ImageUtilities.cpp
|
||||||
Live555RtspPusher.h Live555RtspPusher.cpp
|
|
||||||
RtspServer.h RtspServer.cpp
|
RtspServer.h RtspServer.cpp
|
||||||
VideoInput.h VideoInput.cpp
|
VideoInput.h VideoInput.cpp
|
||||||
)
|
)
|
||||||
@ -22,12 +23,14 @@ target_link_directories(PassengerStatistics
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(PassengerStatistics
|
target_link_libraries(PassengerStatistics
|
||||||
PRIVATE Universal
|
PRIVATE Kylin::Core
|
||||||
PRIVATE ${OPENSSL_LIBRARIES}
|
PRIVATE OpenSSL::SSL
|
||||||
|
PRIVATE OpenSSL::Crypto
|
||||||
PRIVATE rw_mpp
|
PRIVATE rw_mpp
|
||||||
PRIVATE ds_pedestrian_mot_Hi3516DV500
|
PRIVATE ds_pedestrian_mot_Hi3516DV500
|
||||||
PRIVATE mk_api
|
PRIVATE mk_api
|
||||||
PRIVATE opencv_core
|
PRIVATE opencv_core
|
||||||
PRIVATE opencv_imgcodecs
|
PRIVATE opencv_imgcodecs
|
||||||
PRIVATE opencv_imgproc
|
PRIVATE opencv_imgproc
|
||||||
|
PRIVATE ${SCTP_LIBRARIES}
|
||||||
)
|
)
|
@ -1,5 +1,5 @@
|
|||||||
#include "DetectAlgorithm.h"
|
#include "DetectAlgorithm.h"
|
||||||
#include "BoostLog.h"
|
#include "Core/Logger.h"
|
||||||
#include "ImageUtilities.h"
|
#include "ImageUtilities.h"
|
||||||
#include <ds_pedestrian_mot_hisi.h>
|
#include <ds_pedestrian_mot_hisi.h>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
#include "Live555RtspPusher.h"
|
|
||||||
|
|
||||||
Live555RtspPusher::Live555RtspPusher(boost::asio::io_context &ioContext) : m_ioContext(ioContext), m_socket(ioContext) {
|
|
||||||
using boost::asio::ip::udp;
|
|
||||||
m_socket.open(udp::v4());
|
|
||||||
}
|
|
||||||
|
|
||||||
void Live555RtspPusher::push(const uint8_t *data, uint32_t size) {
|
|
||||||
using boost::asio::ip::udp;
|
|
||||||
udp::endpoint point(udp::v4(), 6666);
|
|
||||||
m_socket.send_to(boost::asio::const_buffer(data, size), point);
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
#ifndef __LIVE555RTSPPUSHER_H__
|
|
||||||
#define __LIVE555RTSPPUSHER_H__
|
|
||||||
|
|
||||||
#include <boost/asio/io_context.hpp>
|
|
||||||
#include <boost/asio/ip/udp.hpp>
|
|
||||||
|
|
||||||
class Live555RtspPusher {
|
|
||||||
public:
|
|
||||||
Live555RtspPusher(boost::asio::io_context &ioContext);
|
|
||||||
void push(const uint8_t *data, uint32_t size);
|
|
||||||
|
|
||||||
private:
|
|
||||||
boost::asio::io_context &m_ioContext;
|
|
||||||
boost::asio::ip::udp::socket m_socket;
|
|
||||||
};
|
|
||||||
#endif // __LIVE555RTSPPUSHER_H__
|
|
@ -1,5 +1,5 @@
|
|||||||
#include "VideoInput.h"
|
#include "VideoInput.h"
|
||||||
#include "BoostLog.h"
|
#include "Core/Logger.h"
|
||||||
#include "DetectAlgorithm.h"
|
#include "DetectAlgorithm.h"
|
||||||
#include "rw_mpp_api.h"
|
#include "rw_mpp_api.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "BoostLog.h"
|
#include "Core/DateTime.h"
|
||||||
#include "DateTime.h"
|
#include "Core/IoContext.h"
|
||||||
#include "IoContext.h"
|
#include "Core/Logger.h"
|
||||||
#include "Live555RtspPusher.h"
|
#include "Core/Singleton.h"
|
||||||
#include "RtspServer.h"
|
#include "RtspServer.h"
|
||||||
#include "VideoInput.h"
|
#include "VideoInput.h"
|
||||||
#include "rw_mpp_api.h"
|
#include "rw_mpp_api.h"
|
||||||
@ -9,6 +9,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
int main(int argc, char const *argv[]) {
|
int main(int argc, char const *argv[]) {
|
||||||
|
using namespace Core;
|
||||||
LOG(info) << "app start...";
|
LOG(info) << "app start...";
|
||||||
int status = rw_mpp__init();
|
int status = rw_mpp__init();
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
@ -16,8 +17,7 @@ int main(int argc, char const *argv[]) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
auto ioContext = Amass::Singleton<IoContext>::instance<Amass::Construct>();
|
auto ioContext = Singleton<IoContext>::construct(std::thread::hardware_concurrency());
|
||||||
auto pusher = std::make_shared<Live555RtspPusher>(*ioContext->ioContext());
|
|
||||||
auto rtsp = std::make_shared<RtspServer>();
|
auto rtsp = std::make_shared<RtspServer>();
|
||||||
|
|
||||||
std::shared_ptr<std::ofstream> ofs;
|
std::shared_ptr<std::ofstream> ofs;
|
||||||
@ -44,7 +44,7 @@ int main(int argc, char const *argv[]) {
|
|||||||
ioContext->ioContext()->stop();
|
ioContext->ioContext()->stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
ioContext->run<IoContext::Mode::Synchronous>();
|
ioContext->run(false);
|
||||||
} catch (const boost::exception &e) {
|
} catch (const boost::exception &e) {
|
||||||
LOG(error) << "error";
|
LOG(error) << "error";
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
项目编号:B061
|
|
||||||
|
|
||||||
摄像头焦距 2.8-12MM
|
摄像头焦距 2.8-12MM
|
||||||
|
|
||||||
静态IP: 192.168.1.108
|
静态IP: 192.168.1.108
|
||||||
|
@ -1,2 +1 @@
|
|||||||
add_subdirectory(LeakTracer)
|
add_subdirectory(LeakTracer)
|
||||||
add_subdirectory(VideoRecoder)
|
|
@ -16,7 +16,7 @@ target_link_directories(LeakTracer
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(LeakTracer
|
target_link_libraries(LeakTracer
|
||||||
PUBLIC Universal
|
PUBLIC Kylin::Core
|
||||||
-Wl,--wrap=malloc
|
-Wl,--wrap=malloc
|
||||||
-Wl,--wrap=free
|
-Wl,--wrap=free
|
||||||
)
|
)
|
@ -1,5 +1,5 @@
|
|||||||
#include "MemoryAllocationStackTracer.h"
|
#include "MemoryAllocationStackTracer.h"
|
||||||
#include "DateTime.h"
|
#include "Core/DateTime.h"
|
||||||
#include <boost/stacktrace/detail/addr_base.hpp>
|
#include <boost/stacktrace/detail/addr_base.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "BoostLog.h"
|
#include "Core/Logger.h"
|
||||||
#include "LeakTracer.h"
|
#include "LeakTracer.h"
|
||||||
#include "MemoryAllocationStackTracer.h"
|
#include "MemoryAllocationStackTracer.h"
|
||||||
#include <boost/stacktrace.hpp>
|
#include <boost/stacktrace.hpp>
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
add_executable(VideoRecoder main.cpp)
|
|
||||||
|
|
||||||
target_link_libraries(VideoRecoder
|
|
||||||
PRIVATE Universal
|
|
||||||
)
|
|
@ -1,6 +0,0 @@
|
|||||||
#include "BoostLog.h"
|
|
||||||
|
|
||||||
int main(int argc, char const *argv[]) {
|
|
||||||
LOG(info) << "app start...";
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -17,4 +17,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
||||||
# set(BOOST_ROOT /opt/toolchains/Libraries/boost_1_83_0)
|
# set(BOOST_ROOT /opt/aarch64-v01c01-linux-gnu-gcc/lib/boost_1_87_0)
|
Loading…
x
Reference in New Issue
Block a user