vaapi-recorder: Encode frames in a separate thread
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 6 Sep 2013 14:49:37 +0000 (17:49 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 11 Sep 2013 18:55:15 +0000 (11:55 -0700)
commitb85ded0cb8e420ca123be5fc6033aef94e8924e4
tree59dfc19a932d9da141ca870388b0c2d2aa7e8d53
parent4aa756dc7a8d3cf3b4c6f018c3e2a053fff424b0
vaapi-recorder: Encode frames in a separate thread

Previously, vaapi_recorder_frame() would wait until the encoded
contents for a frame is written to the output file descriptor. This
delayed the repainting of the next frame, and affected frame rate
when capturing with high resolutions. Instead, wait only if there is
and attempted to encode two frames at the same time.

Increases framerate from 30 to 60 fps when capturing at 1920x1200 on
my SandryBridge system, although there are periodic slowdowns due to
disk writes.
src/compositor-drm.c
src/vaapi-recorder.c