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

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

Issue 1225153002: Let WebRtcVideoChannel2::WebRtcVideoSendStream::InputFrame carry the input frame's timestamp to out… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Style Fix Created 5 years, 5 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 | « no previous file | talk/media/webrtc/fakewebrtccall.h » ('j') | talk/media/webrtc/fakewebrtccall.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/fakevideocapturer.h
diff --git a/talk/media/base/fakevideocapturer.h b/talk/media/base/fakevideocapturer.h
index c9dce2c1d94cd5bdad678fb64120647be0f1035f..ef6288ac3962bae0f0bb74a5370bb6fd137d24df 100644
--- a/talk/media/base/fakevideocapturer.h
+++ b/talk/media/base/fakevideocapturer.h
@@ -64,6 +64,8 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420));
formats.push_back(cricket::VideoFormat(160, 120,
cricket::VideoFormat::FpsToInterval(30), cricket::FOURCC_I420));
+ formats.push_back(cricket::VideoFormat(1280, 720,
+ cricket::VideoFormat::FpsToInterval(60), cricket::FOURCC_I420));
ResetSupportedFormats(formats);
}
~FakeVideoCapturer() {
@@ -79,9 +81,17 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
}
return CaptureCustomFrame(GetCaptureFormat()->width,
GetCaptureFormat()->height,
+ GetCaptureFormat()->interval,
GetCaptureFormat()->fourcc);
}
bool CaptureCustomFrame(int width, int height, uint32 fourcc) {
+ // default to 30fps
+ return CaptureCustomFrame(width, height, 33333333, fourcc);
+ }
+ bool CaptureCustomFrame(int width,
+ int height,
+ int64_t timestamp_interval,
+ uint32 fourcc) {
if (!running_) {
return false;
}
@@ -106,7 +116,7 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
frame.data_size = size;
frame.elapsed_time = next_timestamp_;
frame.time_stamp = initial_unix_timestamp_ + next_timestamp_;
- next_timestamp_ += 33333333; // 30 fps
+ next_timestamp_ += timestamp_interval;
rtc::scoped_ptr<char[]> data(new char[size]);
frame.data = data.get();
« no previous file with comments | « no previous file | talk/media/webrtc/fakewebrtccall.h » ('j') | talk/media/webrtc/fakewebrtccall.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698