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

Side by Side Diff: webrtc/api/androidvideotracksource.cc

Issue 2276593003: Android Screen Capturer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: merge master Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/androidvideotracksource.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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
11 #include "webrtc/api/androidvideotracksource.h" 11 #include "webrtc/api/androidvideotracksource.h"
12 12
13 #include <utility> 13 #include <utility>
14 14
15 namespace webrtc { 15 namespace webrtc {
16 16
17 AndroidVideoTrackSource::AndroidVideoTrackSource(rtc::Thread* signaling_thread, 17 AndroidVideoTrackSource::AndroidVideoTrackSource(rtc::Thread* signaling_thread,
18 JNIEnv* jni, 18 JNIEnv* jni,
19 jobject j_egl_context) 19 jobject j_egl_context,
20 bool is_screencast)
20 : signaling_thread_(signaling_thread), 21 : signaling_thread_(signaling_thread),
21 surface_texture_helper_(webrtc_jni::SurfaceTextureHelper::create( 22 surface_texture_helper_(webrtc_jni::SurfaceTextureHelper::create(
22 jni, 23 jni,
23 "Camera SurfaceTextureHelper", 24 "Camera SurfaceTextureHelper",
24 j_egl_context)) { 25 j_egl_context)),
26 is_screencast_(is_screencast) {
25 LOG(LS_INFO) << "AndroidVideoTrackSource ctor"; 27 LOG(LS_INFO) << "AndroidVideoTrackSource ctor";
26 worker_thread_checker_.DetachFromThread(); 28 worker_thread_checker_.DetachFromThread();
27 camera_thread_checker_.DetachFromThread(); 29 camera_thread_checker_.DetachFromThread();
28 } 30 }
29 31
30 bool AndroidVideoTrackSource::GetStats(AndroidVideoTrackSource::Stats* stats) { 32 bool AndroidVideoTrackSource::GetStats(AndroidVideoTrackSource::Stats* stats) {
31 rtc::CritScope lock(&stats_crit_); 33 rtc::CritScope lock(&stats_crit_);
32 34
33 if (!stats_) { 35 if (!stats_) {
34 return false; 36 return false;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 253 }
252 *crop_x = (width - *crop_width) / 2; 254 *crop_x = (width - *crop_width) / 2;
253 *crop_y = (height - *crop_height) / 2; 255 *crop_y = (height - *crop_height) / 2;
254 256
255 *translated_camera_time_us = timestamp_aligner_.ClipTimestamp( 257 *translated_camera_time_us = timestamp_aligner_.ClipTimestamp(
256 camera_time_us + offset_us, system_time_us); 258 camera_time_us + offset_us, system_time_us);
257 return true; 259 return true;
258 } 260 }
259 261
260 } // namespace webrtc 262 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/androidvideotracksource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698