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

Unified Diff: webrtc/media/base/fakevideocapturer.h

Issue 2716643002: Add framerate to VideoSinkWants and ability to signal on overuse (Closed)
Patch Set: Comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/base/adaptedvideotracksource.cc ('k') | webrtc/media/base/fakevideorenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/fakevideocapturer.h
diff --git a/webrtc/media/base/fakevideocapturer.h b/webrtc/media/base/fakevideocapturer.h
index b5bfd3496476e9e576a2c46683935ad9d9e357db..34f9dbf48b72cfb6d6ab0afad405e8b1480facea 100644
--- a/webrtc/media/base/fakevideocapturer.h
+++ b/webrtc/media/base/fakevideocapturer.h
@@ -66,8 +66,9 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
GetCaptureFormat()->fourcc);
}
bool CaptureCustomFrame(int width, int height, uint32_t fourcc) {
- // default to 30fps
- return CaptureCustomFrame(width, height, 33333333, fourcc);
+ // Default to 30fps.
+ return CaptureCustomFrame(width, height, rtc::kNumNanosecsPerSec / 30,
+ fourcc);
}
bool CaptureCustomFrame(int width,
int height,
@@ -92,8 +93,11 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
// AdaptFrame, and the test case
// VideoCapturerTest.SinkWantsMaxPixelAndMaxPixelCountStepUp
// depends on this.
- if (AdaptFrame(width, height, 0, 0, &adapted_width, &adapted_height,
- &crop_width, &crop_height, &crop_x, &crop_y, nullptr)) {
+ if (AdaptFrame(width, height,
+ next_timestamp_ / rtc::kNumNanosecsPerMicrosec,
+ next_timestamp_ / rtc::kNumNanosecsPerMicrosec,
+ &adapted_width, &adapted_height, &crop_width, &crop_height,
+ &crop_x, &crop_y, nullptr)) {
rtc::scoped_refptr<webrtc::I420Buffer> buffer(
webrtc::I420Buffer::Create(adapted_width, adapted_height));
buffer->InitializeData();
« no previous file with comments | « webrtc/media/base/adaptedvideotracksource.cc ('k') | webrtc/media/base/fakevideorenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698