Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 intent.putExtra(CallActivity.EXTRA_USE_VALUES_FROM_INTENT, true); | 52 intent.putExtra(CallActivity.EXTRA_USE_VALUES_FROM_INTENT, true); |
| 53 | 53 |
| 54 intent.putExtra(CallActivity.EXTRA_LOOPBACK, true); | 54 intent.putExtra(CallActivity.EXTRA_LOOPBACK, true); |
| 55 intent.putExtra(CallActivity.EXTRA_AUDIOCODEC, "OPUS"); | 55 intent.putExtra(CallActivity.EXTRA_AUDIOCODEC, "OPUS"); |
| 56 intent.putExtra(CallActivity.EXTRA_VIDEOCODEC, "VP8"); | 56 intent.putExtra(CallActivity.EXTRA_VIDEOCODEC, "VP8"); |
| 57 intent.putExtra(CallActivity.EXTRA_CAPTURETOTEXTURE_ENABLED, false); | 57 intent.putExtra(CallActivity.EXTRA_CAPTURETOTEXTURE_ENABLED, false); |
| 58 intent.putExtra(CallActivity.EXTRA_CAMERA2, false); | 58 intent.putExtra(CallActivity.EXTRA_CAMERA2, false); |
| 59 intent.putExtra(CallActivity.EXTRA_ROOMID, UUID.randomUUID().toString().su bstring(0, 8)); | 59 intent.putExtra(CallActivity.EXTRA_ROOMID, UUID.randomUUID().toString().su bstring(0, 8)); |
| 60 // TODO false for wstls to disable https, should be option later or if URL is http | 60 // TODO false for wstls to disable https, should be option later or if URL is http |
| 61 intent.putExtra(CallActivity.EXTRA_URLPARAMETERS, | 61 intent.putExtra(CallActivity.EXTRA_URLPARAMETERS, |
| 62 "wstls=false?debug=loopback?ts=?wshpp=http://localhost:8089"); | 62 "debug=loopback&ts=&wshpp=localhost:8089&wstls=false"); |
|
oprypin_webrtc
2017/04/26 13:06:46
In the previous CL I said that this worked fine wi
| |
| 63 | 63 |
| 64 intent.putExtra(CallActivity.EXTRA_VIDEO_FILE_AS_CAMERA, | 64 intent.putExtra(CallActivity.EXTRA_VIDEO_FILE_AS_CAMERA, |
| 65 Environment.getExternalStorageDirectory().getAbsolutePath() | 65 Environment.getExternalStorageDirectory().getAbsolutePath() |
| 66 + "/chromium_tests_root/resources/reference_video_640x360_30fps.y4 m"); | 66 + "/chromium_tests_root/resources/reference_video_640x360_30fps.y4 m"); |
| 67 | 67 |
| 68 intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE, | 68 intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE, |
| 69 Environment.getExternalStorageDirectory().getAbsolutePath() + "/output .y4m"); | 69 Environment.getExternalStorageDirectory().getAbsolutePath() + "/output .y4m"); |
| 70 intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_WIDTH, 640); | 70 intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_WIDTH, 640); |
| 71 intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_HEIGHT, 360); | 71 intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_HEIGHT, 360); |
| 72 | 72 |
| 73 return intent; | 73 return intent; |
| 74 } | 74 } |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 @Test | 77 @Test |
| 78 public void testLoopback() throws InterruptedException { | 78 public void testLoopback() throws InterruptedException { |
| 79 // The time to write down the data during closing of the program can take a while. | 79 // The time to write down the data during closing of the program can take a while. |
| 80 IdlingPolicies.setMasterPolicyTimeout(240000, TimeUnit.MILLISECONDS); | 80 IdlingPolicies.setMasterPolicyTimeout(240000, TimeUnit.MILLISECONDS); |
| 81 | 81 |
| 82 // During the time we sleep it will record video. | 82 // During the time we sleep it will record video. |
| 83 Thread.sleep(8000); | 83 Thread.sleep(8000); |
| 84 | 84 |
| 85 // Click on hang-up button. | 85 // Click on hang-up button. |
| 86 onView(withId(R.id.button_call_disconnect)).perform(click()); | 86 onView(withId(R.id.button_call_disconnect)).perform(click()); |
| 87 } | 87 } |
| 88 } | 88 } |
| OLD | NEW |