diff options
Diffstat (limited to 'content/renderer/media/rtc_media_constraints.h')
-rw-r--r-- | content/renderer/media/rtc_media_constraints.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/content/renderer/media/rtc_media_constraints.h b/content/renderer/media/rtc_media_constraints.h new file mode 100644 index 0000000..3100571 --- /dev/null +++ b/content/renderer/media/rtc_media_constraints.h @@ -0,0 +1,36 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ +#define CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ + +#include "base/compiler_specific.h" +#include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" + +namespace WebKit { +class WebMediaConstraints; +} + +namespace content { + +// RTCMediaConstraints acts as a glue layer between WebKits MediaConstraints and +// libjingle webrtc::MediaConstraintsInterface. +// Constraints are used by PeerConnection and getUserMedia API calls. +class RTCMediaConstraints : public webrtc::MediaConstraintsInterface { + public: + explicit RTCMediaConstraints( + const WebKit::WebMediaConstraints& constraints); + virtual ~RTCMediaConstraints(); + virtual const Constraints& GetMandatory() const OVERRIDE; + virtual const Constraints& GetOptional() const OVERRIDE; + + private: + Constraints mandatory_; + Constraints optional_; +}; + +} // namespace content + + +#endif // CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ |