SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
context.hpp
1//
2// © NTT DOCOMO BUSINESS, Inc. All Rights Reserved.
3//
4
5#ifndef SKYWAY_CONTEXT_HPP_
6#define SKYWAY_CONTEXT_HPP_
7
8#include <skyway/core/context.hpp>
9#include <skyway/core/interface/remote_member_plugin.hpp>
10#include <skyway/global/error.hpp>
11#include <skyway/global/logger.hpp>
12#include <skyway/network/interface/http_client.hpp>
13#include <skyway/network/interface/websocket_client.hpp>
14#include "skyway/media/codec/video_codec.hpp"
15#include "skyway/media/device_manager.hpp"
16
17namespace skyway {
18namespace media {
19namespace rtp {
20
21class PassthroughVideoEncoderFactoryTest;
22
23} // namespace rtp
24} // namespace media
25
28class Context : public core::Context {
29public:
30 static const unsigned int kVersionMajor = 3;
31 static const unsigned int kVersionMinor = 3;
32 static const unsigned int kVersionPatch = 0;
33
39 struct Rtp {
41 struct Input {
43 struct Video {
51 bool enabled;
62 std::shared_ptr<media::codec::VideoCodec> codec;
63 Video() : enabled(false), codec(nullptr) {}
64 };
67 };
70 };
72 global::interface::Logger::Level log_level = global::interface::Logger::kInfo;
73
75 bool enable_webrtc_log = false;
76
78 skyway::media::AudioBackendType audio_backend =
79 skyway::media::AudioBackendType::kPulseAudio;
80
83
85 struct SFU {
86 std::optional<std::string> domain;
87 std::optional<int> version;
88 std::optional<bool> secure;
89 };
90 SFU sfu;
91 };
92
98 static bool Setup(const std::string& token,
100 const SkyWayOptions& options);
101
108 static bool SetupForDev(const std::string& app_id,
109 const std::string& secret_key,
111 const SkyWayOptions& options);
112
119 static void Dispose();
120
122 static std::string GetVersionString();
123
127 static std::shared_ptr<media::codec::VideoCodec> GetRtpVideoInputCodecWithValidate();
129
130private:
131 inline static SkyWayOptions::Rtp rtp_;
132
133public:
135 friend class media::rtp::PassthroughVideoEncoderFactoryTest;
137};
138} // namespace skyway
139
140#endif /* SKYWAY_CONTEXT_HPP_ */
アプリケーションでSkyWay全体の設定、取得を行うStaticなコンテキスト
Definition context.hpp:28
static std::string GetVersionString()
SkyWay Linux SDKのバージョンを取得します。
static bool SetupForDev(const std::string &app_id, const std::string &secret_key, core::Context::EventListener *listener, const SkyWayOptions &options)
Contextを初期化します。このメソッドは動作確認用です。
static void Dispose()
SkyWayを終了し、Contextを破棄します。
static bool Setup(const std::string &token, core::Context::EventListener *listener, const SkyWayOptions &options)
Contextを初期化します。
イベントリスナ
Definition context.hpp:46
SkyWay全体の設定、取得を行うStaticなコンテキスト
Definition context.hpp:43
Level
ログレベル
Definition logger.hpp:62
RTP映像入力に関する設定
Definition context.hpp:43
bool enabled
RTP映像入力を有効にするかどうか
Definition context.hpp:51
std::shared_ptr< media::codec::VideoCodec > codec
RTP映像入力のコーデック
Definition context.hpp:62
RTP入力に関する設定
Definition context.hpp:41
Video video
RTP映像入力に関する設定
Definition context.hpp:66
SkyWayのRTPに関する設定
Definition context.hpp:39
Input input
RTP入力に関する設定
Definition context.hpp:69
SFUサーバーの接続に関する設定
Definition context.hpp:85
SkyWayの利用に関する設定
Definition context.hpp:35
bool enable_webrtc_log
WebRTCのログを有効にします
Definition context.hpp:75
global::interface::Logger::Level log_level
ログレベル
Definition context.hpp:72
Rtp rtp
RTPに関する設定
Definition context.hpp:82
skyway::media::AudioBackendType audio_backend
オーディオバックエンドを指定します
Definition context.hpp:78
ContextのSetup時に使用するオプション
Definition context_options.hpp:22