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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp

Issue 2606983002: Media Capture Depth Stream Extensions API: focal length and depth range. (Closed)
Patch Set: 80-char line fix in test html. Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Ericsson AB. All rights reserved. 3 * Copyright (C) 2011 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 m_component->getSettings(platformSettings); 221 m_component->getSettings(platformSettings);
222 if (platformSettings.hasFrameRate()) { 222 if (platformSettings.hasFrameRate()) {
223 settings.setFrameRate(platformSettings.frameRate); 223 settings.setFrameRate(platformSettings.frameRate);
224 } 224 }
225 if (platformSettings.hasWidth()) { 225 if (platformSettings.hasWidth()) {
226 settings.setWidth(platformSettings.width); 226 settings.setWidth(platformSettings.width);
227 } 227 }
228 if (platformSettings.hasHeight()) { 228 if (platformSettings.hasHeight()) {
229 settings.setHeight(platformSettings.height); 229 settings.setHeight(platformSettings.height);
230 } 230 }
231 if (RuntimeEnabledFeatures::mediaCaptureDepthEnabled() &&
232 m_component->source()->type() == MediaStreamSource::TypeVideo) {
233 if (platformSettings.hasDepthNear())
234 settings.setDepthNear(platformSettings.depthNear);
235 if (platformSettings.hasDepthFar())
236 settings.setDepthFar(platformSettings.depthFar);
237 if (platformSettings.hasFocalLengthX())
238 settings.setFocalLengthX(platformSettings.focalLengthX);
239 if (platformSettings.hasFocalLengthY())
240 settings.setFocalLengthY(platformSettings.focalLengthY);
241 }
231 settings.setDeviceId(platformSettings.deviceId); 242 settings.setDeviceId(platformSettings.deviceId);
232 if (platformSettings.hasFacingMode()) { 243 if (platformSettings.hasFacingMode()) {
233 switch (platformSettings.facingMode) { 244 switch (platformSettings.facingMode) {
234 case WebMediaStreamTrack::FacingMode::User: 245 case WebMediaStreamTrack::FacingMode::User:
235 settings.setFacingMode("user"); 246 settings.setFacingMode("user");
236 break; 247 break;
237 case WebMediaStreamTrack::FacingMode::Environment: 248 case WebMediaStreamTrack::FacingMode::Environment:
238 settings.setFacingMode("environment"); 249 settings.setFacingMode("environment");
239 break; 250 break;
240 case WebMediaStreamTrack::FacingMode::Left: 251 case WebMediaStreamTrack::FacingMode::Left:
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 344 }
334 345
335 DEFINE_TRACE(MediaStreamTrack) { 346 DEFINE_TRACE(MediaStreamTrack) {
336 visitor->trace(m_registeredMediaStreams); 347 visitor->trace(m_registeredMediaStreams);
337 visitor->trace(m_component); 348 visitor->trace(m_component);
338 EventTargetWithInlineData::trace(visitor); 349 EventTargetWithInlineData::trace(visitor);
339 ContextLifecycleObserver::trace(visitor); 350 ContextLifecycleObserver::trace(visitor);
340 } 351 }
341 352
342 } // namespace blink 353 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698