Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
pipewire_session.h
Go to the documentation of this file.
1
4#pragma once
5
6#include <chrono>
7#include <cstdint>
8#include <memory>
9#include <string>
10#include <vector>
11
12namespace platf::kwin {
13 struct frame_t {
14 std::uint32_t width {};
15 std::uint32_t height {};
16 std::vector<std::uint8_t> bgrx;
17 std::chrono::steady_clock::time_point timestamp;
18 };
19
20 enum class frame_result_t {
21 ready,
22 timeout,
23 failed
24 };
25
26 class video_receiver_t {
27 public:
28 static std::unique_ptr<video_receiver_t> open(const std::string &socket, std::uint64_t serial, std::uint32_t width, std::uint32_t height, std::uint32_t framerate, std::string &error);
29 ~video_receiver_t();
30 video_receiver_t(const video_receiver_t &) = delete;
31 video_receiver_t &operator=(const video_receiver_t &) = delete;
32 frame_result_t next(frame_t &frame, std::chrono::milliseconds timeout, std::string &error);
33
34 private:
35 struct impl_t;
36 explicit video_receiver_t(std::unique_ptr<impl_t> impl);
37 std::unique_ptr<impl_t> impl;
38 };
39} // namespace platf::kwin
@ timeout
Timeout.
Definition common.h:438