mirror of
https://github.com/thinkonmay/sunshine-sdk.git
synced 2026-01-08 21:14:14 +00:00
fix window logic
This commit is contained in:
parent
4fdda48259
commit
ca801f1829
@ -95,7 +95,7 @@ func main() {
|
||||
}
|
||||
|
||||
memory := (*C.SharedMemory)(unsafe.Pointer(pointer))
|
||||
memory.queues[C.Video0].metadata.codec = C.int(1)
|
||||
memory.queues[C.Video0].metadata.codec = C.int(0)
|
||||
memory.queues[C.Video1].metadata.codec = C.int(0)
|
||||
memory.queues[C.Audio].metadata.codec = C.int(3)
|
||||
|
||||
@ -135,7 +135,7 @@ func main() {
|
||||
}(&memory.queues[queue_type], i)
|
||||
}
|
||||
|
||||
fmt.Printf("execute sunshine with command : ./sunshine.exe \"%s\"\n", byteSliceToString(buffer))
|
||||
fmt.Printf("execute sunshine with command : ./sunshine.exe \"%s\" 0\n", byteSliceToString(buffer))
|
||||
chann := make(chan os.Signal, 16)
|
||||
signal.Notify(chann, syscall.SIGTERM, os.Interrupt)
|
||||
<-chann
|
||||
|
||||
11
src/main.cpp
11
src/main.cpp
@ -144,11 +144,11 @@ main(int argc, char *argv[]) {
|
||||
|
||||
int queuetype = -1;
|
||||
std::stringstream ss; ss << argv[2]; ss >> queuetype;
|
||||
if ((queuetype != QueueType::Audio &&
|
||||
queuetype != QueueType::Input) ||
|
||||
video::probe_encoders()) {
|
||||
BOOST_LOG(error) << "Video failed to find working encoder"sv;
|
||||
return -1;
|
||||
if(queuetype != QueueType::Audio && queuetype != QueueType::Input) {
|
||||
if (video::probe_encoders()) {
|
||||
BOOST_LOG(error) << "Video failed to find working encoder"sv;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
//Get buffer local address from handle
|
||||
@ -254,6 +254,7 @@ main(int argc, char *argv[]) {
|
||||
while (!process_shutdown_event->peek() && !local_shutdown->peek())
|
||||
std::this_thread::sleep_for(1s);
|
||||
|
||||
BOOST_LOG(info) << "Closed" << queuetype;
|
||||
// let other threads to close
|
||||
std::this_thread::sleep_for(1s);
|
||||
task_pool.stop();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user