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

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

Issue 1779063003: Refactor VideoTracks to forward all sinks to its source (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 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/api/videotrackrenderers.cc ('k') | webrtc/media/base/videobroadcaster.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/fakevideorenderer.h
diff --git a/webrtc/media/base/fakevideorenderer.h b/webrtc/media/base/fakevideorenderer.h
index 0854d0ce391e79efb928d55809499aa287d8cc4e..05e285b3b39864844dd1b7608b61e9ea05391950 100644
--- a/webrtc/media/base/fakevideorenderer.h
+++ b/webrtc/media/base/fakevideorenderer.h
@@ -25,9 +25,10 @@ class FakeVideoRenderer : public VideoRenderer {
: errors_(0),
width_(0),
height_(0),
+ rotation_(webrtc::kVideoRotation_0),
+ timestamp_(0),
num_rendered_frames_(0),
- black_frame_(false) {
- }
+ black_frame_(false) {}
virtual bool RenderFrame(const VideoFrame* frame) {
rtc::CritScope cs(&crit_);
@@ -44,6 +45,7 @@ class FakeVideoRenderer : public VideoRenderer {
width_ = static_cast<int>(frame->GetWidth());
height_ = static_cast<int>(frame->GetHeight());
rotation_ = frame->GetVideoRotation();
+ timestamp_ = frame->GetTimeStamp();
SignalRenderFrame(frame);
return true;
}
@@ -61,6 +63,11 @@ class FakeVideoRenderer : public VideoRenderer {
rtc::CritScope cs(&crit_);
return rotation_;
}
+
+ int64_t timestamp() const {
+ rtc::CritScope cs(&crit_);
+ return timestamp_;
+ }
int num_rendered_frames() const {
rtc::CritScope cs(&crit_);
return num_rendered_frames_;
@@ -129,6 +136,7 @@ class FakeVideoRenderer : public VideoRenderer {
int width_;
int height_;
webrtc::VideoRotation rotation_;
+ int64_t timestamp_;
int num_rendered_frames_;
bool black_frame_;
rtc::CriticalSection crit_;
« no previous file with comments | « webrtc/api/videotrackrenderers.cc ('k') | webrtc/media/base/videobroadcaster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698