68 TF_AUTO_GAIN_CONTROL = 2,
69 TF_ECHO_CANCELLATION = 3,
70 TF_NOISE_SUPPRESSION = 4,
71 TF_ENHANCED_NOISE_CANCELLATION = 5,
72 TF_PRECONNECT_BUFFER = 6,
85 virtual ~Track() =
default;
88 const std::string& sid()
const noexcept {
return sid_; }
89 const std::string& name()
const noexcept {
return name_; }
90 TrackKind kind()
const noexcept {
return kind_; }
91 StreamState streamState()
const noexcept {
return state_; }
92 bool muted()
const noexcept {
return muted_; }
93 bool remote()
const noexcept {
return remote_; }
96 std::optional<TrackSource> source()
const noexcept {
return source_; }
97 std::optional<bool> simulcasted()
const noexcept {
return simulcasted_; }
98 std::optional<uint32_t> width()
const noexcept {
return width_; }
99 std::optional<uint32_t> height()
const noexcept {
return height_; }
103 std::optional<std::string> mimeType()
const noexcept {
return mime_type_; }
106 bool hasHandle()
const noexcept {
return handle_.valid(); }
107 uintptr_t ffiHandleId()
const noexcept {
return handle_.get(); }
110 std::future<std::vector<RtcStats>> getStats()
const;
114 virtual void setPublication(
const std::shared_ptr<LocalTrackPublication>& publication)
noexcept { (void)publication; }
117 void setStreamState(
StreamState s)
noexcept { state_ = s; }
118 void setMuted(
bool m)
noexcept { muted_ = m; }
119 void setName(std::string n)
noexcept { name_ = std::move(n); }
122 Track(FfiHandle handle, std::string sid, std::string name, TrackKind kind, StreamState state,
bool muted,
125 void setPublicationFields(std::optional<TrackSource> source, std::optional<bool> simulcasted,
126 std::optional<uint32_t> width, std::optional<uint32_t> height,
127 std::optional<std::string> mime_type);
134 TrackKind kind_{TrackKind::KIND_UNKNOWN};
139 std::optional<TrackSource> source_;
140 std::optional<bool> simulcasted_;
141 std::optional<uint32_t> width_;
142 std::optional<uint32_t> height_;
143 std::optional<std::string> mime_type_;
virtual void setPublication(const std::shared_ptr< LocalTrackPublication > &publication) noexcept
After publishing a local track, associates the LocalTrackPublication with this track.
Definition track.h:114