feat(capture): give CaptureFactory a proper error channel

Replace the nullable unique_ptr returned by CaptureFactory::create()
with CaptureResult<std::unique_ptr<CaptureSession>> using the new
CaptureError/CaptureResult pattern, mirroring codec/error.h. The stub
now reports 'not implemented yet' as an error instead of returning
nullptr. Update handoff memory with the review outcome and
forward-looking notes for phases 3, 5, and 7.
This commit is contained in:
2026-09-07 10:17:59 +02:00
parent c6c062250e
commit ac9dc02b51
4 changed files with 81 additions and 15 deletions
+3 -1
View File
@@ -1,5 +1,7 @@
#pragma once
#include "screencast/capture/error.h"
#include <cstdint>
#include <memory>
#include <optional>
@@ -52,7 +54,7 @@ class CaptureSession {
// Factory for the PipeWire / xdg-desktop-portal capture backend.
class CaptureFactory {
public:
static std::unique_ptr<CaptureSession> create(CaptureTarget target);
static CaptureResult<std::unique_ptr<CaptureSession>> create(CaptureTarget target);
};
} // namespace sc