add media server code.
All checks were successful
Deploy / PullDocker (push) Successful in 11s
Deploy / Build (push) Successful in 1m14s

This commit is contained in:
luocai 2024-09-23 19:01:51 +08:00
parent 1a5a903fba
commit 7a87c76543
2 changed files with 13 additions and 0 deletions

View File

@ -8,6 +8,7 @@ add_executable(Server main.cpp
Application.h Application.cpp Application.h Application.cpp
HttpSession.h HttpSession.cpp HttpSession.h HttpSession.cpp
Listener.h Listener.cpp Listener.h Listener.cpp
MediaServer.h MediaServer.cpp
ResponseUtility.h ResponseUtility.cpp ResponseUtility.h ResponseUtility.cpp
ServiceLogic.h ServiceLogic.inl ServiceLogic.cpp ServiceLogic.h ServiceLogic.inl ServiceLogic.cpp
ServiceManager.h ServiceManager.h
@ -18,9 +19,18 @@ add_executable(Server main.cpp
WeChatContext/WeChatSession.h WeChatContext/WeChatSession.cpp WeChatContext/WeChatSession.h WeChatContext/WeChatSession.cpp
) )
target_include_directories(Server
PRIVATE /opt/Libraries/ZLMediaKit/include
)
target_link_directories(Server
PRIVATE /opt/Libraries/ZLMediaKit/lib
)
target_link_libraries(Server target_link_libraries(Server
PRIVATE HttpProxy PRIVATE HttpProxy
PRIVATE Database PRIVATE Database
PRIVATE mk_api
PRIVATE ${Boost_LIBRARIES} PRIVATE ${Boost_LIBRARIES}
) )

View File

@ -12,6 +12,7 @@
#include <boost/property_tree/ini_parser.hpp> #include <boost/property_tree/ini_parser.hpp>
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ptree.hpp>
#include <filesystem> #include <filesystem>
#include "MediaServer.h"
int main(int argc, char const *argv[]) { int main(int argc, char const *argv[]) {
using namespace Amass; using namespace Amass;
@ -96,6 +97,8 @@ int main(int argc, char const *argv[]) {
auto udpServer = std::make_shared<UdpServer>(application->ioContext()); auto udpServer = std::make_shared<UdpServer>(application->ioContext());
auto mediaServer = std::make_shared<MediaServer>();
using namespace boost::asio::ip; using namespace boost::asio::ip;
auto proxyAddress = make_address(application->getServer()); auto proxyAddress = make_address(application->getServer());
uint16_t proxyPort = 41091; uint16_t proxyPort = 41091;