Release swapchain earlier

Encoders now have a buffer for next image so that they can encode one
and the compositor write to an other one.
This commit is contained in:
Patrick Nicolas
2024-09-11 23:41:10 +02:00
parent 517b572c75
commit 7e8c479cc5
11 changed files with 311 additions and 253 deletions
+2 -3
View File
@@ -28,7 +28,7 @@ class VideoEncoderFFMPEG : public xrt::drivers::wivrn::VideoEncoder
public:
using Codec = xrt::drivers::wivrn::video_codec;
std::optional<data> encode(bool idr, std::chrono::steady_clock::time_point target_timestamp) override;
std::optional<data> encode(bool idr, std::chrono::steady_clock::time_point target_timestamp, uint8_t slot) override;
struct mute_logs
{
@@ -40,8 +40,7 @@ protected:
VideoEncoderFFMPEG() :
xrt::drivers::wivrn::VideoEncoder(true) {}
virtual void
PushFrame(bool idr, std::chrono::steady_clock::time_point pts) = 0;
virtual void push_frame(bool idr, std::chrono::steady_clock::time_point pts, uint8_t slot) = 0;
av_codec_context_ptr encoder_ctx;