62 TF_AUTO_GAIN_CONTROL = 2,
63 TF_ECHO_CANCELLATION = 3,
64 TF_NOISE_SUPPRESSION = 4,
65 TF_ENHANCED_NOISE_CANCELLATION = 5,
66 TF_PRECONNECT_BUFFER = 6,
79 virtual ~Track() =
default;
82 const std::string& sid()
const noexcept {
return sid_; }
83 const std::string& name()
const noexcept {
return name_; }
84 TrackKind kind()
const noexcept {
return kind_; }
85 StreamState streamState()
const noexcept {
return state_; }
86 bool muted()
const noexcept {
return muted_; }
87 bool remote()
const noexcept {
return remote_; }
90 std::optional<TrackSource> source()
const noexcept {
return source_; }
91 std::optional<bool> simulcasted()
const noexcept {
return simulcasted_; }
92 std::optional<uint32_t> width()
const noexcept {
return width_; }
93 std::optional<uint32_t> height()
const noexcept {
return height_; }
97 std::optional<std::string> mimeType()
const noexcept {
return mime_type_; }
100 bool hasHandle()
const noexcept {
return handle_.valid(); }
101 uintptr_t ffiHandleId()
const noexcept {
return handle_.get(); }
104 std::future<std::vector<RtcStats>> getStats()
const;
108 virtual void setPublication(
const std::shared_ptr<LocalTrackPublication>& publication)
noexcept { (void)publication; }
111 void setStreamState(
StreamState s)
noexcept { state_ = s; }
112 void setMuted(
bool m)
noexcept { muted_ = m; }
113 void setName(std::string n)
noexcept { name_ = std::move(n); }
116 Track(FfiHandle handle, std::string sid, std::string name, TrackKind kind, StreamState state,
bool muted,
119 void setPublicationFields(std::optional<TrackSource> source, std::optional<bool> simulcasted,
120 std::optional<uint32_t> width, std::optional<uint32_t> height,
121 std::optional<std::string> mime_type);
128 TrackKind kind_{TrackKind::KIND_UNKNOWN};
133 std::optional<TrackSource> source_;
134 std::optional<bool> simulcasted_;
135 std::optional<uint32_t> width_;
136 std::optional<uint32_t> height_;
137 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:108