SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
room_publication.hpp
1//
2// © NTT DOCOMO BUSINESS, Inc. All Rights Reserved.
3//
4
5#ifndef SKYWAY_ROOM_ROOM_PUBLICATION_HPP
6#define SKYWAY_ROOM_ROOM_PUBLICATION_HPP
7
8#include <skyway/core/interface/publication.hpp>
9
10#include "skyway/room/interface/room_domain_factory.hpp"
11#include "skyway/room/interface/room_publication.hpp"
12
13namespace skyway {
14namespace room {
15
19public:
20 RoomPublication(std::shared_ptr<core::interface::Publication> core,
21 interface::RoomDomainFactory* factory);
23 std::string Id() override;
24 std::shared_ptr<interface::RoomMember> Publisher() override;
25 std::vector<std::shared_ptr<interface::RoomSubscription>> Subscriptions() override;
26 model::ContentType ContentType() override;
27 std::optional<std::string> Metadata() override;
28 std::vector<model::Codec> CodecCapabilities() override;
29 std::vector<model::Encoding> Encodings() override;
30 core::interface::PublicationState State() override;
31 std::shared_ptr<core::interface::LocalStream> Stream() override;
34 bool UpdateMetadata(const std::string& metadata) override;
35 bool UpdateEncodings(std::vector<model::Encoding> encodings) override;
36 bool ReplaceStream(std::shared_ptr<core::interface::LocalStream> stream) override;
37 bool Cancel() override;
38 bool Enable() override;
39 bool Disable() override;
40 std::optional<model::WebRTCStats> GetStats(const std::string& selector) override;
41
42private:
43 class OriginEventPropagater : public core::interface::Publication::EventListener {
44 public:
45 OriginEventPropagater(RoomPublication* outer);
46 void OnMetadataUpdated(const std::string& metadata) override;
47
48 private:
49 RoomPublication* outer_;
50 };
51
52 // core::interface::Publication::EventListener
53 void OnUnpublished() override;
54 void OnSubscribed(std::shared_ptr<core::interface::Subscription> subscription) override;
55 void OnUnsubscribed(std::shared_ptr<core::interface::Subscription> subscription) override;
56 void OnSubscriptionListChanged() override;
57 void OnMetadataUpdated(const std::string& metadata) override;
58 void OnEnabled() override;
59 void OnDisabled() override;
60 void OnStateChanged() override;
61 void OnConnectionStateChanged(const core::ConnectionState new_state) override;
62
63 std::shared_ptr<core::interface::Publication> core_;
64 interface::RoomDomainFactory* factory_;
65
66 std::mutex listener_mtx_;
68 OriginEventPropagater* origin_event_propagater_;
69};
70
71} // namespace room
72} // namespace skyway
73
74#endif /* SKYWAY_ROOM_ROOM_PUBLICATION_HPP */
イベントリスナ
Definition publication.hpp:30
RoomPublicationの操作を行うクラス
Definition room_publication.hpp:18
bool ReplaceStream(std::shared_ptr< core::interface::LocalStream > stream) override
公開しているStreamを変更します。
std::optional< std::string > Metadata() override
Metadataを取得します。
std::shared_ptr< core::interface::LocalStream > Stream() override
Publisherが持つStreamを取得します。
void AddEventListener(interface::RoomPublication::EventListener *listener) override
イベントを購読します。
std::vector< model::Encoding > Encodings() override
このPublicationのエンコーディング設定の一覧を取得します。
bool UpdateMetadata(const std::string &metadata) override
Metadataを更新します。
bool Disable() override
Publicationの公開を一時停止します。
std::optional< model::WebRTCStats > GetStats(const std::string &selector) override
統計情報を取得します。
bool Enable() override
Publicationの公開を開始します。disableによって停止していた場合は再開します。
std::vector< model::Codec > CodecCapabilities() override
このPublicationのコーデック一覧を取得します。
bool UpdateEncodings(std::vector< model::Encoding > encodings) override
エンコーディング設定を更新します。
std::shared_ptr< interface::RoomMember > Publisher() override
このPublicationを公開しているMemberを取得します。
void RemoveEventListener(interface::RoomPublication::EventListener *listener) override
イベントの購読を中止します。
model::ContentType ContentType() override
ContentType(VideoかAudioかDataか)を取得します。
core::interface::PublicationState State() override
State(公開状態がEnableかDisabelかCancelか)を取得します。
std::vector< std::shared_ptr< interface::RoomSubscription > > Subscriptions() override
このPublicationを購読しているSubsciptionの一覧を取得します。
bool Cancel() override
Publishを中止します。
std::string Id() override
Idを取得します。
イベントリスナ
Definition room_publication.hpp:21
RoomのPublicationを操作するインタフェース
Definition room_publication.hpp:18