Closed Suraj-Yadav closed 1 year ago
@Suraj-Yadav You should look into the source - there is a config section for Windows that describes the behavior of windows.
@ayeganov Thank you for your suggestion.
I did find about wShowWindow
, and after editing this out, player GUI was visible. But now player window was not active, and required manual switching.
While searching for a way to make window active, I found about start
command in cmd
. This provided a straight forward solution, eliminating the need to change wShowWindow
.
To force player GUI to open, change arguments to
const std::vector<std::string> playerCmds{
"cmd", "/C",
"absolute path to mpv.exe", // or "absolute path to ffplay.exe",
"absolute path to sample.mkv"};
To make sure that player GUI is active, change arguments to
const std::vector<std::string> playerCmds{
"cmd", "/C", "start",
"absolute path to mpv.exe", // or "absolute path to ffplay.exe",
"absolute path to sample.mkv"};
I am trying to call a video player from a C++ program, but no GUI shows up. Task Manager shows that player process is running. When
ffplay
is used, the debug output is shown in console, so I know that the process is at least running. Is there any option I forgot to use somewhere?Sample code to reproduce issue