From 043a03e8835df81028c6bc691bd05a8515a38540 Mon Sep 17 00:00:00 2001 From: Jason Millard Date: Sun, 5 Nov 2023 14:37:42 -0500 Subject: [PATCH] misc: redesign to support es --- VPXDisplayServer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/VPXDisplayServer.cpp b/VPXDisplayServer.cpp index 900808e..387a12d 100644 --- a/VPXDisplayServer.cpp +++ b/VPXDisplayServer.cpp @@ -220,6 +220,7 @@ void VPXDisplayServer::Capture(struct mg_connection *c, void *ev_data) string szPosition = ":0.0+" + std::to_string(m_tableWidth) + ",0"; const char* command_line[] = {"/usr/bin/ffmpeg", + "-y", "-f", "x11grab", "-video_size", szSize.c_str(), "-i", szPosition.c_str(), @@ -275,6 +276,7 @@ void VPXDisplayServer::CaptureES(struct mg_connection *c, void *ev_data) string szSize = std::to_string(m_tableWidth) + "x" + std::to_string(m_tableHeight); const char* command_line[] = {"/usr/bin/ffmpeg", + "-y" "-f", "x11grab", "-video_size", szSize.c_str(), "-i", ":0.0", @@ -317,6 +319,7 @@ void VPXDisplayServer::CaptureES(struct mg_connection *c, void *ev_data) string szSize = std::to_string(m_tableWidth) + "x" + std::to_string(m_tableHeight); const char* command_line[] = {"/usr/bin/ffmpeg", + "-y", "-f", "x11grab", "-video_size", szSize.c_str(), "-framerate", "30", @@ -341,7 +344,7 @@ void VPXDisplayServer::CaptureES(struct mg_connection *c, void *ev_data) std::string command = ss.str(); PLOGI << command; - + struct subprocess_s subprocess; if (!subprocess_create_ex(command_line, 0, environment, &subprocess)) { int process_return;