| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This code uses the tab capture and Cast streaming APIs to capture the content | 5 // This code uses the tab capture and Cast streaming APIs to capture the content |
| 6 // and send it to a Cast receiver end-point controlled by | 6 // and send it to a Cast receiver end-point controlled by |
| 7 // CastStreamingApiTest code. It generates audio/video test patterns that | 7 // CastStreamingApiTest code. It generates audio/video test patterns that |
| 8 // rotate cyclicly, and these test patterns are checked for by an in-process | 8 // rotate cyclicly, and these test patterns are checked for by an in-process |
| 9 // Cast receiver to confirm the correct end-to-end functionality of the Cast | 9 // Cast receiver to confirm the correct end-to-end functionality of the Cast |
| 10 // streaming API. | 10 // streaming API. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 udpId, { address: "127.0.0.1", port: recvPort } ); | 151 udpId, { address: "127.0.0.1", port: recvPort } ); |
| 152 var rtpStream = chrome.cast.streaming.rtpStream; | 152 var rtpStream = chrome.cast.streaming.rtpStream; |
| 153 var audioParams = rtpStream.getSupportedParams(audioId)[0]; | 153 var audioParams = rtpStream.getSupportedParams(audioId)[0]; |
| 154 audioParams.payload.aesKey = aesKey; | 154 audioParams.payload.aesKey = aesKey; |
| 155 audioParams.payload.aesIvMask = aesIvMask; | 155 audioParams.payload.aesIvMask = aesIvMask; |
| 156 rtpStream.start(audioId, audioParams); | 156 rtpStream.start(audioId, audioParams); |
| 157 var videoParams = rtpStream.getSupportedParams(videoId)[0]; | 157 var videoParams = rtpStream.getSupportedParams(videoId)[0]; |
| 158 videoParams.payload.maxFrameRate = frameRate; | 158 videoParams.payload.maxFrameRate = frameRate; |
| 159 videoParams.payload.aesKey = aesKey; | 159 videoParams.payload.aesKey = aesKey; |
| 160 videoParams.payload.aesIvMask = aesIvMask; | 160 videoParams.payload.aesIvMask = aesIvMask; |
| 161 videoParams.payload.codecName = 'VP8'; | |
| 162 rtpStream.start(videoId, videoParams); | 161 rtpStream.start(videoId, videoParams); |
| 163 renderTestPatternLoop(); | 162 renderTestPatternLoop(); |
| 164 chrome.test.succeed(); | 163 chrome.test.succeed(); |
| 165 }); | 164 }); |
| 166 }); | 165 }); |
| 167 } | 166 } |
| 168 ]); | 167 ]); |
| OLD | NEW |