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

Side by Side Diff: content/test/data/media/getusermedia-depth-capture.html

Issue 2606983002: Media Capture Depth Stream Extensions API: focal length and depth range. (Closed)
Patch Set: Created 3 years, 11 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 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script>
4 <script type="text/javascript" src="depth_stream_test_utilities.js"></script> 4 <script type="text/javascript" src="depth_stream_test_utilities.js"></script>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 6
7 function cubemapFaces(gl) { 7 function cubemapFaces(gl) {
8 return [gl.TEXTURE_CUBE_MAP_POSITIVE_X, 8 return [gl.TEXTURE_CUBE_MAP_POSITIVE_X,
9 gl.TEXTURE_CUBE_MAP_NEGATIVE_X, 9 gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
10 gl.TEXTURE_CUBE_MAP_POSITIVE_Y, 10 gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
(...skipping 18 matching lines...) Expand all
29 detectVideoInLocalView1(stream, function() { 29 detectVideoInLocalView1(stream, function() {
30 testVideoToImageBitmap('local-view-1', function() { 30 testVideoToImageBitmap('local-view-1', function() {
31 stream.getVideoTracks()[0].stop(); 31 stream.getVideoTracks()[0].stop();
32 waitForVideoToStop('local-view-1'); 32 waitForVideoToStop('local-view-1');
33 }, failedCallback); 33 }, failedCallback);
34 }); 34 });
35 }, 35 },
36 failedCallback); 36 failedCallback);
37 } 37 }
38 38
39 function getDepthStreamAndCameraCalibration() {
40 console.log('Calling getDepthStreamAndCameraCalibration');
41 getFake16bitStream().then(function(stream) {
42 var depth_track = stream.getVideoTracks()[0];
43 if (!depth_track)
44 return failTest("No depth_track");
45 var settings = depth_track.getSettings();
46 if (settings && settings.depthNear == 0 && settings.depthFar == 65.535 &&
47 settings.focalLengthX == 135.0 && settings.focalLengthY == 135.6) {
48 reportTestSuccess();
49 } else {
50 failTest("Unexpected depth_track settings:" + JSON.stringify(settings));
51 }
52 },
53 failedCallback);
54 }
55
39 function depthStreamToRGBAUint8Texture() { 56 function depthStreamToRGBAUint8Texture() {
40 console.log('Calling depthStreamToRGBAUint8Texture'); 57 console.log('Calling depthStreamToRGBAUint8Texture');
41 getFake16bitStream().then(function(stream) { 58 getFake16bitStream().then(function(stream) {
42 detectVideoInLocalView1(stream, function() { 59 detectVideoInLocalView1(stream, function() {
43 testVideoToRGBA8Texture('local-view-1', function() { 60 testVideoToRGBA8Texture('local-view-1', function() {
44 stream.getVideoTracks()[0].stop(); 61 stream.getVideoTracks()[0].stop();
45 waitForVideoToStop('local-view-1'); 62 waitForVideoToStop('local-view-1');
46 }, failedCallback); 63 }, failedCallback);
47 }); 64 });
48 }, 65 },
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 <tr> 352 <tr>
336 <td><video id="local-view-1" width="96" height="96" autoplay 353 <td><video id="local-view-1" width="96" height="96" autoplay
337 style="display:none"></video></td> 354 style="display:none"></video></td>
338 <!-- The canvas is used to detect when video starts and stops. --> 355 <!-- The canvas is used to detect when video starts and stops. -->
339 <td><canvas id="local-view-1-canvas" width="96" height="96" 356 <td><canvas id="local-view-1-canvas" width="96" height="96"
340 style="display:none"></canvas></td> 357 style="display:none"></canvas></td>
341 </tr> 358 </tr>
342 </table> 359 </table>
343 </body> 360 </body>
344 </html> 361 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698