mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Ensure there are enough hwframes for Pacer
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
// that the sum of all queued frames between both pacing and rendering queues
|
||||
// must not exceed the number buffer pool size to avoid running the decoder
|
||||
// out of available decoding surfaces.
|
||||
#define MAX_QUEUED_FRAMES 4
|
||||
#define MAX_QUEUED_FRAMES 3
|
||||
static_assert(PACER_MAX_OUTSTANDING_FRAMES == MAX_QUEUED_FRAMES + 2,
|
||||
"PACER_MAX_OUTSTANDING_FRAMES and MAX_QUEUED_FRAMES must agree");
|
||||
|
||||
// We may be woken up slightly late so don't go all the way
|
||||
// up to the next V-sync since we may accidentally step into
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
|
||||
// The maximum number of frames pacer will ever hold is:
|
||||
// - 3 frames in the pacing queue
|
||||
// - 1 frame removed from the render queue in the process of rendering
|
||||
// - 1 frame for deferred free
|
||||
#define PACER_MAX_OUTSTANDING_FRAMES (3 + 1 + 1)
|
||||
|
||||
class IVsyncSource {
|
||||
public:
|
||||
virtual ~IVsyncSource() {}
|
||||
|
||||
Reference in New Issue
Block a user