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

Side by Side Diff: third_party/WebKit/public/platform/WebMediaStreamTrack.h

Issue 2956063003: Add support for echoCancellation and deviceId to MediaStreamTrack.getSettings (Closed)
Patch Set: fix DCHECK Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/public/platform/WebMediaStreamSource.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class WebMediaStreamTrack { 42 class WebMediaStreamTrack {
43 public: 43 public:
44 enum class FacingMode { kNone, kUser, kEnvironment, kLeft, kRight }; 44 enum class FacingMode { kNone, kUser, kEnvironment, kLeft, kRight };
45 45
46 struct Settings { 46 struct Settings {
47 bool HasFrameRate() const { return frame_rate >= 0.0; } 47 bool HasFrameRate() const { return frame_rate >= 0.0; }
48 bool HasWidth() const { return width >= 0; } 48 bool HasWidth() const { return width >= 0; }
49 bool HasHeight() const { return height >= 0; } 49 bool HasHeight() const { return height >= 0; }
50 bool HasAspectRatio() const { return aspect_ratio >= 0.0; } 50 bool HasAspectRatio() const { return aspect_ratio >= 0.0; }
51 bool HasFacingMode() const { return facing_mode != FacingMode::kNone; } 51 bool HasFacingMode() const { return facing_mode != FacingMode::kNone; }
52 bool HasEchoCancellationValue() const { return echo_cancellation >= 0; }
52 bool HasVideoKind() const { return !video_kind.IsNull(); } 53 bool HasVideoKind() const { return !video_kind.IsNull(); }
53 bool HasFocalLengthX() const { return focal_length_x >= 0.0; } 54 bool HasFocalLengthX() const { return focal_length_x >= 0.0; }
54 bool HasFocalLengthY() const { return focal_length_y >= 0.0; } 55 bool HasFocalLengthY() const { return focal_length_y >= 0.0; }
55 bool HasDepthNear() const { return depth_near >= 0.0; } 56 bool HasDepthNear() const { return depth_near >= 0.0; }
56 bool HasDepthFar() const { return depth_far >= 0.0; } 57 bool HasDepthFar() const { return depth_far >= 0.0; }
57 // The variables are read from 58 // The variables are read from
58 // MediaStreamTrack::GetSettings only. 59 // MediaStreamTrack::GetSettings only.
59 double frame_rate = -1.0; 60 double frame_rate = -1.0;
60 long width = -1; 61 long width = -1;
61 long height = -1; 62 long height = -1;
62 double aspect_ratio = -1.0; 63 double aspect_ratio = -1.0;
63 WebString device_id; 64 WebString device_id;
64 FacingMode facing_mode = FacingMode::kNone; 65 FacingMode facing_mode = FacingMode::kNone;
66 // |echo_cancellation| should be some form of Optional<bool> instead of int,
67 // but none is available for this file. Using -1 to indicate no value.
68 int echo_cancellation = -1;
65 // Media Capture Depth Stream Extensions. 69 // Media Capture Depth Stream Extensions.
66 WebString video_kind; 70 WebString video_kind;
67 double focal_length_x = -1.0; 71 double focal_length_x = -1.0;
68 double focal_length_y = -1.0; 72 double focal_length_y = -1.0;
69 double depth_near = -1.0; 73 double depth_near = -1.0;
70 double depth_far = -1.0; 74 double depth_far = -1.0;
71 }; 75 };
72 76
73 class TrackData { 77 class TrackData {
74 public: 78 public:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; 132 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const;
129 #endif 133 #endif
130 134
131 private: 135 private:
132 WebPrivatePtr<MediaStreamComponent> private_; 136 WebPrivatePtr<MediaStreamComponent> private_;
133 }; 137 };
134 138
135 } // namespace blink 139 } // namespace blink
136 140
137 #endif // WebMediaStreamTrack_h 141 #endif // WebMediaStreamTrack_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebMediaStreamSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698