2016-01-07 09:29:29 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright 2015 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2018-08-30 09:30:29 +02:00
|
|
|
#import "RTCMediaConstraints.h"
|
2016-01-07 09:29:29 -08:00
|
|
|
|
2016-05-01 14:53:46 -07:00
|
|
|
#include <memory>
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "api/media_constraints_interface.h"
|
2016-01-07 09:29:29 -08:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class MediaConstraints : public MediaConstraintsInterface {
|
|
|
|
|
public:
|
2018-07-26 12:20:40 +02:00
|
|
|
~MediaConstraints() override;
|
2016-01-07 09:29:29 -08:00
|
|
|
MediaConstraints();
|
2018-06-19 15:03:05 +02:00
|
|
|
MediaConstraints(const MediaConstraintsInterface::Constraints& mandatory,
|
|
|
|
|
const MediaConstraintsInterface::Constraints& optional);
|
2018-07-26 12:20:40 +02:00
|
|
|
const Constraints& GetMandatory() const override;
|
|
|
|
|
const Constraints& GetOptional() const override;
|
2016-01-07 09:29:29 -08:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
MediaConstraintsInterface::Constraints mandatory_;
|
|
|
|
|
MediaConstraintsInterface::Constraints optional_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
@interface RTCMediaConstraints ()
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A MediaConstraints representation of this RTCMediaConstraints object. This is
|
|
|
|
|
* needed to pass to the underlying C++ APIs.
|
|
|
|
|
*/
|
2016-05-01 14:53:46 -07:00
|
|
|
- (std::unique_ptr<webrtc::MediaConstraints>)nativeConstraints;
|
2016-01-07 09:29:29 -08:00
|
|
|
|
|
|
|
|
/** Return a native Constraints object representing these constraints */
|
2018-06-19 15:03:05 +02:00
|
|
|
+ (webrtc::MediaConstraintsInterface::Constraints)nativeConstraintsForConstraints:
|
|
|
|
|
(NSDictionary<NSString*, NSString*>*)constraints;
|
2016-01-07 09:29:29 -08:00
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|