steamcompmgr: add basic handling of system() ffmpeg call
This commit is contained in:
parent
054dcec856
commit
45c9ffd088
1 changed files with 8 additions and 2 deletions
|
@ -2116,9 +2116,15 @@ paint_all(bool async)
|
|||
char cmd[4096];
|
||||
sprintf(cmd, "ffmpeg -f rawvideo -pixel_format nv12 -video_size %dx%d -i %s %s_encoded.png", pCaptureTexture->width(), pCaptureTexture->height(), pTimeBuffer, pTimeBuffer);
|
||||
|
||||
system(cmd);
|
||||
int ret = system(cmd);
|
||||
|
||||
xwm_log.infof("Screenshot saved to %s", pTimeBuffer);
|
||||
/* Above call may fail, ffmpeg returns 0 on success */
|
||||
if (ret) {
|
||||
xwm_log.infof("Ffmpeg call return status %i", ret);
|
||||
xwm_log.errorf( "Failed to save screenshot to %s", pTimeBuffer );
|
||||
} else {
|
||||
xwm_log.infof("Screenshot saved to %s", pTimeBuffer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue