4 #ifndef OWT_CONFERENCE_PUBLICATION_H_ 5 #define OWT_CONFERENCE_PUBLICATION_H_ 8 #include "owt/base/commontypes.h" 9 #include "owt/base/mediaconstraints.h" 10 #include "owt/base/publication.h" 11 #include "owt/conference/streamupdateobserver.h" 20 struct ConnectionStats;
22 namespace conference {
23 class ConferenceClient;
28 const std::string& stream_id);
31 std::string
Id()
const {
return id_; }
33 void Mute(TrackKind track_kind,
34 std::function<
void()> on_success,
35 std::function<
void(std::unique_ptr<Exception>)> on_failure)
override;
37 void Unmute(TrackKind track_kind,
38 std::function<
void()> on_success,
39 std::function<
void(std::unique_ptr<Exception>)> on_failure)
override;
42 std::function<
void(std::shared_ptr<ConnectionStats>)> on_success,
43 std::function<
void(std::unique_ptr<Exception>)> on_failure)
override;
46 const std::vector<const webrtc::StatsReport*>& reports)> on_success,
47 std::function<
void(std::unique_ptr<Exception>)> on_failure);
51 bool Ended()
const {
return ended_; }
57 void OnStreamMuteOrUnmute(
const std::string& stream_id, TrackKind track_kind,
bool muted)
override;
58 void OnStreamRemoved(
const std::string& stream_id)
override;
59 void OnStreamError(
const std::string& error_msg)
override;
61 std::string stream_id_;
63 mutable std::mutex observer_mutex_;
64 std::vector<std::reference_wrapper<PublicationObserver>> observers_;
65 std::weak_ptr<ConferenceClient> conference_client_;
66 std::shared_ptr<rtc::TaskQueue> event_queue_;
70 #endif // OWT_CONFERENCE_PUBLICATION_H_ Definition: conferencepublication.h:12
bool Ended() const
Check if the publication is stopped or not.
Definition: conferencepublication.h:51
Definition: publication.h:23
Definition: audioplayerinterface.h:8
Definition: audioplayerinterface.h:9
Definition: conferencepublication.h:25
Observer that receives event from publication.
Definition: publication.h:12
std::string Id() const
Return the ID of the publication.
Definition: conferencepublication.h:31