| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #import "WebRTC/RTCMediaConstraints.h" | |
| 12 | |
| 13 #include <memory> | |
| 14 | |
| 15 #include "webrtc/api/mediaconstraintsinterface.h" | |
| 16 | |
| 17 namespace webrtc { | |
| 18 | |
| 19 class MediaConstraints : public MediaConstraintsInterface { | |
| 20 public: | |
| 21 virtual ~MediaConstraints(); | |
| 22 MediaConstraints(); | |
| 23 MediaConstraints( | |
| 24 const MediaConstraintsInterface::Constraints& mandatory, | |
| 25 const MediaConstraintsInterface::Constraints& optional); | |
| 26 virtual const Constraints& GetMandatory() const; | |
| 27 virtual const Constraints& GetOptional() const; | |
| 28 | |
| 29 private: | |
| 30 MediaConstraintsInterface::Constraints mandatory_; | |
| 31 MediaConstraintsInterface::Constraints optional_; | |
| 32 }; | |
| 33 | |
| 34 } // namespace webrtc | |
| 35 | |
| 36 | |
| 37 NS_ASSUME_NONNULL_BEGIN | |
| 38 | |
| 39 @interface RTCMediaConstraints () | |
| 40 | |
| 41 /** | |
| 42 * A MediaConstraints representation of this RTCMediaConstraints object. This is | |
| 43 * needed to pass to the underlying C++ APIs. | |
| 44 */ | |
| 45 - (std::unique_ptr<webrtc::MediaConstraints>)nativeConstraints; | |
| 46 | |
| 47 /** Return a native Constraints object representing these constraints */ | |
| 48 + (webrtc::MediaConstraintsInterface::Constraints) | |
| 49 nativeConstraintsForConstraints: | |
| 50 (NSDictionary<NSString *, NSString *> *)constraints; | |
| 51 | |
| 52 @end | |
| 53 | |
| 54 NS_ASSUME_NONNULL_END | |
| OLD | NEW |