SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
types.hpp
[詳解]
1#ifndef SKYWAY_ROOM_TYPES_HPP_
2#define SKYWAY_ROOM_TYPES_HPP_
3
4#include <optional>
5#include <string>
6#include <unordered_map>
7#include <vector>
8
9#include <json.hpp>
10
13
14namespace skyway {
15namespace room {
16
18enum class RoomType { kDefault, kP2P, kSFU };
19
21enum class RoomState { kOpened, kClosed };
22
24enum class MemberState { kJoined, kLeft };
25
27enum class ConnectionState { kNew, kConnecting, kConnected, kReconnecting, kDisconnected };
28
30enum class PublicationState { kEnabled, kDisabled, kCanceled };
31
33enum class SubscriptionState { kEnabled, kDisabled, kCanceled };
34
37struct [[deprecated]] WebRTCStatsReport {
39 std::string id;
41 std::string type;
43 std::unordered_map<std::string, nlohmann::json> params;
44};
45
48struct [[deprecated]] WebRTCStats {
50 std::vector<WebRTCStatsReport> reports;
51};
52
54struct Codec {
56 struct Parameters {
57 std::optional<bool> use_dtx;
58 };
60 std::string mime_type;
63};
64
66struct Encoding {
68 std::optional<std::string> id;
70 std::optional<int> max_bitrate;
72 std::optional<double> scale_resolution_down_by;
74 std::optional<double> max_framerate;
75};
76
78inline std::string ToString(ConnectionState state) {
79 switch (state) {
80 case ConnectionState::kNew:
81 return "new";
82 case ConnectionState::kConnecting:
83 return "connecting";
84 case ConnectionState::kConnected:
85 return "connected";
86 case ConnectionState::kReconnecting:
87 return "reconnecting";
88 case ConnectionState::kDisconnected:
89 return "disconnected";
90 }
91 return "";
92}
93
94} // namespace room
95} // namespace skyway
96
97#endif /* SKYWAY_ROOM_TYPES_HPP_ */
ConnectionState
Publication/Subscriptionの接続状態
Definition types.hpp:27
RoomState
Roomの状態
Definition types.hpp:21
PublicationState
Publicationの公開状態
Definition types.hpp:30
RoomType
Roomの種別
Definition types.hpp:18
SubscriptionState
Subscriptionの購読状態
Definition types.hpp:33
MemberState
Memberの入室状態
Definition types.hpp:24
Dtxオプションを適応するかのオプション
Definition types.hpp:56
コーデック情報
Definition types.hpp:54
Parameters parameters
パラメーター
Definition types.hpp:62
std::string mime_type
mimetype
Definition types.hpp:60
エンコーディング設定
Definition types.hpp:66
std::optional< std::string > id
Id
Definition types.hpp:68
std::optional< double > max_framerate
最大フレームレート
Definition types.hpp:74
std::optional< int > max_bitrate
最大ビットレート
Definition types.hpp:70
std::optional< double > scale_resolution_down_by
解像度の倍率
Definition types.hpp:72
統計情報
Definition types.hpp:48
std::vector< WebRTCStatsReport > reports
統計情報の一覧
Definition types.hpp:50
統計情報の詳細
Definition types.hpp:37
std::unordered_map< std::string, nlohmann::json > params
各パラメーターに対応するJson
Definition types.hpp:43
std::string id
Id
Definition types.hpp:39
std::string type
種類
Definition types.hpp:41