From 494ff28573486f12e0164eec3758570f5820aaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Thu, 7 Feb 2019 18:13:55 +0100 Subject: [PATCH] Delete unused media constraints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:9239 Change-Id: I3a0a6b3f8d08bcc589e4f6490731fbe1598d0463 Reviewed-on: https://webrtc-review.googlesource.com/c/121820 Reviewed-by: Steve Anton Reviewed-by: Kári Helgason Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/master@{#26611} --- api/media_constraints_interface.cc | 14 ------------- api/media_constraints_interface.h | 20 ------------------- api/test/fake_constraints.h | 20 ------------------- .../api/peerconnection/RTCMediaConstraints.h | 8 -------- .../api/peerconnection/RTCMediaConstraints.mm | 16 --------------- 5 files changed, 78 deletions(-) diff --git a/api/media_constraints_interface.cc b/api/media_constraints_interface.cc index ddf55595f4..e16fc19590 100644 --- a/api/media_constraints_interface.cc +++ b/api/media_constraints_interface.cc @@ -80,18 +80,8 @@ const char MediaConstraintsInterface::kValueTrue[] = "true"; const char MediaConstraintsInterface::kValueFalse[] = "false"; // Constraints declared as static members in mediastreaminterface.h -// Specified by draft-alvestrand-constraints-resolution-00b -const char MediaConstraintsInterface::kMinAspectRatio[] = "minAspectRatio"; -const char MediaConstraintsInterface::kMaxAspectRatio[] = "maxAspectRatio"; -const char MediaConstraintsInterface::kMaxWidth[] = "maxWidth"; -const char MediaConstraintsInterface::kMinWidth[] = "minWidth"; -const char MediaConstraintsInterface::kMaxHeight[] = "maxHeight"; -const char MediaConstraintsInterface::kMinHeight[] = "minHeight"; -const char MediaConstraintsInterface::kMaxFrameRate[] = "maxFrameRate"; -const char MediaConstraintsInterface::kMinFrameRate[] = "minFrameRate"; // Audio constraints. -const char MediaConstraintsInterface::kEchoCancellation[] = "echoCancellation"; const char MediaConstraintsInterface::kGoogEchoCancellation[] = "googEchoCancellation"; const char MediaConstraintsInterface::kExtendedFilterEchoCancellation[] = @@ -113,9 +103,6 @@ const char MediaConstraintsInterface::kAudioMirroring[] = "googAudioMirroring"; const char MediaConstraintsInterface::kAudioNetworkAdaptorConfig[] = "googAudioNetworkAdaptorConfig"; -// Google-specific constraint keys for a local video source (getUserMedia). -const char MediaConstraintsInterface::kNoiseReduction[] = "googNoiseReduction"; - // Constraint keys for CreateOffer / CreateAnswer defined in W3C specification. const char MediaConstraintsInterface::kOfferToReceiveAudio[] = "OfferToReceiveAudio"; @@ -144,7 +131,6 @@ const char MediaConstraintsInterface::kScreencastMinBitrate[] = // TODO(ronghuawu): Remove once cpu overuse detection is stable. const char MediaConstraintsInterface::kCpuOveruseDetection[] = "googCpuOveruseDetection"; -const char MediaConstraintsInterface::kPayloadPadding[] = "googPayloadPadding"; const char MediaConstraintsInterface::kNumSimulcastLayers[] = "googNumSimulcastLayers"; diff --git a/api/media_constraints_interface.h b/api/media_constraints_interface.h index fc49cbe0e8..adfa2b54b6 100644 --- a/api/media_constraints_interface.h +++ b/api/media_constraints_interface.h @@ -51,19 +51,7 @@ class MediaConstraintsInterface { bool FindFirst(const std::string& key, std::string* value) const; }; - // Constraint keys used by a local video source. - // Specified by draft-alvestrand-constraints-resolution-00b - static const char kMinAspectRatio[]; // minAspectRatio - static const char kMaxAspectRatio[]; // maxAspectRatio - static const char kMaxWidth[]; // maxWidth - static const char kMinWidth[]; // minWidth - static const char kMaxHeight[]; // maxHeight - static const char kMinHeight[]; // minHeight - static const char kMaxFrameRate[]; // maxFrameRate - static const char kMinFrameRate[]; // minFrameRate - // Constraint keys used by a local audio source. - static const char kEchoCancellation[]; // echoCancellation // These keys are google specific. static const char kGoogEchoCancellation[]; // googEchoCancellation @@ -80,9 +68,6 @@ class MediaConstraintsInterface { static const char kAudioNetworkAdaptorConfig[]; // goodAudioNetworkAdaptorConfig - // Google-specific constraint keys for a local video source - static const char kNoiseReduction[]; // googNoiseReduction - // Constraint keys for CreateOffer / CreateAnswer // Specified by the W3C PeerConnection spec static const char kOfferToReceiveVideo[]; // OfferToReceiveVideo @@ -113,11 +98,6 @@ class MediaConstraintsInterface { static const char kCombinedAudioVideoBwe[]; // googCombinedAudioVideoBwe static const char kScreencastMinBitrate[]; // googScreencastMinBitrate static const char kCpuOveruseDetection[]; // googCpuOveruseDetection - static const char kPayloadPadding[]; // googPayloadPadding - - // The prefix of internal-only constraints whose JS set values should be - // stripped by Chrome before passed down to Libjingle. - static const char kInternalConstraintPrefix[]; // Specifies number of simulcast layers for all video tracks // with a Plan B offer/answer diff --git a/api/test/fake_constraints.h b/api/test/fake_constraints.h index e2b26d111c..7080fb2d35 100644 --- a/api/test/fake_constraints.h +++ b/api/test/fake_constraints.h @@ -53,26 +53,6 @@ class FakeConstraints : public webrtc::MediaConstraintsInterface { optional_.push_back(Constraint(key, rtc::ToString(value))); } - void SetMandatoryMinAspectRatio(double ratio) { - SetMandatory(MediaConstraintsInterface::kMinAspectRatio, ratio); - } - - void SetMandatoryMinWidth(int width) { - SetMandatory(MediaConstraintsInterface::kMinWidth, width); - } - - void SetMandatoryMinHeight(int height) { - SetMandatory(MediaConstraintsInterface::kMinHeight, height); - } - - void SetOptionalMaxWidth(int width) { - AddOptional(MediaConstraintsInterface::kMaxWidth, width); - } - - void SetMandatoryMaxFrameRate(int frame_rate) { - SetMandatory(MediaConstraintsInterface::kMaxFrameRate, frame_rate); - } - void SetMandatoryReceiveAudio(bool enable) { SetMandatory(MediaConstraintsInterface::kOfferToReceiveAudio, enable); } diff --git a/sdk/objc/api/peerconnection/RTCMediaConstraints.h b/sdk/objc/api/peerconnection/RTCMediaConstraints.h index eb12a592f9..5c1a12e33a 100644 --- a/sdk/objc/api/peerconnection/RTCMediaConstraints.h +++ b/sdk/objc/api/peerconnection/RTCMediaConstraints.h @@ -15,14 +15,6 @@ NS_ASSUME_NONNULL_BEGIN /** Constraint keys for media sources. */ -RTC_EXTERN NSString *const kRTCMediaConstraintsMinAspectRatio; -RTC_EXTERN NSString *const kRTCMediaConstraintsMaxAspectRatio; -RTC_EXTERN NSString *const kRTCMediaConstraintsMaxWidth; -RTC_EXTERN NSString *const kRTCMediaConstraintsMinWidth; -RTC_EXTERN NSString *const kRTCMediaConstraintsMaxHeight; -RTC_EXTERN NSString *const kRTCMediaConstraintsMinHeight; -RTC_EXTERN NSString *const kRTCMediaConstraintsMaxFrameRate; -RTC_EXTERN NSString *const kRTCMediaConstraintsMinFrameRate; /** The value for this key should be a base64 encoded string containing * the data from the serialized configuration proto. */ diff --git a/sdk/objc/api/peerconnection/RTCMediaConstraints.mm b/sdk/objc/api/peerconnection/RTCMediaConstraints.mm index a45486feac..0a6b9d8911 100644 --- a/sdk/objc/api/peerconnection/RTCMediaConstraints.mm +++ b/sdk/objc/api/peerconnection/RTCMediaConstraints.mm @@ -14,22 +14,6 @@ #include -NSString * const kRTCMediaConstraintsMinAspectRatio = - @(webrtc::MediaConstraintsInterface::kMinAspectRatio); -NSString * const kRTCMediaConstraintsMaxAspectRatio = - @(webrtc::MediaConstraintsInterface::kMaxAspectRatio); -NSString * const kRTCMediaConstraintsMinWidth = - @(webrtc::MediaConstraintsInterface::kMinWidth); -NSString * const kRTCMediaConstraintsMaxWidth = - @(webrtc::MediaConstraintsInterface::kMaxWidth); -NSString * const kRTCMediaConstraintsMinHeight = - @(webrtc::MediaConstraintsInterface::kMinHeight); -NSString * const kRTCMediaConstraintsMaxHeight = - @(webrtc::MediaConstraintsInterface::kMaxHeight); -NSString * const kRTCMediaConstraintsMinFrameRate = - @(webrtc::MediaConstraintsInterface::kMinFrameRate); -NSString * const kRTCMediaConstraintsMaxFrameRate = - @(webrtc::MediaConstraintsInterface::kMaxFrameRate); NSString * const kRTCMediaConstraintsAudioNetworkAdaptorConfig = @(webrtc::MediaConstraintsInterface::kAudioNetworkAdaptorConfig);