diff options
Diffstat (limited to 'dom/media/webrtc/transport/nricemediastream.h')
-rw-r--r-- | dom/media/webrtc/transport/nricemediastream.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/media/webrtc/transport/nricemediastream.h b/dom/media/webrtc/transport/nricemediastream.h index 406373573c..d434dd34dd 100644 --- a/dom/media/webrtc/transport/nricemediastream.h +++ b/dom/media/webrtc/transport/nricemediastream.h @@ -126,6 +126,12 @@ struct NrIceCandidatePair { class NrIceMediaStream { public: + enum GatheringState { + ICE_STREAM_GATHER_INIT, + ICE_STREAM_GATHER_STARTED, + ICE_STREAM_GATHER_COMPLETE + }; + NrIceMediaStream(NrIceCtx* ctx, const std::string& id, const std::string& name, size_t components); @@ -182,6 +188,9 @@ class NrIceMediaStream { void Ready(nr_ice_media_stream* stream); void Failed(); + void OnGatheringStarted(nr_ice_media_stream* stream); + void OnGatheringComplete(nr_ice_media_stream* stream); + // Close the stream. Called by the NrIceCtx. // Different from the destructor because other people // might be holding RefPtrs but we want those writes to fail once @@ -192,9 +201,14 @@ class NrIceMediaStream { // the candidate belongs to. const std::string& GetId() const { return id_; } + bool AllGenerationsDoneGathering() const; + bool AnyGenerationIsConnected() const; + sigslot::signal5<NrIceMediaStream*, const std::string&, const std::string&, const std::string&, const std::string&> SignalCandidate; // A new ICE candidate: + sigslot::signal2<const std::string&, NrIceMediaStream::GatheringState> + SignalGatheringStateChange; sigslot::signal1<NrIceMediaStream*> SignalReady; // Candidate pair ready. sigslot::signal1<NrIceMediaStream*> SignalFailed; // Candidate pair failed. |