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

Side by Side Diff: media/capture/video/android/video_capture_device_android.h

Issue 1983193002: Decouple capture timestamp and reference time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve Comments Created 4 years, 7 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ 5 #ifndef MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_
6 #define MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ 6 #define MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 VideoPixelFormat GetColorspace(); 86 VideoPixelFormat GetColorspace();
87 void SetErrorState(const tracked_objects::Location& from_here, 87 void SetErrorState(const tracked_objects::Location& from_here,
88 const std::string& reason); 88 const std::string& reason);
89 89
90 // Prevent racing on accessing |state_| and |client_| since both could be 90 // Prevent racing on accessing |state_| and |client_| since both could be
91 // accessed from different threads. 91 // accessed from different threads.
92 base::Lock lock_; 92 base::Lock lock_;
93 InternalState state_; 93 InternalState state_;
94 bool got_first_frame_; 94 bool got_first_frame_;
95 base::TimeTicks expected_next_frame_time_; 95 base::TimeTicks expected_next_frame_time_;
96 base::TimeTicks first_ref_time_;
96 base::TimeDelta frame_interval_; 97 base::TimeDelta frame_interval_;
97 std::unique_ptr<VideoCaptureDevice::Client> client_; 98 std::unique_ptr<VideoCaptureDevice::Client> client_;
98 99
99 // List of |photo_callbacks_| in flight, being served in Java side. 100 // List of |photo_callbacks_| in flight, being served in Java side.
100 base::Lock photo_callbacks_lock_; 101 base::Lock photo_callbacks_lock_;
101 std::list<std::unique_ptr<TakePhotoCallback>> photo_callbacks_; 102 std::list<std::unique_ptr<TakePhotoCallback>> photo_callbacks_;
102 103
103 Name device_name_; 104 Name device_name_;
104 VideoCaptureFormat capture_format_; 105 VideoCaptureFormat capture_format_;
105 106
106 // Java VideoCaptureAndroid instance. 107 // Java VideoCaptureAndroid instance.
107 base::android::ScopedJavaLocalRef<jobject> j_capture_; 108 base::android::ScopedJavaLocalRef<jobject> j_capture_;
108 109
109 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceAndroid); 110 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceAndroid);
110 }; 111 };
111 112
112 } // namespace media 113 } // namespace media
113 114
114 #endif // MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ 115 #endif // MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698