Hit this embedding cefsrc into a .NET Avalonia app on Windows.
Every time the pipeline goes to PLAYING, 4–5 empty black console windows pop up next to my UI -one per CEF child (renderer/GPU/network/utility).
They stick around for the lifetime of the pipeline.
Doesn't happen with gst-launch-1.0 cefsrc url=... because the launcher already owns a console and the children inherit it.
Only shows up when the host is a WINDOWS-subsystem process with no console of its own.
Root cause is one line in CMakeLists.txt (not CMake or c++ expert here):
add_executable(gstcefsubprocess gstcefsubprocess.cc)
No WIN32 keyword -> MSVC defaults to /SUBSYSTEM:CONSOLE -> Windows allocates a console for any console-subsystem child whose parent doesn't already have one.
Can't just add WIN32 because the entry point is int main(...), not WinMain - that'd give linker warnings.
This is the documented MSVC pattern for "GUI subsystem, keep main()".
Something like:
option(GSTCEFSUBPROCESS_WIN32 "Helper subprocess as Windows-subsystem EXE" OFF)
if(WIN32 AND MSVC AND GSTCEFSUBPROCESS_WIN32)
set_target_properties(gstcefsubprocess PROPERTIES WIN32_EXECUTABLE TRUE)
target_link_options(gstcefsubprocess PRIVATE "/ENTRY:mainCRTStartup")
endif()
Off by default so CLI users keep stdout.
Hit this embedding cefsrc into a .NET Avalonia app on Windows.
Every time the pipeline goes to PLAYING, 4–5 empty black console windows pop up next to my UI -one per CEF child (renderer/GPU/network/utility).
They stick around for the lifetime of the pipeline.
Doesn't happen with
gst-launch-1.0 cefsrc url=...because the launcher already owns a console and the children inherit it.Only shows up when the host is a
WINDOWS-subsystem process with no console of its own.Root cause is one line in
CMakeLists.txt(not CMake or c++ expert here):No
WIN32keyword -> MSVC defaults to/SUBSYSTEM:CONSOLE-> Windows allocates a console for any console-subsystem child whose parent doesn't already have one.Can't just add
WIN32because the entry point isint main(...), notWinMain- that'd give linker warnings.This is the documented MSVC pattern for "GUI subsystem, keep main()".
Something like:
Off by default so CLI users keep stdout.