forked from qt-creator/qt-creator
ScreenRecorder: Support recording on macOS
Change-Id: I1f5429939acf82235caf07af85ab3397aee5955d Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -338,14 +338,22 @@ QStringList RecordWidget::ffmpegParameters(const ClipInfo &clipInfo) const
|
||||
};
|
||||
break;
|
||||
}
|
||||
case OsTypeMac:
|
||||
case OsTypeMac: {
|
||||
videoGrabParams = {
|
||||
"-f", "avfoundation",
|
||||
"-framerate", frameRateStr,
|
||||
"-video_size", sizeStr(rS.cropRect.size()),
|
||||
"-i", QString("%1:none").arg(screenIdStr),
|
||||
"-pixel_format", "bgr0",
|
||||
"-i", QString("Capture screen %1:none").arg(rS.screenId),
|
||||
};
|
||||
if (!rS.cropRect.isNull()) {
|
||||
videoGrabParams.append({
|
||||
"-filter_complex", QString("crop=x=%1:y=%2:w=%3:h=%4")
|
||||
.arg(rS.cropRect.x()).arg(rS.cropRect.y())
|
||||
.arg(rS.cropRect.width()).arg(rS.cropRect.height())
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user