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;
|
break;
|
||||||
}
|
}
|
||||||
case OsTypeMac:
|
case OsTypeMac: {
|
||||||
videoGrabParams = {
|
videoGrabParams = {
|
||||||
"-f", "avfoundation",
|
"-f", "avfoundation",
|
||||||
"-framerate", frameRateStr,
|
"-framerate", frameRateStr,
|
||||||
"-video_size", sizeStr(rS.cropRect.size()),
|
"-pixel_format", "bgr0",
|
||||||
"-i", QString("%1:none").arg(screenIdStr),
|
"-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;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user