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

Unified Diff: content/renderer/media/webrtc/media_stream_remote_video_source.cc

Issue 1025653004: Clean up - VideoRendererInterface should not have SetSize anymore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/media_stream_remote_video_source.cc
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index ed238059a8f1a782dd7da50a33355eb5c113dd37..e3b2c4dcf84ba7baf17b43cc3c3bad8671d0c8bf 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -36,7 +36,6 @@ class MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate
// Implements webrtc::VideoRendererInterface used for receiving video frames
// from the PeerConnection video track. May be called on a libjingle internal
// thread.
- void SetSize(int width, int height) override;
void RenderFrame(const cricket::VideoFrame* frame) override;
void DoRenderFrameOnIOThread(
@@ -64,24 +63,22 @@ MediaStreamRemoteVideoSource::
RemoteVideoSourceDelegate::~RemoteVideoSourceDelegate() {
}
-void MediaStreamRemoteVideoSource::
-RemoteVideoSourceDelegate::SetSize(int width, int height) {
-}
-
-void MediaStreamRemoteVideoSource::
-RemoteVideoSourceDelegate::RenderFrame(
- const cricket::VideoFrame* frame) {
+void MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate::RenderFrame(
+ const cricket::VideoFrame* incoming_frame) {
TRACE_EVENT0("webrtc", "RemoteVideoSourceDelegate::RenderFrame");
base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds(
- frame->GetElapsedTime() / rtc::kNumNanosecsPerMicrosec);
+ incoming_frame->GetElapsedTime() / rtc::kNumNanosecsPerMicrosec);
scoped_refptr<media::VideoFrame> video_frame;
- if (frame->GetNativeHandle() != NULL) {
+ if (incoming_frame->GetNativeHandle() != NULL) {
NativeHandleImpl* handle =
- static_cast<NativeHandleImpl*>(frame->GetNativeHandle());
+ static_cast<NativeHandleImpl*>(incoming_frame->GetNativeHandle());
video_frame = static_cast<media::VideoFrame*>(handle->GetHandle());
video_frame->set_timestamp(timestamp);
} else {
+ const cricket::VideoFrame* frame =
+ incoming_frame->GetCopyWithRotationApplied();
+
gfx::Size size(frame->GetWidth(), frame->GetHeight());
// Non-square pixels are unsupported.
« no previous file with comments | « no previous file | content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698