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

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

Issue 2428263004: 16 bpp video stream capture, render and createImageBitmap(video) using (CPU) shared memory buffers (Closed)
Patch Set: Split webrtc_depth_capture_browsertest. Thanks phoglund@, Created 4 years, 1 month 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
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script>
4 <script type="text/javascript" src="depth_stream_test_utilities.js"></script>
5 <script type="text/javascript">
6
7 $ = function(id) {
8 return document.getElementById(id);
9 };
10
11 setAllEventsOccuredHandler(function() {
12 reportTestSuccess();
13 });
14
15 // testVideoToImageBitmap is a layout test that we run here because
16 // it requires --use-fake-device-for-media-capture.
17 function getDepthStreamAndCallCreateImageBitmap() {
18 console.log('Calling getDepthStreamAndCallCreateImageBitmap');
19 getFake16bitStream().then(function(stream) {
20 detectVideoInLocalView1(stream, function() {
21 testVideoToImageBitmap('local-view-1', function() {
22 stream.getVideoTracks()[0].stop();
23 waitForVideoToStop('local-view-1');
24 }, failedCallback);
25 });
26 },
27 failedCallback);
28 }
29
30 function failedCallback(error) {
31 failTest('GetUserMedia call failed with error name ' + error.name);
32 }
33
34 function attachMediaStream(stream, videoElement) {
35 var localStreamUrl = URL.createObjectURL(stream);
36 $(videoElement).src = localStreamUrl;
37 }
38
39 function detectVideoInLocalView1(stream, callback) {
40 attachMediaStream(stream, 'local-view-1');
41 detectVideoPlaying('local-view-1', callback);
42 }
43 </script>
44 </head>
45 <body>
46 <table border="0">
47 <!-- Canvases are named after their corresponding video elements. -->
48 <tr>
49 <td><video id="local-view-1" width="96" height="96" autoplay
50 style="display:none"></video></td>
51 <td><canvas id="local-view-1-canvas" width="96" height="96"
52 style="display:none"></canvas></td>
53 </tr>
54 </table>
55 </body>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698