修复webserver死锁
This commit is contained in:
@@ -6,20 +6,10 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <chrono>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
namespace renderive::web {
|
||||
enum class Gallery_Render_Result : std::uint8_t {
|
||||
none,
|
||||
inactive,
|
||||
frame_unavailable,
|
||||
cancelled,
|
||||
deadline_exceeded,
|
||||
backend_failure,
|
||||
shutting_down
|
||||
};
|
||||
class Gallery_Scene_Interface {
|
||||
public:
|
||||
virtual ~Gallery_Scene_Interface() = default;
|
||||
@@ -27,13 +17,11 @@ public:
|
||||
[[nodiscard]] virtual nlohmann::json controls() const = 0;
|
||||
[[nodiscard]] virtual Gallery_Frame_Mode frame_mode() const noexcept = 0;
|
||||
virtual void reset_monitoring() = 0;
|
||||
[[nodiscard]] virtual bool can_render_automatically() const noexcept = 0;
|
||||
[[nodiscard]] virtual std::uint64_t kernel_refresh_interval_ns() const = 0;
|
||||
virtual void set_client_metrics(Gallery_Client_Performance metrics) noexcept = 0;
|
||||
[[nodiscard]] virtual adminive::Update_Result apply_patch(std::string_view target, const nlohmann::json& patch) = 0;
|
||||
virtual void resize(int width, int height) = 0;
|
||||
virtual void dispatch(const Gallery_Input_Event& event) = 0;
|
||||
[[nodiscard]] virtual Gallery_Render_Result render_latest_frame() = 0;
|
||||
[[nodiscard]] virtual bool request_frame() = 0;
|
||||
[[nodiscard]] virtual std::optional<std::string> encode_latest_pixels() = 0;
|
||||
virtual void record_pixel_response(std::chrono::steady_clock::time_point request_started, std::chrono::steady_clock::time_point encode_started, std::chrono::steady_clock::time_point encode_finished, std::size_t pixel_bytes) = 0;
|
||||
[[nodiscard]] virtual std::string action(const Gallery_Action_Request& request, bool& recognized) = 0;
|
||||
|
||||
Reference in New Issue
Block a user