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

Side by Side Diff: media/capture/video/fake_video_capture_device.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Implementation of a fake VideoCaptureDevice class. Used for testing other 5 // Implementation of a fake VideoCaptureDevice class. Used for testing other
6 // video capture classes when no real hardware is available. 6 // video capture classes when no real hardware is available.
7 7
8 #ifndef MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ 8 #ifndef MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_
9 #define MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ 9 #define MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 std::unique_ptr<VideoCaptureDevice::Client> client_; 57 std::unique_ptr<VideoCaptureDevice::Client> client_;
58 // |fake_frame_| is used for capturing on Own Buffers. 58 // |fake_frame_| is used for capturing on Own Buffers.
59 std::unique_ptr<uint8_t[]> fake_frame_; 59 std::unique_ptr<uint8_t[]> fake_frame_;
60 // Time when the next beep occurs. 60 // Time when the next beep occurs.
61 base::TimeDelta beep_time_; 61 base::TimeDelta beep_time_;
62 // Time since the fake video started rendering frames. 62 // Time since the fake video started rendering frames.
63 base::TimeDelta elapsed_time_; 63 base::TimeDelta elapsed_time_;
64 VideoCaptureFormat capture_format_; 64 VideoCaptureFormat capture_format_;
65 65
66 // The system time when we receive the first frame.
67 base::TimeTicks first_ref_time_;
66 // FakeVideoCaptureDevice post tasks to itself for frame construction and 68 // FakeVideoCaptureDevice post tasks to itself for frame construction and
67 // needs to deal with asynchronous StopAndDeallocate(). 69 // needs to deal with asynchronous StopAndDeallocate().
68 base::WeakPtrFactory<FakeVideoCaptureDevice> weak_factory_; 70 base::WeakPtrFactory<FakeVideoCaptureDevice> weak_factory_;
69 71
70 DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureDevice); 72 DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureDevice);
71 }; 73 };
72 74
73 } // namespace media 75 } // namespace media
74 76
75 #endif // MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ 77 #endif // MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW
« no previous file with comments | « media/capture/video/android/video_capture_device_android.cc ('k') | media/capture/video/fake_video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698