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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 7 *
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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 constraintBuffer.channelCount); 663 constraintBuffer.channelCount);
664 } 664 }
665 if (constraintsIn.hasDeviceId()) { 665 if (constraintsIn.hasDeviceId()) {
666 copyStringConstraint(constraintsIn.deviceId(), nakedTreatment, 666 copyStringConstraint(constraintsIn.deviceId(), nakedTreatment,
667 constraintBuffer.deviceId); 667 constraintBuffer.deviceId);
668 } 668 }
669 if (constraintsIn.hasGroupId()) { 669 if (constraintsIn.hasGroupId()) {
670 copyStringConstraint(constraintsIn.groupId(), nakedTreatment, 670 copyStringConstraint(constraintsIn.groupId(), nakedTreatment,
671 constraintBuffer.groupId); 671 constraintBuffer.groupId);
672 } 672 }
673 if (constraintsIn.hasDepthNear()) {
674 copyDoubleConstraint(constraintsIn.depthNear(), nakedTreatment,
675 constraintBuffer.depthNear);
676 }
677 if (constraintsIn.hasDepthFar()) {
678 copyDoubleConstraint(constraintsIn.depthFar(), nakedTreatment,
679 constraintBuffer.depthFar);
680 }
681 if (constraintsIn.hasFocalLengthX()) {
682 copyDoubleConstraint(constraintsIn.focalLengthX(), nakedTreatment,
683 constraintBuffer.focalLengthX);
684 }
685 if (constraintsIn.hasFocalLengthY()) {
686 copyDoubleConstraint(constraintsIn.focalLengthY(), nakedTreatment,
687 constraintBuffer.focalLengthY);
688 }
673 } 689 }
674 690
675 WebMediaConstraints convertConstraintsToWeb( 691 WebMediaConstraints convertConstraintsToWeb(
676 const MediaTrackConstraints& constraintsIn) { 692 const MediaTrackConstraints& constraintsIn) {
677 WebMediaConstraints constraints; 693 WebMediaConstraints constraints;
678 WebMediaTrackConstraintSet constraintBuffer; 694 WebMediaTrackConstraintSet constraintBuffer;
679 Vector<WebMediaTrackConstraintSet> advancedBuffer; 695 Vector<WebMediaTrackConstraintSet> advancedBuffer;
680 copyConstraintSet(constraintsIn, NakedValueDisposition::kTreatAsIdeal, 696 copyConstraintSet(constraintsIn, NakedValueDisposition::kTreatAsIdeal,
681 constraintBuffer); 697 constraintBuffer);
682 if (constraintsIn.hasAdvanced()) { 698 if (constraintsIn.hasAdvanced()) {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 MediaTrackConstraintSet element; 927 MediaTrackConstraintSet element;
912 convertConstraintSet(it, NakedValueDisposition::kTreatAsExact, element); 928 convertConstraintSet(it, NakedValueDisposition::kTreatAsExact, element);
913 advancedVector.push_back(element); 929 advancedVector.push_back(element);
914 } 930 }
915 if (!advancedVector.isEmpty()) 931 if (!advancedVector.isEmpty())
916 output.setAdvanced(advancedVector); 932 output.setAdvanced(advancedVector);
917 } 933 }
918 934
919 } // namespace MediaConstraintsImpl 935 } // namespace MediaConstraintsImpl
920 } // namespace blink 936 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698