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

Side by Side Diff: media/capture/content/android/screen_capture_machine_android.h

Issue 2364413002: Screen Video Capture: Implement suspend optimization. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef MEDIA_CAPTURE_CONTENT_ANDROID_SCREEN_CAPTURE_MACHINE_ANDROID_H_ 5 #ifndef MEDIA_CAPTURE_CONTENT_ANDROID_SCREEN_CAPTURE_MACHINE_ANDROID_H_
6 #define MEDIA_CAPTURE_CONTENT_ANDROID_SCREEN_CAPTURE_MACHINE_ANDROID_H_ 6 #define MEDIA_CAPTURE_CONTENT_ANDROID_SCREEN_CAPTURE_MACHINE_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 jint height, 48 jint height,
49 jlong timestamp); 49 jlong timestamp);
50 50
51 // Implement org.chromium.media.ScreenCapture.nativeOnActivityResult. 51 // Implement org.chromium.media.ScreenCapture.nativeOnActivityResult.
52 void OnActivityResult(JNIEnv* env, jobject obj, jboolean result); 52 void OnActivityResult(JNIEnv* env, jobject obj, jboolean result);
53 53
54 // VideoCaptureMachine overrides. 54 // VideoCaptureMachine overrides.
55 void Start(const scoped_refptr<media::ThreadSafeCaptureOracle>& oracle_proxy, 55 void Start(const scoped_refptr<media::ThreadSafeCaptureOracle>& oracle_proxy,
56 const media::VideoCaptureParams& params, 56 const media::VideoCaptureParams& params,
57 const base::Callback<void(bool)> callback) override; 57 const base::Callback<void(bool)> callback) override;
58 void Suspend() override;
59 void Resume() override;
braveyao 2016/09/26 17:14:47 No definition to these two functions?
miu 2016/09/27 20:46:50 Oh no! Sorry, I missed that. Please see most recen
58 void Stop(const base::Closure& callback) override; 60 void Stop(const base::Closure& callback) override;
59 void MaybeCaptureForRefresh() override; 61 void MaybeCaptureForRefresh() override;
60 62
61 private: 63 private:
62 // Makes all the decisions about which frames to copy, and how. 64 // Makes all the decisions about which frames to copy, and how.
63 scoped_refptr<media::ThreadSafeCaptureOracle> oracle_proxy_; 65 scoped_refptr<media::ThreadSafeCaptureOracle> oracle_proxy_;
64 66
65 // Cache the last frame for possible refreshing. 67 // Cache the last frame for possible refreshing.
66 scoped_refptr<VideoFrame> lastFrame_; 68 scoped_refptr<VideoFrame> lastFrame_;
67 69
68 // Java VideoCaptureAndroid instance. 70 // Java VideoCaptureAndroid instance.
69 base::android::ScopedJavaLocalRef<jobject> j_capture_; 71 base::android::ScopedJavaLocalRef<jobject> j_capture_;
70 72
73 // True while frame capture has been suspended.
74 bool suspend_frame_capture_;
braveyao 2016/09/26 17:14:46 Due to above comments, this variable is not used a
miu 2016/09/27 20:46:50 It is now. ;)
75
71 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureMachineAndroid); 76 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureMachineAndroid);
72 }; 77 };
73 78
74 } // namespace media 79 } // namespace media
75 80
76 #endif // MEDIA_CAPTURE_CONTENT_ANDROID_SCREEN_CAPTURE_MACHINE_ANDROID_H_ 81 #endif // MEDIA_CAPTURE_CONTENT_ANDROID_SCREEN_CAPTURE_MACHINE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698