| Index: talk/app/webrtc/webrtcsession.h
|
| diff --git a/talk/app/webrtc/webrtcsession.h b/talk/app/webrtc/webrtcsession.h
|
| index 1ad9a69e5953ecfd65c2e32b8e45e8e1c2c5034a..582d6d0bd5cf2126c03b027d0fdd1a48481ea473 100644
|
| --- a/talk/app/webrtc/webrtcsession.h
|
| +++ b/talk/app/webrtc/webrtcsession.h
|
| @@ -29,7 +29,6 @@
|
| #define TALK_APP_WEBRTC_WEBRTCSESSION_H_
|
|
|
| #include <string>
|
| -#include <vector>
|
|
|
| #include "talk/app/webrtc/datachannel.h"
|
| #include "talk/app/webrtc/dtmfsender.h"
|
| @@ -50,6 +49,7 @@
|
| class ChannelManager;
|
| class DataChannel;
|
| class StatsReport;
|
| +class Transport;
|
| class VideoCapturer;
|
| class VideoChannel;
|
| class VoiceChannel;
|
| @@ -77,8 +77,6 @@
|
| extern const char kSessionErrorDesc[];
|
| extern const char kDtlsSetupFailureRtp[];
|
| extern const char kDtlsSetupFailureRtcp[];
|
| -extern const char kEnableBundleFailed[];
|
| -
|
| // Maximum number of received video streams that will be processed by webrtc
|
| // even if they are not signalled beforehand.
|
| extern const int kMaxUnsignalledRecvStreams;
|
| @@ -237,19 +235,6 @@
|
| // This avoids exposing the internal structures used to track them.
|
| virtual bool GetTransportStats(cricket::SessionStats* stats);
|
|
|
| - // Get stats for a specific channel
|
| - bool GetChannelTransportStats(cricket::BaseChannel* ch,
|
| - cricket::SessionStats* stats);
|
| -
|
| - // virtual so it can be mocked in unit tests
|
| - virtual bool GetLocalCertificate(
|
| - const std::string& transport_name,
|
| - rtc::scoped_refptr<rtc::RTCCertificate>* certificate);
|
| -
|
| - // Caller owns returned certificate
|
| - virtual bool GetRemoteSSLCertificate(const std::string& transport_name,
|
| - rtc::SSLCertificate** cert);
|
| -
|
| // Implements DataChannelFactory.
|
| rtc::scoped_refptr<DataChannel> CreateDataChannel(
|
| const std::string& label,
|
| @@ -269,7 +254,6 @@
|
|
|
| // For unit test.
|
| bool waiting_for_certificate_for_testing() const;
|
| - const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing();
|
|
|
| void set_metrics_observer(
|
| webrtc::MetricsObserverInterface* metrics_observer) {
|
| @@ -285,6 +269,9 @@
|
| kAnswer,
|
| };
|
|
|
| + // Invokes ConnectChannels() on transport proxies, which initiates ice
|
| + // candidates allocation.
|
| + bool StartCandidatesAllocation();
|
| bool UpdateSessionState(Action action, cricket::ContentSource source,
|
| std::string* err_desc);
|
| static Action GetAction(const std::string& type);
|
| @@ -294,13 +281,25 @@
|
| cricket::ContentSource source,
|
| std::string* error_desc);
|
|
|
| - cricket::BaseChannel* GetChannel(const std::string& content_name);
|
| - // Cause all the BaseChannels in the bundle group to have the same
|
| - // transport channel.
|
| - bool EnableBundle(const cricket::ContentGroup& bundle);
|
| +
|
| + // Transport related callbacks, override from cricket::BaseSession.
|
| + virtual void OnTransportRequestSignaling(cricket::Transport* transport);
|
| + virtual void OnTransportConnecting(cricket::Transport* transport);
|
| + virtual void OnTransportWritable(cricket::Transport* transport);
|
| + virtual void OnTransportCompleted(cricket::Transport* transport);
|
| + virtual void OnTransportFailed(cricket::Transport* transport);
|
| + virtual void OnTransportProxyCandidatesReady(
|
| + cricket::TransportProxy* proxy,
|
| + const cricket::Candidates& candidates);
|
| + virtual void OnCandidatesAllocationDone();
|
| + void OnTransportReceiving(cricket::Transport* transport) override;
|
|
|
| // Enables media channels to allow sending of media.
|
| void EnableChannels();
|
| + // Creates a JsepIceCandidate and adds it to the local session description
|
| + // and notify observers. Called when a new local candidate have been found.
|
| + void ProcessNewLocalCandidate(const std::string& content_name,
|
| + const cricket::Candidates& candidates);
|
| // Returns the media index for a local ice candidate given the content name.
|
| // Returns false if the local session description does not have a media
|
| // content called |content_name|.
|
| @@ -313,7 +312,8 @@
|
| bool UseCandidate(const IceCandidateInterface* candidate);
|
| // Deletes the corresponding channel of contents that don't exist in |desc|.
|
| // |desc| can be null. This means that all channels are deleted.
|
| - void RemoveUnusedChannels(const cricket::SessionDescription* desc);
|
| + void RemoveUnusedChannelsAndTransports(
|
| + const cricket::SessionDescription* desc);
|
|
|
| // Allocates media channels based on the |desc|. If |desc| doesn't have
|
| // the BUNDLE option, this method will disable BUNDLE in PortAllocator.
|
| @@ -362,20 +362,10 @@
|
| const SessionDescriptionInterface* remote_desc,
|
| bool* valid);
|
|
|
| - void OnTransportControllerConnectionState(cricket::IceConnectionState state);
|
| - void OnTransportControllerReceiving(bool receiving);
|
| - void OnTransportControllerGatheringState(cricket::IceGatheringState state);
|
| - void OnTransportControllerCandidatesGathered(
|
| - const std::string& transport_name,
|
| - const cricket::Candidates& candidates);
|
| -
|
| std::string GetSessionErrorMsg();
|
|
|
| - // Invoked when TransportController connection completion is signaled.
|
| - // Reports stats for all transports in use.
|
| - void ReportTransportStats();
|
| -
|
| - // Gather the usage of IPv4/IPv6 as best connection.
|
| + // Invoked when OnTransportCompleted is signaled to gather the usage
|
| + // of IPv4/IPv6 as best connection.
|
| void ReportBestConnectionState(const cricket::TransportStats& stats);
|
|
|
| void ReportNegotiatedCiphers(const cricket::TransportStats& stats);
|
|
|