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

Unified Diff: content/renderer/media/rtc_media_constraints.h

Issue 23171026: Feed audio constraints over to WebRtcLocalAudioTrack (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 7 years, 4 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: content/renderer/media/rtc_media_constraints.h
diff --git a/content/renderer/media/rtc_media_constraints.h b/content/renderer/media/rtc_media_constraints.h
index c39790e486b73f7a2b35686095dcdc4b38667a17..58f84864f221883426c8ca57b6408e4486a7448d 100644
--- a/content/renderer/media/rtc_media_constraints.h
+++ b/content/renderer/media/rtc_media_constraints.h
@@ -6,6 +6,7 @@
#define CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_
#include "base/compiler_specific.h"
+#include "content/common/content_export.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h"
namespace WebKit {
@@ -17,14 +18,21 @@ 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 {
+class CONTENT_EXPORT RTCMediaConstraints
+ : public NON_EXPORTED_BASE(webrtc::MediaConstraintsInterface) {
public:
+ RTCMediaConstraints();
explicit RTCMediaConstraints(
const WebKit::WebMediaConstraints& constraints);
virtual ~RTCMediaConstraints();
virtual const Constraints& GetMandatory() const OVERRIDE;
virtual const Constraints& GetOptional() const OVERRIDE;
void AddOptional(const std::string& key, const std::string& value);
+ // Adds a mandatory constraint, optionally overriding an existing one.
+ // If the constraint is already set and |override_if_exists| is false,
+ // the function will return false, otherwise true.
+ bool AddMandatory(const std::string& key, const std::string& value,
+ bool override_if_exists);
protected:
Constraints mandatory_;
« no previous file with comments | « content/renderer/media/mock_media_stream_dependency_factory.cc ('k') | content/renderer/media/rtc_media_constraints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698