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

Side by Side Diff: content/renderer/media/webrtc/media_stream_remote_video_source.cc

Issue 435823002: Revert "Update webrtc&libjingle 6774:6799." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h" 5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 void MediaStreamRemoteVideoSource:: 67 void MediaStreamRemoteVideoSource::
68 RemoteVideoSourceDelegate::SetSize(int width, int height) { 68 RemoteVideoSourceDelegate::SetSize(int width, int height) {
69 } 69 }
70 70
71 void MediaStreamRemoteVideoSource:: 71 void MediaStreamRemoteVideoSource::
72 RemoteVideoSourceDelegate::RenderFrame( 72 RemoteVideoSourceDelegate::RenderFrame(
73 const cricket::VideoFrame* frame) { 73 const cricket::VideoFrame* frame) {
74 base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds( 74 base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds(
75 frame->GetElapsedTime() / rtc::kNumNanosecsPerMicrosec); 75 frame->GetElapsedTime() / talk_base::kNumNanosecsPerMicrosec);
76 76
77 scoped_refptr<media::VideoFrame> video_frame; 77 scoped_refptr<media::VideoFrame> video_frame;
78 if (frame->GetNativeHandle() != NULL) { 78 if (frame->GetNativeHandle() != NULL) {
79 NativeHandleImpl* handle = 79 NativeHandleImpl* handle =
80 static_cast<NativeHandleImpl*>(frame->GetNativeHandle()); 80 static_cast<NativeHandleImpl*>(frame->GetNativeHandle());
81 video_frame = static_cast<media::VideoFrame*>(handle->GetHandle()); 81 video_frame = static_cast<media::VideoFrame*>(handle->GetHandle());
82 video_frame->set_timestamp(timestamp); 82 video_frame->set_timestamp(timestamp);
83 } else { 83 } else {
84 gfx::Size size(frame->GetWidth(), frame->GetHeight()); 84 gfx::Size size(frame->GetWidth(), frame->GetHeight());
85 video_frame = frame_pool_.CreateFrame( 85 video_frame = frame_pool_.CreateFrame(
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); 184 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
185 break; 185 break;
186 default: 186 default:
187 NOTREACHED(); 187 NOTREACHED();
188 break; 188 break;
189 } 189 }
190 } 190 }
191 } 191 }
192 192
193 } // namespace content 193 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698