Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: webrtc/api/peerconnectioninterface.h

Issue 1717583002: Non-constraint interfaces for all constrainable interfaces (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase result (no intentional change) Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index 78635e4a56390953917c4b11eb3016b3dcb5f596..d7d96dd22c0d6fe736fba260fffeaf3202483a4f 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -242,6 +242,17 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
ContinualGatheringPolicy continual_gathering_policy;
std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates;
bool disable_prerenderer_smoothing;
+ // Flags corresponding to values set by constraint flags.
+ // rtc::Optional flags can be "missing", in which case the webrtc
+ // default applies.
+ bool disable_ipv6;
+ rtc::Optional<bool> enable_dscp;
+ bool enable_rtp_data_channel;
+ rtc::Optional<bool> cpu_overuse_detection;
+ rtc::Optional<bool> suspend_below_min_bitrate;
+ rtc::Optional<int> screencast_min_bitrate;
+ rtc::Optional<bool> combined_audio_video_bwe;
+ rtc::Optional<bool> enable_dtls_srtp;
RTCConfiguration()
: type(kAll),
bundle_policy(kBundlePolicyBalanced),
@@ -252,7 +263,9 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
ice_connection_receiving_timeout(kUndefined),
ice_backup_candidate_pair_ping_interval(kUndefined),
continual_gathering_policy(GATHER_ONCE),
- disable_prerenderer_smoothing(false) {}
+ disable_prerenderer_smoothing(false),
+ disable_ipv6(false),
+ enable_rtp_data_channel(false) {}
};
struct RTCOfferAnswerOptions {
@@ -381,6 +394,8 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
// The CreateSessionDescriptionObserver callback will be called when done.
virtual void CreateAnswer(CreateSessionDescriptionObserver* observer,
const MediaConstraintsInterface* constraints) = 0;
+ virtual void CreateAnswer(CreateSessionDescriptionObserver* observer,
+ const RTCOfferAnswerOptions& options) = 0;
// Sets the local session description.
// JsepInterface takes the ownership of |desc| even if it fails.
// The |observer| callback will be called when done.
@@ -398,6 +413,7 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
const MediaConstraintsInterface* constraints) {
return false;
}
+ virtual bool UpdateIce(const IceServers& configuration) { return false; }
// Sets the PeerConnection's global configuration to |config|.
// Any changes to STUN/TURN servers or ICE candidate policy will affect the
// next gathering phase, and cause the next call to createOffer to generate
@@ -524,6 +540,12 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
PeerConnectionObserver* observer) = 0;
+ virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ rtc::scoped_ptr<cricket::PortAllocator> allocator,
+ rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+ PeerConnectionObserver* observer) = 0;
+
virtual rtc::scoped_refptr<MediaStreamInterface>
CreateLocalMediaStream(const std::string& label) = 0;
@@ -531,6 +553,8 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
// |constraints| decides audio processing settings but can be NULL.
virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
const MediaConstraintsInterface* constraints) = 0;
+ virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
+ const cricket::AudioOptions& options) = 0;
// Creates a VideoSourceInterface. The new source take ownership of
// |capturer|. |constraints| decides video resolution and frame rate but can
@@ -538,6 +562,8 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints) = 0;
+ virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource(
+ cricket::VideoCapturer* capturer) = 0;
// Creates a new local VideoTrack. The same |source| can be used in several
// tracks.

Powered by Google App Engine
This is Rietveld 408576698