4 #ifndef OWT_CONFERENCE_SUBSCRIPTION_H_ 5 #define OWT_CONFERENCE_SUBSCRIPTION_H_ 8 #include "owt/base/commontypes.h" 9 #include "owt/base/mediaconstraints.h" 10 #include "owt/base/subscription.h" 11 #include "owt/base/connectionstats.h" 12 #include "owt/base/exception.h" 13 #include "owt/conference/streamupdateobserver.h" 14 #include "owt/conference/subscribeoptions.h" 22 namespace conference {
23 class ConferenceClient;
26 public std::enable_shared_from_this<ConferenceSubscription> {
29 const std::string& stream_id);
32 void Mute(TrackKind track_kind,
33 std::function<
void()> on_success,
34 std::function<
void(std::unique_ptr<Exception>)> on_failure);
36 void Unmute(TrackKind track_kind,
37 std::function<
void()> on_success,
38 std::function<
void(std::unique_ptr<Exception>)> on_failure);
41 std::function<
void(std::shared_ptr<ConnectionStats>)> on_success,
42 std::function<
void(std::unique_ptr<Exception>)> on_failure);
45 const std::vector<const webrtc::StatsReport*>& reports)> on_success,
46 std::function<
void(std::unique_ptr<Exception>)> on_failure);
52 std::string
Id()
const {
return id_; }
56 std::function<
void()> on_success,
57 std::function<
void(std::unique_ptr<Exception>)> on_failure);
63 void OnStreamMuteOrUnmute(
const std::string& stream_id, TrackKind track_kind,
bool muted);
64 void OnStreamRemoved(
const std::string& stream_id);
65 void OnStreamError(
const std::string& error_msg);
67 std::string stream_id_;
69 mutable std::mutex observer_mutex_;
70 std::vector<std::reference_wrapper<SubscriptionObserver>> observers_;
71 std::weak_ptr<ConferenceClient> conference_client_;
72 std::shared_ptr<rtc::TaskQueue> event_queue_;
77 #endif // OWT_CONFERENCE_SUBSCRIPTION_H_ Definition: conferencepublication.h:12
bool Ended()
If the Subscription is stopped or not.
Definition: conferencesubscription.h:50
Definition: audioplayerinterface.h:8
Definition: audioplayerinterface.h:9
std::string Id() const
Get the subscription ID.
Definition: conferencesubscription.h:52
Observer that receives events from subscription.
Definition: subscription.h:11
Subscription update option used by subscription's ApplyOptions API.
Definition: subscribeoptions.h:65
Definition: conferencesubscription.h:25