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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/test/data/media/getusermedia-depth-capture.html
diff --git a/content/test/data/media/getusermedia-depth-capture.html b/content/test/data/media/getusermedia-depth-capture.html
new file mode 100644
index 0000000000000000000000000000000000000000..521fc0730c17322bf833ccb5588b0ac2c2d4e21f
--- /dev/null
+++ b/content/test/data/media/getusermedia-depth-capture.html
@@ -0,0 +1,56 @@
+<html>
+<head>
+ <script type="text/javascript" src="webrtc_test_utilities.js"></script>
+ <script type="text/javascript" src="depth_stream_test_utilities.js"></script>
+ <script type="text/javascript">
+
+ $ = function(id) {
+ return document.getElementById(id);
+ };
+
+ setAllEventsOccuredHandler(function() {
+ reportTestSuccess();
+ });
+
+ // testVideoToImageBitmap is a layout test that we run here because
+ // it requires --use-fake-device-for-media-capture.
+ function getDepthStreamAndCallCreateImageBitmap() {
+ console.log('Calling getDepthStreamAndCallCreateImageBitmap');
+ getFake16bitStream().then(function(stream) {
+ detectVideoInLocalView1(stream, function() {
+ testVideoToImageBitmap('local-view-1', function() {
+ stream.getVideoTracks()[0].stop();
+ waitForVideoToStop('local-view-1');
+ }, failedCallback);
+ });
+ },
+ failedCallback);
+ }
+
+ function failedCallback(error) {
+ failTest('GetUserMedia call failed with error name ' + error.name);
+ }
+
+ function attachMediaStream(stream, videoElement) {
+ var localStreamUrl = URL.createObjectURL(stream);
+ $(videoElement).src = localStreamUrl;
+ }
+
+ function detectVideoInLocalView1(stream, callback) {
+ attachMediaStream(stream, 'local-view-1');
+ detectVideoPlaying('local-view-1', callback);
+ }
+ </script>
+</head>
+<body>
+ <table border="0">
+ <!-- Canvases are named after their corresponding video elements. -->
+ <tr>
+ <td><video id="local-view-1" width="96" height="96" autoplay
+ style="display:none"></video></td>
+ <td><canvas id="local-view-1-canvas" width="96" height="96"
+ style="display:none"></canvas></td>
+ </tr>
+ </table>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698