remove IPC implementation

This commit is contained in:
pigeatgarlic 2025-01-05 09:20:16 +00:00
parent c49500a341
commit e0ed079259
5 changed files with 8 additions and 16 deletions

View File

@ -1,21 +1,11 @@
# common target definitions
# this file will also load platform specific macros
add_library(parent SHARED
"${CMAKE_SOURCE_DIR}/smemory.h"
"${CMAKE_SOURCE_DIR}/lib/interprocess.h"
"${CMAKE_SOURCE_DIR}/lib/interprocess.cpp"
)
set_target_properties(parent PROPERTIES CXX_STANDARD 20)
add_executable(sunshine ${SUNSHINE_TARGET_FILES})
# platform specific target definitions
if(WIN32)
include(${CMAKE_MODULE_PATH}/targets/windows.cmake)
set_property(TARGET parent APPEND_STRING PROPERTY LINK_FLAGS " -static")
set_property(TARGET parent APPEND_STRING PROPERTY LINK_FLAGS " -static-libgcc")
set_property(TARGET parent APPEND_STRING PROPERTY LINK_FLAGS " -static-libstdc++")
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/targets/unix.cmake)

View File

@ -27,5 +27,5 @@ func main() {
}
func serve(pc net.PacketConn, addr net.Addr, buf []byte) {
fmt.Printf("udp packet size %d\n",len(buf))
fmt.Printf("udp packet size %d from %s\n",len(buf),addr.String())
}

View File

@ -12,7 +12,10 @@
#include <sstream>
void
init_shared_memory(SharedMemory* memory){
init_shared_memory(SharedMemory** _memory){
*_memory = (SharedMemory*) malloc(sizeof(SharedMemory));
SharedMemory* memory = *_memory;
memset(memory,0,sizeof(SharedMemory));
for (int j = 0; j < QueueType::QueueMax; j++) {
for (int k = 0; k < EventType::EventMax; k++)
memory->queues[j].events[k].read = 1;

View File

@ -11,7 +11,7 @@
void
init_shared_memory(SharedMemory* shm);
init_shared_memory(SharedMemory** shm);
void
push_packet(Queue* memory, void* data, int size, PacketMetadata metadata);

View File

@ -164,9 +164,8 @@ main(int argc, char *argv[]) {
}
//Get buffer local address from handle
SharedMemory* memory = (SharedMemory*) malloc(sizeof(SharedMemory));
memset(memory,0,sizeof(SharedMemory));
init_shared_memory(memory);
SharedMemory* memory = 0;
init_shared_memory(&memory);
BOOST_LOG(info) << "Allocated shared memory"sv;
auto video_capture = [&](safe::mail_t mail, char* displayin,int codec){