Add -fm 'content' option to match fps to captured content, only x11 window capture currently supported

This commit is contained in:
dec05eba
2024-06-21 22:18:23 +02:00
parent 4bfb095f8d
commit ab78e56872
12 changed files with 214 additions and 41 deletions

View File

@@ -76,6 +76,11 @@ static void gsr_capture_xcomposite_cuda_tick(gsr_capture *cap, AVCodecContext *v
gsr_capture_xcomposite_tick(&cap_xcomp->xcomposite, video_codec_context);
}
static bool gsr_capture_xcomposite_cuda_consume_damage(gsr_capture *cap) {
gsr_capture_xcomposite_cuda *cap_xcomp = cap->priv;
return gsr_capture_xcomposite_consume_damage(&cap_xcomp->xcomposite);
}
static bool gsr_capture_xcomposite_cuda_should_stop(gsr_capture *cap, bool *err) {
gsr_capture_xcomposite_cuda *cap_xcomp = cap->priv;
return gsr_capture_xcomposite_should_stop(&cap_xcomp->xcomposite, err);
@@ -144,6 +149,7 @@ gsr_capture* gsr_capture_xcomposite_cuda_create(const gsr_capture_xcomposite_cud
*cap = (gsr_capture) {
.start = gsr_capture_xcomposite_cuda_start,
.tick = gsr_capture_xcomposite_cuda_tick,
.consume_damage = gsr_capture_xcomposite_cuda_consume_damage,
.should_stop = gsr_capture_xcomposite_cuda_should_stop,
.capture = gsr_capture_xcomposite_cuda_capture,
.capture_end = NULL,