summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/transport/nricemediastream.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/media/webrtc/transport/nricemediastream.h
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/webrtc/transport/nricemediastream.h')
-rw-r--r--dom/media/webrtc/transport/nricemediastream.h14
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.