5#ifndef SKYWAY_ROOM_ROOM_PUBLICATION_HPP
6#define SKYWAY_ROOM_ROOM_PUBLICATION_HPP
8#include <skyway/core/interface/publication.hpp>
10#include "skyway/room/interface/room_domain_factory.hpp"
11#include "skyway/room/interface/room_publication.hpp"
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;
27 std::optional<std::string>
Metadata()
override;
30 core::interface::PublicationState
State()
override;
31 std::shared_ptr<core::interface::LocalStream>
Stream()
override;
36 bool ReplaceStream(std::shared_ptr<core::interface::LocalStream> stream)
override;
40 std::optional<model::WebRTCStats>
GetStats(
const std::string& selector)
override;
46 void OnMetadataUpdated(
const std::string& metadata)
override;
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;
63 std::shared_ptr<core::interface::Publication> core_;
64 interface::RoomDomainFactory* factory_;
66 std::mutex listener_mtx_;
68 OriginEventPropagater* origin_event_propagater_;
イベントリスナ
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