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

Unified Diff: ppapi/examples/video_encode/video_encode.html

Issue 956893002: content: pepper: VideoEncoder: add software encoder support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another android dep fix Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/examples/video_encode/video_encode.cc ('k') | ppapi/proxy/video_encoder_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/video_encode/video_encode.html
diff --git a/ppapi/examples/video_encode/video_encode.html b/ppapi/examples/video_encode/video_encode.html
index 803c1f4de907b653bb68082a6006c069de9e0e8c..9f3b248c2f8897a2e4614e7fdf0ed3dbcb95aaac 100644
--- a/ppapi/examples/video_encode/video_encode.html
+++ b/ppapi/examples/video_encode/video_encode.html
@@ -7,18 +7,6 @@
-->
<head>
<title>Video Encoder Example</title>
- <style type="text/css">
- #video {
- position: fixed;
- }
- #video-playback {
- position: fixed;
- left: 640px;
- }
- #plugin {
- position: fixed;
- }
- </style>
<script type="text/javascript">
var plugin;
var track;
@@ -33,9 +21,14 @@
video.src = URL.createObjectURL(stream);
video.play();
+ var list = $('profileList');
+ var profile = (list.length < 1) ? 'vp8'
+ : list.options[list.selectedIndex].value;
+
plugin.postMessage({
command: 'start',
track: track,
+ profile: profile,
width: 640,
height: 480
});
@@ -46,7 +39,7 @@
}
function startRecord() {
- console.log("starting record");
+ $('length').innerHTML = ' Size: ' + dataArray.byteLength + ' bytes';
navigator.webkitGetUserMedia({audio: false, video: true},
success, failure);
}
@@ -72,6 +65,14 @@
appendData(msg.data.data);
} else if (msg.data.name == 'stopped') {
console.log('done recording! bytes: ' + dataArray.byteLength);
+ } else if (msg.data.name == 'supportedProfiles') {
+ console.log('profiles: ', msg.data);
+ var profileList = $('profileList');
+ for (var i = 0; i < msg.data.profiles.length; i++) {
+ var item = document.createElement('option');
+ item.label = item.value = msg.data.profiles[i];
+ profileList.appendChild(item);
+ }
}
}
@@ -114,6 +115,7 @@
This example demonstrates receiving frames from a video MediaStreamTrack and
encoding them in a plugin.
<br>
+ <select id="profileList"></select>
<input type="button" id="start" value="Start Recording"/>
<input type="button" id="stop" value="Stop Recording"/>
<input type="button" id="download" value="Download Recording"/>
« no previous file with comments | « ppapi/examples/video_encode/video_encode.cc ('k') | ppapi/proxy/video_encoder_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698